Hardware offload introduced extra tracking of netdev ports.  This
included ovs-netdev, which is really for internal infra usage for
the userpace datapath.  This breaks cleanup of the userspace
datapath.  There is no need to do this extra tracking of this port,
hence it is skipped by checking for the port name as the type does
not help here.  Adding an extra type or field is another way to fix
this, but this would probably be overkill as this port is a constant
and the misuse potential very limited.

CC: Paul Blakey <[email protected]>
Fixes: 32b77c316d9982("dpif: Save added ports in a port map.")
Signed-off-by: Darrell Ball <[email protected]>
---
 lib/dpif.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/dpif.c b/lib/dpif.c
index 10bdd70..8624d34 100644
--- a/lib/dpif.c
+++ b/lib/dpif.c
@@ -350,7 +350,11 @@ do_open(const char *name, const char *type, bool create, 
struct dpif **dpifp)
             struct netdev *netdev;
             int err;
 
-            if (!strcmp(dpif_port.type, "internal")) {
+            /* ovs-netdev is a tap device that is used as an
+             * internal port for the userspace datapath, hence
+             * don't track it here. */
+            if (!strcmp(dpif_port.type, "internal") ||
+                (!strcmp(dpif_port.name, "ovs-netdev"))) {
                 continue;
             }
 
-- 
1.9.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to