From: Xiao Wang Date: Thu, 19 Jan 2017 05:39:23 +0000 (-0800) Subject: net/i40e: fix Rx checksum flag X-Git-Tag: spdx-start~4624 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=65a35ca820f4ed4d55d22a32bf6cadc9d12c95af;p=dpdk.git 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 --- 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