The 'attached' flag for a netdev_dpdk device is set only when it is
attached via rte_dev_probe(). However, when the DPDK port probe was
successfully done as part of vswitchd bring up (if the device was bound to
igb_uio/vfio-pci prior to bring up), then this flag is not set.
When netdev_dpdk_process_devargs() finds this already probed device as part
of 'ovs-vsctl add port' cmd and returns it with a port_id, the
'attached' flag for the 'dev' is not set which can lead to improper cleanup
while destroying the device later on in netdev_dpdk_destruct.
Fixes: 40e940e4391f ("netdev-dpdk: support port representors")
Signed-off-by: Somnath Kotur <[email protected]>
---
lib/netdev-dpdk.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 6187129..f47d514 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -1842,7 +1842,11 @@ netdev_dpdk_process_devargs(struct netdev_dpdk *dev,
new_port_id = DPDK_ETH_PORT_ID_INVALID;
}
}
- }
+ } else if (!dev->attached) { /* Device found in DPDK, check if
+ * attached and set if not
+ */
+ dev->attached = true;
+ }
}
if (new_port_id == DPDK_ETH_PORT_ID_INVALID) {
--
1.8.3.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev