summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBryan Benson <bmbenson@amazon.com>2013-11-08 19:47:22 +0000
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-01-15 18:11:18 +0100
commitecf724088eb775753f212d3d7186989d5b7115e5 (patch)
tree4854001e6c219fbf1bda80a13b0c107d65ac3b25 /lib
parent5e08d18b0ef5afa6b55614ad4ae25f74787f99e9 (diff)
downloaddpdk-ecf724088eb775753f212d3d7186989d5b7115e5.zip
dpdk-ecf724088eb775753f212d3d7186989d5b7115e5.tar.gz
dpdk-ecf724088eb775753f212d3d7186989d5b7115e5.tar.xz
ixgbe: fix offloading bits when Rx bulk alloc is used
This is a fix for the ixgbe hardware offload flags not being set when bulk alloc RX is used. The issue was caused by masking off the bits that store the hardware offload values in the status_error field to retrieve the done bit for the descriptor. Commit 7431041062b9fd0555bac7ca4abebc99e3379fa5 in DPDK-1.3.0 introduced bulk dequeue, which included the bug. Signed-off-by: Bryan Benson <bmbenson@amazon.com> Acked-by: Ivan Boule <ivan.boule@6wind.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/librte_pmd_ixgbe/ixgbe_rxtx.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
index bb092ad..6eda8bc 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
@@ -1041,7 +1041,8 @@ ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq)
struct igb_rx_entry *rxep;
struct rte_mbuf *mb;
uint16_t pkt_len;
- int s[LOOK_AHEAD], nb_dd;
+ uint32_t s[LOOK_AHEAD];
+ int nb_dd;
int i, j, nb_rx = 0;
@@ -1064,12 +1065,12 @@ 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;
- /* Clear everything but the status bits (LSB) */
- for (j = 0; j < LOOK_AHEAD; ++j)
- s[j] &= IXGBE_RXDADV_STAT_DD;
+ nb_dd = 0;
+ /* add to nd_dd when the status bit is set (LSB) */
+ for (j = 0; j < LOOK_AHEAD; ++j) {
+ nb_dd += s[j] & IXGBE_RXDADV_STAT_DD;
+ }
- /* Compute how many status bits were set */
- nb_dd = s[0]+s[1]+s[2]+s[3]+s[4]+s[5]+s[6]+s[7];
nb_rx += nb_dd;
/* Translate descriptor info to mbuf format */