From: Xiao Wang Date: Tue, 6 Sep 2016 01:27:32 +0000 (+0800) Subject: net/i40e: implement new Rx checksum flag X-Git-Tag: spdx-start~5523 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b704f9071b0991209b28fbd5df4d66d08b315c17;p=dpdk.git net/i40e: implement new Rx checksum flag Add CKSUM_GOOD flag to distinguish a good checksum from an unknown one. Signed-off-by: Xiao Wang Acked-by: Jing Chen --- diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index a297c658bf..7ae7d9fb87 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -142,8 +142,14 @@ i40e_rxd_error_to_pkt_flags(uint64_t qword) return flags; if (unlikely(error_bits & (1 << I40E_RX_DESC_ERROR_IPE_SHIFT))) flags |= PKT_RX_IP_CKSUM_BAD; + else + flags |= PKT_RX_IP_CKSUM_GOOD; + if (unlikely(error_bits & (1 << I40E_RX_DESC_ERROR_L4E_SHIFT))) flags |= PKT_RX_L4_CKSUM_BAD; + else + flags |= PKT_RX_L4_CKSUM_GOOD; + if (unlikely(error_bits & (1 << I40E_RX_DESC_ERROR_EIPE_SHIFT))) flags |= PKT_RX_EIP_CKSUM_BAD;