summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-05-14 15:26:53 +0200
committerFlorin Coras <florin.coras@gmail.com>2021-05-14 15:46:50 +0000
commitca1bbbb9e8015dacb55247e3e00fba79d13ad4ca (patch)
tree0a7205bb53f5aacfb94d7ace0eeb87751944333e /src/plugins
parentc3d0012b67343c9e2531b99b823545815db7799c (diff)
avf: free spinlock on txq removal
Type: fix Change-Id: I8e9a907a227f82b870a945b94731dc3204c23ee1 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/avf/device.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/avf/device.c b/src/plugins/avf/device.c
index 05946a4087d..28fe0a42f08 100644
--- a/src/plugins/avf/device.c
+++ b/src/plugins/avf/device.c
@@ -304,6 +304,7 @@ avf_txq_init (vlib_main_t * vm, avf_device_t * ad, u16 qid, u16 txq_size)
{
qid = qid % ad->num_queue_pairs;
txq = vec_elt_at_index (ad->txqs, qid);
+ ASSERT (txq->lock == 0);
clib_spinlock_init (&txq->lock);
ad->flags |= AVF_DEVICE_F_SHARED_TXQ_LOCK;
return 0;
@@ -1529,6 +1530,7 @@ avf_delete_if (vlib_main_t * vm, avf_device_t * ad, int with_barrier)
clib_ring_free (txq->rs_slots);
vec_free (txq->tmp_bufs);
vec_free (txq->tmp_descs);
+ clib_spinlock_free (&txq->lock);
}
/* *INDENT-ON* */
vec_free (ad->txqs);