[dpdk-dev] [PATCH] net/i40e: fix Rx checksum flag
Xiao Wang
xiao.w.wang at intel.com
Thu Jan 19 06:39:23 CET 2017
When no error reported in Rx descriptor, we should set CKSUM_GOOD flag
before return.
Fixes: b704f9071b09 ("net/i40e: implement new Rx checksum flag")
Signed-off-by: Xiao Wang <xiao.w.wang at intel.com>
CC: stable at dpdk.org
---
drivers/net/i40e/i40e_rxtx.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 1c9a6c8..22809fa 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -151,8 +151,11 @@ static uint16_t i40e_xmit_pkts_simple(void *tx_queue,
uint64_t error_bits = (qword >> I40E_RXD_QW1_ERROR_SHIFT);
#define I40E_RX_ERR_BITS 0x3f
- if (likely((error_bits & I40E_RX_ERR_BITS) == 0))
+ if (likely((error_bits & I40E_RX_ERR_BITS) == 0)) {
+ flags |= (PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD);
return flags;
+ }
+
if (unlikely(error_bits & (1 << I40E_RX_DESC_ERROR_IPE_SHIFT)))
flags |= PKT_RX_IP_CKSUM_BAD;
else
--
1.8.3.1
More information about the dev
mailing list