aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2024-03-27 22:19:15 +0100
committerDamjan Marion <dmarion@0xa5.net>2024-04-01 10:48:53 +0000
commitcbaa256a141b929ae6ac28dc74e9023e88b88eed (patch)
treeff5f601bc46cc78ccbcd45cc0fc3602f0ca58d6b /src/plugins
parent0cbd623d723513e501c1ca5f6f085341d6643d3c (diff)
octeon: refill even if nothing dequeued from rx queue
It may happen that rx queue is empty of free buffers due to previous alloc failure. Type: fix Fixes: 01fe7ab Change-Id: I344dcda11525444bd1358b3d36ffdf8ab9aa2677 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/dev_octeon/rx_node.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/dev_octeon/rx_node.c b/src/plugins/dev_octeon/rx_node.c
index 5f7e5a8469b..35776c8b714 100644
--- a/src/plugins/dev_octeon/rx_node.c
+++ b/src/plugins/dev_octeon/rx_node.c
@@ -313,7 +313,7 @@ oct_rx_node_inline (vlib_main_t *vm, vlib_node_runtime_t *node,
n_desc = (status.tail - head) & cq_mask;
if (n_desc == 0)
- return 0;
+ goto refill;
vlib_get_new_next_frame (vm, node, ctx->next_index, ctx->to_next,
ctx->n_left_to_next);
@@ -365,14 +365,15 @@ oct_rx_node_inline (vlib_main_t *vm, vlib_node_runtime_t *node,
vlib_put_next_frame (vm, node, ctx->next_index, ctx->n_left_to_next);
- n_enq = crq->n_enq - ctx->n_segs;
- n_enq += oct_rxq_refill (vm, rxq, rxq->size - n_enq);
- crq->n_enq = n_enq;
-
vlib_increment_combined_counter (
vnm->interface_main.combined_sw_if_counters + VNET_INTERFACE_COUNTER_RX,
thr_idx, ctx->hw_if_index, ctx->n_rx_pkts, ctx->n_rx_bytes);
+refill:
+ n_enq = crq->n_enq - ctx->n_segs;
+ n_enq += oct_rxq_refill (vm, rxq, rxq->size - n_enq);
+ crq->n_enq = n_enq;
+
return ctx->n_rx_pkts;
}