From 1550c20be0441fb23693f9c1e6b86225885d1dbc Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Mon, 17 Feb 2014 18:27:46 +0100 Subject: [PATCH] ixgbe: minor rework offloading bits fix Signed-off-by: Bruce Richardson Signed-off-by: David Marchand --- lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c index a59d68b77b..a1c137280d 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c @@ -1040,8 +1040,7 @@ ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq) struct igb_rx_entry *rxep; struct rte_mbuf *mb; uint16_t pkt_len; - uint32_t s[LOOK_AHEAD]; - int nb_dd; + int s[LOOK_AHEAD], nb_dd; int i, j, nb_rx = 0; @@ -1064,11 +1063,10 @@ ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq) for (j = LOOK_AHEAD-1; j >= 0; --j) s[j] = rxdp[j].wb.upper.status_error; + /* Compute how many status bits were set */ nb_dd = 0; - /* add to nd_dd when the status bit is set (LSB) */ - for (j = 0; j < LOOK_AHEAD; ++j) { + for (j = 0; j < LOOK_AHEAD; ++j) nb_dd += s[j] & IXGBE_RXDADV_STAT_DD; - } nb_rx += nb_dd; -- 2.20.1