[PATCH v2] net/pcap: fix timeout of stopping device

Zhou, YidingX yidingx.zhou at intel.com
Tue Sep 6 18:21:43 CEST 2022


On Tue,  6 Sep 2022 16:05:11 +0800
Yiding Zhou <yidingx.zhou at intel.com> wrote:

> The pcap file will be synchronized to the disk when stopping the device.
> It takes a long time if the file is large that would cause the 'detach 
> sync request' timeout when the device is closed under multi-process 
> scenario.
> 
> This commit fixes the issue by using alarm handler to release dumper.
> 
> Fixes: 0ecfb6c04d54 ("net/pcap: move handler to process private")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Yiding Zhou <yidingx.zhou at intel.com>


I think you need to redesign the handshake if this the case.
Forcing 30 second delay at the end of all uses of pcap is not acceptable.

Thanks for your comments.
According to my test, the time required to sync a 100G pcap file is about 20s, 
so I set a delay of 30s. I also tried to use AIO, but some issue in the multi-process scenario.
And I also consider io_uring,  it is only supported in linux-5.x, we need to consider compatibility,. 
Maybe better way is to do more work to redesign the handshake.


More information about the stable mailing list