summaryrefslogtreecommitdiffstats
path: root/src/plugins/dev_octeon/rx_node.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/dev_octeon/rx_node.c')
-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;
}