From: Bruce Richardson Date: Mon, 17 Feb 2014 17:27:46 +0000 (+0100) Subject: ixgbe: minor rework offloading bits fix X-Git-Tag: spdx-start~11011 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1550c20be0441fb23693f9c1e6b86225885d1dbc;p=dpdk.git ixgbe: minor rework offloading bits fix Signed-off-by: Bruce Richardson Signed-off-by: David Marchand --- 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;