diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2022-11-17 14:04:49 +0000 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2022-11-25 12:43:40 +0000 |
commit | 530c5ee1fe178895e718ea752d2addc7b21c01ba (patch) | |
tree | 64e6e6aa72807b5b5e596b593397e54900bfbc25 /src/vnet/interface/rx_queue.c | |
parent | 1a9dc75fe8099fdde9b1dd248a8fca35b001f9fc (diff) |
interface: remove the pending interrupt from deleting interface
Type: fix
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I3138f97519d216b89a9c46865271db1f9ddd53cd
Diffstat (limited to 'src/vnet/interface/rx_queue.c')
-rw-r--r-- | src/vnet/interface/rx_queue.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/vnet/interface/rx_queue.c b/src/vnet/interface/rx_queue.c index cec0296519c..736d14da146 100644 --- a/src/vnet/interface/rx_queue.c +++ b/src/vnet/interface/rx_queue.c @@ -124,7 +124,10 @@ vnet_hw_if_unregister_all_rx_queues (vnet_main_t *vnm, u32 hw_if_index) vnet_hw_interface_t *hi = vnet_get_hw_interface (vnm, hw_if_index); vnet_interface_main_t *im = &vnm->interface_main; vnet_hw_if_rx_queue_t *rxq; + vlib_main_t *vm; + vnet_hw_if_rx_node_runtime_t *rt; u64 key; + u32 queue_index; log_debug ("unregister_all: interface %v", hi->name); @@ -132,6 +135,15 @@ vnet_hw_if_unregister_all_rx_queues (vnet_main_t *vnm, u32 hw_if_index) { rxq = vnet_hw_if_get_rx_queue (vnm, hi->rx_queue_indices[i]); key = rx_queue_key (rxq->hw_if_index, rxq->queue_id); + if (PREDICT_FALSE (rxq->mode == VNET_HW_IF_RX_MODE_INTERRUPT || + rxq->mode == VNET_HW_IF_RX_MODE_ADAPTIVE)) + { + vm = vlib_get_main_by_index (rxq->thread_index); + queue_index = vnet_hw_if_get_rx_queue_index_by_id (vnm, hw_if_index, + rxq->queue_id); + rt = vlib_node_get_runtime_data (vm, hi->input_node_index); + clib_interrupt_clear (rt->rxq_interrupts, queue_index); + } hash_unset_mem_free (&im->rxq_index_by_hw_if_index_and_queue_id, &key); pool_put_index (im->hw_if_rx_queues, hi->rx_queue_indices[i]); |