From 65a35ca820f4ed4d55d22a32bf6cadc9d12c95af Mon Sep 17 00:00:00 2001 From: Xiao Wang Date: Wed, 18 Jan 2017 21:39:23 -0800 Subject: [PATCH] net/i40e: fix Rx checksum flag When no error reported in Rx descriptor, we should set CKSUM_GOOD flag before return. Fixes: b704f9071b09 ("net/i40e: implement new Rx checksum flag") Cc: stable@dpdk.org Signed-off-by: Xiao Wang --- 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 89b9bf1c19..9bfc7b8d4b 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -151,8 +151,11 @@ i40e_rxd_error_to_pkt_flags(uint64_t qword) 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 -- 2.20.1