From 266929f2e498a8748edd8fc6ba5ef4e28226d04c Mon Sep 17 00:00:00 2001 From: Mohammed Hawari Date: Tue, 21 Sep 2021 17:44:26 +0200 Subject: interface: fix poll vector realloc Change-Id: I60815b5827b4406228fd6b490f4ac1f874bac974 Signed-off-by: Mohammed Hawari Type: fix --- src/vnet/interface/rx_queue.c | 3 ++- src/vnet/interface/rx_queue_funcs.h | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/vnet') diff --git a/src/vnet/interface/rx_queue.c b/src/vnet/interface/rx_queue.c index 7632b190705..cec0296519c 100644 --- a/src/vnet/interface/rx_queue.c +++ b/src/vnet/interface/rx_queue.c @@ -228,7 +228,7 @@ vnet_hw_if_set_rx_queue_thread_index (vnet_main_t *vnm, u32 queue_index, hi->name, rxq->queue_id, thread_index); } -void +vnet_hw_if_rxq_poll_vector_t * vnet_hw_if_generate_rxq_int_poll_vector (vlib_main_t *vm, vlib_node_runtime_t *node) { @@ -252,6 +252,7 @@ vnet_hw_if_generate_rxq_int_poll_vector (vlib_main_t *vm, pv->dev_instance = rxq->dev_instance; pv->queue_id = rxq->queue_id; } + return rt->rxq_vector_int; } /* diff --git a/src/vnet/interface/rx_queue_funcs.h b/src/vnet/interface/rx_queue_funcs.h index 83f1bac4e94..906d7118296 100644 --- a/src/vnet/interface/rx_queue_funcs.h +++ b/src/vnet/interface/rx_queue_funcs.h @@ -33,8 +33,9 @@ vnet_hw_if_rx_mode vnet_hw_if_get_rx_queue_mode (vnet_main_t *vnm, u32 queue_index); void vnet_hw_if_set_rx_queue_thread_index (vnet_main_t *vnm, u32 queue_index, u32 thread_index); -void vnet_hw_if_generate_rxq_int_poll_vector (vlib_main_t *vm, - vlib_node_runtime_t *node); +vnet_hw_if_rxq_poll_vector_t * +vnet_hw_if_generate_rxq_int_poll_vector (vlib_main_t *vm, + vlib_node_runtime_t *node); /* inline functions */ @@ -72,7 +73,7 @@ vnet_hw_if_get_rxq_poll_vector (vlib_main_t *vm, vlib_node_runtime_t *node) vnet_hw_if_rxq_poll_vector_t *pv = rt->rxq_vector_int; if (PREDICT_FALSE (node->state == VLIB_NODE_STATE_INTERRUPT)) - vnet_hw_if_generate_rxq_int_poll_vector (vm, node); + pv = vnet_hw_if_generate_rxq_int_poll_vector (vm, node); else if (node->flags & VLIB_NODE_FLAG_ADAPTIVE_MODE) pv = rt->rxq_vector_poll; -- cgit 1.2.3-korg