pcap fd was opend when vdev probed,
but not closed when vdev removed.
Fixes:
c956caa6eabf ("pcap: support port hotplug")
Cc: stable@dpdk.org
Signed-off-by: Tengfei Zhang <zypscode@outlook.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
/* Special iface case. Single pcap is open and shared between tx/rx. */
if (internals->single_iface) {
queue_missed_stat_on_stop_update(dev, 0);
- pcap_close(pp->tx_pcap[0]);
- pp->tx_pcap[0] = NULL;
- pp->rx_pcap[0] = NULL;
+ if (pp->tx_pcap[0] != NULL) {
+ pcap_close(pp->tx_pcap[0]);
+ pp->tx_pcap[0] = NULL;
+ pp->rx_pcap[0] = NULL;
+ }
goto status_down;
}
PMD_LOG(INFO, "Closing pcap ethdev on NUMA socket %d",
rte_socket_id());
+ eth_dev_stop(dev);
+
rte_free(dev->process_private);
if (rte_eal_process_type() != RTE_PROC_PRIMARY)