]> git.proxmox.com Git - ovs.git/commitdiff
pinsched: Update next_txq pointer when destroying pinqueue.
authorTony van der Peet <tony.vanderpeet@alliedtelesis.co.nz>
Thu, 23 Feb 2017 20:09:19 +0000 (09:09 +1300)
committerBen Pfaff <blp@ovn.org>
Thu, 9 Mar 2017 03:32:45 +0000 (19:32 -0800)
When a packet-in queue is destroyed, update next_txq if it is referencing
the destroyed queue. NULL is a valid value for next_txq.

Signed-off-by: Tony van der Peet <tony.vanderpeet@alliedtelesis.co.nz>
Signed-off-by: Ben Pfaff <blp@ovn.org>
ofproto/pinsched.c

index 51f176050384dd1f6fd5bd4e7e1af8ad4833a42f..500115ad2bbfdb7c00cb9ced719f31df20d6b481 100644 (file)
@@ -94,6 +94,12 @@ adjust_limits(int *rate_limit, int *burst_limit)
 static void
 pinqueue_destroy(struct pinsched *ps, struct pinqueue *q)
 {
+    if (ps->next_txq == q) {
+        advance_txq(ps);
+        if (ps->next_txq == q) {
+            ps->next_txq = NULL;
+        }
+    }
     hmap_remove(&ps->queues, &q->node);
     free(q);
 }