[dpdk-dev] [PATCH v2] driver/net/pcap: fix fd leak

ZhangTengfei zhangtengfei at oppo.com
Thu Feb 25 12:13:28 CET 2021

pcap file was opened when pcap vdev probed,
but was not closed where vdev removed.
This bug appears in dpdk-pdump

Signed-off-by: ZhangTengfei <zhangtengfei at oppo.com>
 drivers/net/pcap/rte_eth_pcap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 90f5d75ea..fb01ea924 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -1597,6 +1597,7 @@ pmd_pcap_remove(struct rte_vdev_device *dev)
        if (eth_dev == NULL)
                return 0; /* port already released */

+       eth_dev_stop(eth_dev);




This e-mail and its attachments contain confidential information from OPPO, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!

More information about the dev mailing list