[ovs-dev] [PATCH] pinsched: Clear next_txq pointer when destroying pinqueue

Tony van der Peet tony.vanderpeet at alliedtelesis.co.nz
Thu Feb 23 20:09:19 UTC 2017


When a packet-in queue is destroyed, clear 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 at alliedtelesis.co.nz>
---
 ofproto/pinsched.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ofproto/pinsched.c b/ofproto/pinsched.c
index 51f176050..a1f696e62 100644
--- a/ofproto/pinsched.c
+++ b/ofproto/pinsched.c
@@ -94,6 +94,9 @@ adjust_limits(int *rate_limit, int *burst_limit)
 static void
 pinqueue_destroy(struct pinsched *ps, struct pinqueue *q)
 {
+    if (ps->next_txq == q) {
+        ps->next_txq = NULL;
+    }
     hmap_remove(&ps->queues, &q->node);
     free(q);
 }
-- 
2.11.0



More information about the dev mailing list