ixgbe: minor rework offloading bits fix
authorBruce Richardson <bruce.richardson@intel.com>
Mon, 17 Feb 2014 17:27:46 +0000 (18:27 +0100)
committerDavid Marchand <david.marchand@6wind.com>
Wed, 26 Feb 2014 09:22:33 +0000 (10:22 +0100)
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
lib/librte_pmd_ixgbe/ixgbe_rxtx.c

index a59d68b..a1c1372 100644 (file)
@@ -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;