I found that when delete one port from ovs bridge, then another port's tc 
ingress qdisc automatically disappeared, but egress qdisc is still existed.
I have tried version 2.3.2 and master branch of ovs, the bug still exists in 
these 2 branch.
we can reproduce this phenomenon following the step:
1. create 2 tap device
   ip tuntap add dev tap111 mode tap
  ip tuntap add dev tap222 mode tap


2. add port to ovs bridge
   ovs-vsctl add-br br0
   ovs-vsctl add-port br0 tap111
  ovs-vsctl add-port br0 tap222


3. add ingress qdisc for these 2 ports
   tc qdisc add dev tap111 ingress
  tc qdisc add dev tap222 ingress


4.delete port tap111
   ovs-vsctl del-port br0 tap111   
  ////// then we can see tc ingress qdisc of tap222 disappear//////////


Also, I found that when I add port tap111 to ovs bridge or set tag for port 
tap111, 
ingress qdisc of port tap111 disappeared.


I have debuged ovs code, and there maybe 3 functions related for this problem:
iface_configure_qos
netdev_linux_set_policing
netdev_linux_update
and the flag VALID_POLICING is also very important for this bug.


I have made a little modification for function netdev_linux_set_policing(),
and it seems all these 3 problems can be resolved.
can anyone help me to review this patch? 


index 0656f36..b41e1dd 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -1974,13 +1974,14 @@ netdev_linux_set_policing(struct netdev *netdev_,
                    : kbits_burst);       /* Stick with user-specified value. */


     ovs_mutex_lock(&netdev->mutex);
-    if (netdev->cache_valid & VALID_POLICING) {
-        error = netdev->netdev_policing_error;
-        if (error || (netdev->kbits_rate == kbits_rate &&
-                      netdev->kbits_burst == kbits_burst)) {
-            /* Assume that settings haven't changed since we last set them. */
-            goto out;
-        }
+
+    error = netdev->netdev_policing_error;
+    if (error || (netdev->kbits_rate == kbits_rate &&
+                  netdev->kbits_burst == kbits_burst)) {
+        /* Assume that settings haven't changed since we last set them. */
+        goto out;
+    }
+    if (netdev->cache_valid & VALID_POLICING){
         netdev->cache_valid &= ~VALID_POLICING;
     }





_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to