From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: [PATCH v2 19/20] i40e: fix offloading of outer checksum for ip in ip tunnels Date: Wed, 4 Feb 2015 10:25:24 +0100 Message-ID: <1423041925-26956-20-git-send-email-olivier.matz@6wind.com> References: <1422623775-8050-1-git-send-email-olivier.matz@6wind.com> <1423041925-26956-1-git-send-email-olivier.matz@6wind.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1423041925-26956-1-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" When offloading the checksums of ipip tunnels, m->l2_len is set to 0 as there is no tunnel or inner l2 header. Since this is a valid value remove the test. By the way, also remove the same test with l3_len because at this point, it is expected that the software provides proper values in the mbuf. It should avoid a test in dataplane processing and therefore slightly increase performance. Signed-off-by: Olivier Matz --- lib/librte_pmd_i40e/i40e_rxtx.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/librte_pmd_i40e/i40e_rxtx.c b/lib/librte_pmd_i40e/i40e_rxtx.c index 0786255..3031bd7 100644 --- a/lib/librte_pmd_i40e/i40e_rxtx.c +++ b/lib/librte_pmd_i40e/i40e_rxtx.c @@ -471,16 +471,6 @@ i40e_txd_enable_checksum(uint64_t ol_flags, uint16_t outer_l3_len, uint32_t *cd_tunneling) { - if (!l2_len) { - PMD_DRV_LOG(DEBUG, "L2 length set to 0"); - return; - } - - if (!l3_len) { - PMD_DRV_LOG(DEBUG, "L3 length set to 0"); - return; - } - /* UDP tunneling packet TX checksum offload */ if (unlikely(ol_flags & PKT_TX_OUTER_IP_CKSUM)) { -- 2.1.4