From c6eedc5220487b3704ac7b733b4926a4779bd254 Mon Sep 17 00:00:00 2001 From: Rasesh Mody Date: Fri, 11 Dec 2015 10:31:54 -0800 Subject: [PATCH] bnx2x: skip Rx producer refresh when no packet Signed-off-by: Rasesh Mody --- drivers/net/bnx2x/bnx2x_rxtx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c index 09e3ebff79..e8998c0763 100644 --- a/drivers/net/bnx2x/bnx2x_rxtx.c +++ b/drivers/net/bnx2x/bnx2x_rxtx.c @@ -374,6 +374,9 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) sw_cq_cons = rxq->rx_cq_head; sw_cq_prod = rxq->rx_cq_tail; + if (sw_cq_cons == hw_cq_cons) + return 0; + while (nb_rx < nb_pkts && sw_cq_cons != hw_cq_cons) { bd_prod &= MAX_RX_BD(rxq); -- 2.20.1