On 2/26/2021 4:20 PM, ZhangTengfei wrote:
pcap fd was opend when vdev probed,
but not closed when vdev removed.
This bug appears in dpdk-pdump

Signed-off-by: ZhangTengfei <zypsc...@outlook.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);
        eth_dev_close(eth_dev);
        rte_eth_dev_release_port(eth_dev);

Thanks for the fix,
the cleanup seems missing in 'eth_dev_close()' too, what do you think moving 'eth_dev_stop(eth_dev);' inside the 'eth_dev_close()'?
So both 'close' and 'remove' will be covered.


Btw, you have same patch with both "ZhangTengfei <zhangteng...@oppo.com>" sign and "ZhangTengfei <zypsc...@outlook.com>" sign (this one), can you please clarify which one do you prefer?


Reply via email to