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>
This commit is contained in:
Damjan Marion
2024-03-27 22:19:15 +01:00
committed by Damjan Marion
parent 0cbd623d72
commit cbaa256a14

View File

@@ -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;
}