summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/rx_pkt.c
diff options
context:
space:
mode:
Diffstat (limited to 'VNFs/DPPD-PROX/rx_pkt.c')
-rw-r--r--VNFs/DPPD-PROX/rx_pkt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/VNFs/DPPD-PROX/rx_pkt.c b/VNFs/DPPD-PROX/rx_pkt.c
index fd0f7e5c..f6adeb4b 100644
--- a/VNFs/DPPD-PROX/rx_pkt.c
+++ b/VNFs/DPPD-PROX/rx_pkt.c
@@ -476,7 +476,10 @@ uint16_t rx_pkt_distr(struct task_base *tbase, struct rte_mbuf ***mbufs)
{
uint16_t ret = call_prev_rx_pkt(tbase, mbufs);
- tbase->aux->rx_bucket[ret]++;
+ if (likely(ret < RX_BUCKET_SIZE))
+ tbase->aux->rx_bucket[ret]++;
+ else
+ tbase->aux->rx_bucket[RX_BUCKET_SIZE - 1]++;
return ret;
}