aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/interface
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2023-11-03 21:57:42 +0000
committerDamjan Marion <damarion@cisco.com>2023-11-03 22:56:29 +0000
commit7f75e80f087d3ff1f5ebcb9eb6a117115baee011 (patch)
treea05daac2f541cf9cca7cb3350206c4b65cea2603 /src/vnet/interface
parent236fae462a4ee799b3f05d4b2aff641d5c9486a6 (diff)
vppinfra: refactor interrupt code
Type: improvement Change-Id: Ie6987736faf7d8a641762e276775da8ee0c03ea4 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/interface')
-rw-r--r--src/vnet/interface/runtime.c5
-rw-r--r--src/vnet/interface/rx_queue.c6
2 files changed, 4 insertions, 7 deletions
diff --git a/src/vnet/interface/runtime.c b/src/vnet/interface/runtime.c
index 5c215e88501..a88a23bd4c9 100644
--- a/src/vnet/interface/runtime.c
+++ b/src/vnet/interface/runtime.c
@@ -289,10 +289,9 @@ vnet_hw_if_update_runtime_data (vnet_main_t *vnm, u32 hw_if_index)
{
void *in = rt->rxq_interrupts;
int int_num = -1;
- while ((int_num = clib_interrupt_get_next (in, int_num)) !=
- -1)
+ while ((int_num = clib_interrupt_get_next_and_clear (
+ in, int_num)) != -1)
{
- clib_interrupt_clear (in, int_num);
pending_int = clib_bitmap_set (pending_int, int_num, 1);
last_int = clib_max (last_int, int_num);
}
diff --git a/src/vnet/interface/rx_queue.c b/src/vnet/interface/rx_queue.c
index 736d14da146..b1fc82f38e9 100644
--- a/src/vnet/interface/rx_queue.c
+++ b/src/vnet/interface/rx_queue.c
@@ -252,14 +252,12 @@ vnet_hw_if_generate_rxq_int_poll_vector (vlib_main_t *vm,
vec_reset_length (rt->rxq_vector_int);
- while ((int_num = clib_interrupt_get_next (rt->rxq_interrupts, int_num)) !=
- -1)
+ while ((int_num = clib_interrupt_get_next_and_clear (rt->rxq_interrupts,
+ int_num)) != -1)
{
vnet_hw_if_rx_queue_t *rxq = vnet_hw_if_get_rx_queue (vnm, int_num);
vnet_hw_if_rxq_poll_vector_t *pv;
- clib_interrupt_clear (rt->rxq_interrupts, int_num);
-
vec_add2 (rt->rxq_vector_int, pv, 1);
pv->dev_instance = rxq->dev_instance;
pv->queue_id = rxq->queue_id;