diff options
author | Tony van der Peet <tony.vanderpeet@alliedtelesis.co.nz> | 2017-02-24 09:09:19 +1300 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-03-08 19:32:45 -0800 |
commit | 2d2b01146c180395b2ed513ce0c0c06617f5bdeb (patch) | |
tree | 78cea4e69f1fb339c3386fb763d7faa01d259bef /ofproto | |
parent | 9d3e0e5c196c0a91ea23d8d9254b1487cb58b58e (diff) | |
download | openvswitch-2d2b01146c180395b2ed513ce0c0c06617f5bdeb.tar.gz |
pinsched: Update next_txq pointer when destroying pinqueue.
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>
Diffstat (limited to 'ofproto')
-rw-r--r-- | ofproto/pinsched.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ofproto/pinsched.c b/ofproto/pinsched.c index 51f176050..500115ad2 100644 --- a/ofproto/pinsched.c +++ b/ofproto/pinsched.c @@ -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); } |