Hello,

I have 2 ports connected in a bridge, and traffic is going, offloaded (full).

Doing that, I remove one port "ovs-vsctl del-port pf".

Adding it back, traffic resumes, but OVS does not create the correct flows, as the rules were not deleted properly with del-port.

The issue is that:

In lib/dpif.c, in dpif_port_del, there is a call to dpif->dpif_class->port_del() and then netdev_ports_remove().

port_del function in this case is dpif_netdev_port_del (in lib/dpif-netdev.c) that calls do_del_port(). That does invoke removing the flows, but those are just requests to be handled by dp_netdev_flow_offload_main().

When dp_netdev_flow_offload_main() tries to handle the requests, in mark_to_flow_disassociate, the call to netdev_ports_get() (line 2295) fails, so netdev_flow_del() is not called.


I tried to add a delay as below, and it resolves the issue. However, it looks bad to me.

Suggestions?


Thanks,

Eli

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index d393aab5e..d5b3d32d0 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -1942,6 +1942,7 @@ dpif_netdev_port_del(struct dpif *dpif, odp_port_t port_no)
         }
     }
     ovs_mutex_unlock(&dp->port_mutex);
+    sleep(1);

     return error;
 }

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

Reply via email to