From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EB833A0093; Sun, 2 Jan 2022 09:46:20 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CE6E40698; Sun, 2 Jan 2022 09:46:20 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 3F9514067E for ; Sun, 2 Jan 2022 09:46:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641113179; x=1672649179; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=9hvGGiS4OKsJhKSa97Uoh0qfjRsPsJvUPOZMSgSrrcQ=; b=DuZ7vwKJS5ImBWTXEEAj0VNG/GtkUfmygE3mf1CaBILr/q+UCSFRS4zT hpgvU2za1DMUawSs7Fcrgjm/f34ERws0bUSrOuPS32UXVHOPYbASq/K7l 9FA/yVn7fs4WQiEEKY7UxhNPBu3j1XNg1eSKEgVQ+JQTBsVwBbX0pCA/f HiVgSUQ6/MEN3Rcoa0L0Thu/Fa43tnXaz1C24kPIp6oIK2ihErctALkSP vaT868Xo34vaHaeZoefwnUeC+6hSWCraToYC+WRKSJioFlzm5YBOdLyGJ /rb/2rMFXu0nwzjRKR0Tmrj/w0zA5NLDLq3WlyiJNycTSdfw+Q5lUjKo4 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10214"; a="228777118" X-IronPort-AV: E=Sophos;i="5.88,255,1635231600"; d="scan'208";a="228777118" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jan 2022 00:46:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,255,1635231600"; d="scan'208";a="511596341" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga007.jf.intel.com with ESMTP; 02 Jan 2022 00:46:13 -0800 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Sun, 2 Jan 2022 00:46:12 -0800 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Sun, 2 Jan 2022 16:46:10 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.2308.020; Sun, 2 Jan 2022 16:46:10 +0800 From: "Zhang, Qi Z" To: "Liu, KevinX" , "dev@dpdk.org" CC: "Zhang, RobinX" , "Wang, Jie1X" , "Liu, KevinX" Subject: RE: [PATCH] net/ice: fix error forwarding IPv6 VXLAN packet Thread-Topic: [PATCH] net/ice: fix error forwarding IPv6 VXLAN packet Thread-Index: AQHX7Ox11/4mDDvIHUezgF8RsZEB7KxPjufA Date: Sun, 2 Jan 2022 08:46:10 +0000 Message-ID: <96854bbfaeaa44adab468f9e88af11fb@intel.com> References: <20211208095626.85026-1-kevinx.liu@intel.com> In-Reply-To: <20211208095626.85026-1-kevinx.liu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.200.16 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Kevin Liu > Sent: Wednesday, December 8, 2021 5:56 PM > To: dev@dpdk.org > Cc: Zhang, RobinX ; Wang, Jie1X > ; Liu, KevinX > Subject: [PATCH] net/ice: fix error forwarding IPv6 VXLAN packet >=20 > In ice_txd_enable_offload(), when set tunnel packet Tx checksum offload > enable, td_offset should be set with outer l2/l3 len instead of inner l2/= l3 len. >=20 > This patch fix the bug that the checksum engine can forward tunnle packet= s. s/tunnle/tunnel >=20 > Fixes: 28f9002ab67f ("net/ice: add Tx AVX512 offload path") >=20 > Signed-off-by: Kevin Liu > --- > drivers/net/ice/ice_rxtx_vec_common.h | 52 +++++++++++++++++++-------- > 1 file changed, 37 insertions(+), 15 deletions(-) >=20 > diff --git a/drivers/net/ice/ice_rxtx_vec_common.h > b/drivers/net/ice/ice_rxtx_vec_common.h > index dfe60c81d9..8ff01046e1 100644 > --- a/drivers/net/ice/ice_rxtx_vec_common.h > +++ b/drivers/net/ice/ice_rxtx_vec_common.h > @@ -364,23 +364,45 @@ ice_txd_enable_offload(struct rte_mbuf *tx_pkt, > uint32_t td_offset =3D 0; >=20 > /* Tx Checksum Offload */ > - /* SET MACLEN */ > - td_offset |=3D (tx_pkt->l2_len >> 1) << > + /*Tunnel package usage outer len enable L2/L3 checksum offload*/ > + if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) { > + /* SET MACLEN */ > + td_offset |=3D (tx_pkt->outer_l2_len >> 1) << > ICE_TX_DESC_LEN_MACLEN_S; >=20 > - /* Enable L3 checksum offload */ > - if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) { > - td_cmd |=3D ICE_TX_DESC_CMD_IIPT_IPV4_CSUM; > - td_offset |=3D (tx_pkt->l3_len >> 2) << > - ICE_TX_DESC_LEN_IPLEN_S; > - } else if (ol_flags & RTE_MBUF_F_TX_IPV4) { > - td_cmd |=3D ICE_TX_DESC_CMD_IIPT_IPV4; > - td_offset |=3D (tx_pkt->l3_len >> 2) << > - ICE_TX_DESC_LEN_IPLEN_S; > - } else if (ol_flags & RTE_MBUF_F_TX_IPV6) { > - td_cmd |=3D ICE_TX_DESC_CMD_IIPT_IPV6; > - td_offset |=3D (tx_pkt->l3_len >> 2) << > - ICE_TX_DESC_LEN_IPLEN_S; > + /* Enable L3 checksum offload */ > + if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) { > + td_cmd |=3D ICE_TX_DESC_CMD_IIPT_IPV4_CSUM; > + td_offset |=3D (tx_pkt->outer_l3_len >> 2) << > + ICE_TX_DESC_LEN_IPLEN_S; Is this fix also cover IPv4 Tx checksum offload?=20 Please refine the title to reflect what exactly the patch does if necessary= . Btw, could you also check if any fix needed in ice_txd_enable_checksum? I saw inconsistent offset configure on l3_len between scaler path and vecto= r path. Its better to always keep them identical. =20