From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 8C8F056AB for ; Tue, 6 Sep 2016 03:28:10 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP; 05 Sep 2016 18:28:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,289,1470726000"; d="scan'208";a="4907006" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga006.fm.intel.com with ESMTP; 05 Sep 2016 18:28:09 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u861S74m007621; Tue, 6 Sep 2016 09:28:07 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u861S4Jq032273; Tue, 6 Sep 2016 09:28:06 +0800 Received: (from xiaowan1@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u861S4HL032269; Tue, 6 Sep 2016 09:28:04 +0800 From: Xiao Wang To: dev@dpdk.org Cc: jing.d.chen@intel.com, olivier.matz@6wind.com, Xiao Wang Date: Tue, 6 Sep 2016 09:27:32 +0800 Message-Id: <1473125252-32201-6-git-send-email-xiao.w.wang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1473125252-32201-1-git-send-email-xiao.w.wang@intel.com> References: <1473125252-32201-1-git-send-email-xiao.w.wang@intel.com> Subject: [dpdk-dev] [PATCH v2 5/5] net/i40e: implement new Rx checksum flag X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2016 01:28:11 -0000 Add CKSUM_GOOD flag to distinguish a good checksum from an unknown one. Signed-off-by: Xiao Wang --- drivers/net/i40e/i40e_rxtx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 554d167..b49d9dc 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; -- 1.9.3