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 10B1DA04A2 for ; Fri, 4 Mar 2022 04:19:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 047354013F; Fri, 4 Mar 2022 04:19:37 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 857734013F for ; Fri, 4 Mar 2022 04:19:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646363974; x=1677899974; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=iO3sGW3HmByRjyh8Au9gW6IGFCIAHifbzBFl2S0wNCk=; b=G1AU6GsQj/CduTcvoEFY4kgrkfwxA6ZTPrMbiXbY0aerBK8BLPgjc5md kaxNbewuWPFiqwioU03UNGUkqLfCupwbo1Y5wDPYSTQwLVsGPRtWbliQ3 S97f57o1ae+cB2jndaeuIeAQRmEl9cs2Byb6yy6umZyua+2+vhiaJgdE3 12gE9WMcomGS9rb07Q4xEWFQlqtDLNSRrV+bVi+jXTdGFNX3KbRG+qTb5 g9oNHslR6No1tFFeZHjPKZ3Y7C8I6kSr6myQgniWVV+ZB+WY1fR98owhp POsvAQ32zJT/3jV5Qgk5WDFYhGoHGGjxZxOmIbZM8cULLm9jFVvYFgWgK Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10275"; a="241305978" X-IronPort-AV: E=Sophos;i="5.90,154,1643702400"; d="scan'208";a="241305978" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2022 19:19:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,154,1643702400"; d="scan'208";a="779505211" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga006.fm.intel.com with ESMTP; 03 Mar 2022 19:19:33 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Thu, 3 Mar 2022 19:19:32 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21 via Frontend Transport; Thu, 3 Mar 2022 19:19:32 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.175) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.21; Thu, 3 Mar 2022 19:19:32 -0800 Received: from BL0PR11MB3250.namprd11.prod.outlook.com (2603:10b6:208:63::13) by BN6PR11MB1603.namprd11.prod.outlook.com (2603:10b6:405:10::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14; Fri, 4 Mar 2022 03:19:27 +0000 Received: from BL0PR11MB3250.namprd11.prod.outlook.com ([fe80::29e0:3ec1:26dd:a09]) by BL0PR11MB3250.namprd11.prod.outlook.com ([fe80::29e0:3ec1:26dd:a09%3]) with mapi id 15.20.5038.014; Fri, 4 Mar 2022 03:19:26 +0000 From: "Xu, Ting" To: "Liu, KevinX" , "dev@dpdk.org" CC: "Yang, Qiming" , "Zhang, Qi Z" , "Yang, SteveX" , "Yigit, Ferruh" , "Liu, KevinX" , "stable@dpdk.org" Subject: RE: [PATCH v2 1/2] net/ice: fix Tx offload path choice Thread-Topic: [PATCH v2 1/2] net/ice: fix Tx offload path choice Thread-Index: AQHYLFMwRZ3pmwb1hEy4sXrBPwPXhayulKWw Date: Fri, 4 Mar 2022 03:19:26 +0000 Message-ID: References: <20211224150925.3296471-1-kevinx.liu@intel.com> <20211229093702.1930214-1-kevinx.liu@intel.com> <20211229093702.1930214-2-kevinx.liu@intel.com> In-Reply-To: <20211229093702.1930214-2-kevinx.liu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.401.20 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cbb012e6-75dd-4375-1d14-08d9fd8dc9e6 x-ms-traffictypediagnostic: BN6PR11MB1603:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WMi8bUbe2dIY0F/esF5T/FKiAW1QaxOet2hRkCNgEZ0Nge0pglS4bhq/8h0h0BiqLa1D+I7T7jyC+87VfPpny+dnXkKKFWtaMfCL2kWx+HDKftaqqy1QoIZBFAuT3xbCa1p2R8GP0y/breiCRH7KvOQyo5J9N3Qspp/az4t0fr4iuBeHwvsKVGhY7hOcYlGBwdQmjPjo8HgmgVWW0/ilO4juJ8BJBb/MiV6RdjVJ1SuZuG4IOv/Q/7/NEFIO2d3Hi3l8N1sBqFuX1NqIhKU5uhEKnzDUTQDWefAKIGUsMpERS4/3psEQwbSySqu6TQ1oMbcUbnTAhOlAWq5l/noluW9n3RJdVNUvbEPQV555Vy0oIuvCMuQYXzdQGs1j6K1OOHq7qYzNVUkgYQkrgsvMppwcAP8Uaw0FFZaoYNRat3PQnfHstiS8uN8culIkCoswJvbjNIAPVUWuXa9WaoXtWNTpgV4Tbv0Ft680dTM2prUy8t9jSxCuZxjFnVHLC6QY0ohhMNBu4BkdFH6jNUIDrc1ukxV75uSfpk33Bx6297UW7dtEWBgGk5V7a1Gb2etn0tGZjgbEQoOxOSFicn/B8Jv7QLnoqz6CCnTNC/m5hqjAnLBX5Fir1H96q0tUaYdPMJM1nntmvq7aP6FNvThK5sU71YOlsCljWMlCYY5sgrPzHwmDq5bIrHuRTmShiUWjyjGZ6pnwPQZC6W84SRx7FA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR11MB3250.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(53546011)(7696005)(6506007)(122000001)(82960400001)(186003)(26005)(33656002)(55016003)(83380400001)(9686003)(54906003)(86362001)(66446008)(66556008)(66476007)(76116006)(71200400001)(66946007)(8676002)(64756008)(8936002)(52536014)(4326008)(38070700005)(5660300002)(316002)(450100002)(38100700002)(110136005)(2906002)(508600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?v6qgyJWFqeX3RbnPN+8ra+u7wv3SpVylcUUC2hsfJVksn3pKs/cqR3ifEWYD?= =?us-ascii?Q?eN2DmU2lLQ7QX9dYGZ+RvUSen1oPfnksWKiz6FkPFB+nd5d82cljkHsIKNFE?= =?us-ascii?Q?RsDcyobKNHoyrbbnVxTr9VQLcFBlVqRNdDKh1VAAieahkl2AbgX9DjFi3vRr?= =?us-ascii?Q?W0DibdgcXrcACyfIg1k3NsP+6HM1xE5gURFBZIxBk2QdrP5mpkMMizwq9klb?= =?us-ascii?Q?6XnYVmcYI4tMQdwWu/gnmY46gArDAyadUywMRSi9I8M1vEMniVrJn/hL6+Wx?= =?us-ascii?Q?DbOtUu4QcSjMp1HwGaZyLEkW377qCVoiIF5rOZPdF3DLj6PuAwSpTEiHnCCW?= =?us-ascii?Q?5S/Pg89d7XANLHtf+L8+a46jYLE0xbJm4kdgZrNo+ISQ0G5PNo2PnSCNLGUA?= =?us-ascii?Q?a7EhatcKfHHKUGf5bn5jvV4saTR++yIkf+iIE9ba19t16ukWEsfkbtL+WlIm?= =?us-ascii?Q?aI+C2eWStIgL6yO+vBmTcJ+jU1MGVDJoy1JHW00Vc0S/Iz8CRUp0LK7gbyq+?= =?us-ascii?Q?R/+k2EU0/MKUskZtALVtDd5EM6yDOvVYVFAUGG6XCorkrmvKlSKaHGdc/aBP?= =?us-ascii?Q?rcv4h5WHKJnQ2xZ8JfyDH3/5m+/na0OzUAu3qiHP7LwdgjJRRfMGjW/B/Z2M?= =?us-ascii?Q?3fOX8yUnfZsI8fpFwdmBC7E1Z4JY1Y2clFzTfCDCc03R78eEdRV+UPW7cjG2?= =?us-ascii?Q?Asv3SqSYnpdslnzcRfdTKZZdGbam63FN2b9Q/47yBdjc8iLLJjgo15xHqEYj?= =?us-ascii?Q?3ikInLTuAqPO0LVbDhJMcgYOlPFkiV4NzDtCZdyM9Y/ESaE+6fJBo5fpvPB0?= =?us-ascii?Q?Rv491bUyXUJyCxlnHUCsD0pV34YnMx9b4lHtmk0WLj92/ILCEQScbsMtNaRY?= =?us-ascii?Q?rKvQJKg5MHkpeohRsXaSB6iZG8XfA7OxfsnmNrzXV7TIarKWkz83N0lTvdZY?= =?us-ascii?Q?di7ZpPhC8jRYeQWa59e1Mk7VdfcRIKGGxfNNA4b9VzoojWdOTgSZYQCPWe5U?= =?us-ascii?Q?hg1yQpt34Kt1W6/+2wHCgWdSpoWfson1nhDqppblDrtO5wHeQcafxQTwEVQi?= =?us-ascii?Q?e45puozcUMCNREjhM7WueQUh3yeNG+dP7axR2O6m/whb6eY7pg46fTdqWyJG?= =?us-ascii?Q?uN8RQRSQkm69SaGt5fhYW/BVJAny3LdYwe4oJm7pc4UP24u4wEddPWFneo6x?= =?us-ascii?Q?+pZ9lykspRv3Mq9DM+Eoh8VL9jaw/kFlV3X3BUsXNlC8PH7nzH3jEI6fs8gL?= =?us-ascii?Q?NZGQuwX7hGR/a4tWCbN7zHSOuGyzdWqcvP/2Mfftcpanq2tkE5pGt/0FbNYd?= =?us-ascii?Q?wlRQm8K2UYZFaBGYifESPV8Mi/vSzEVG+rgJvNF4CBqpgvYsxtrhIoBhqi1y?= =?us-ascii?Q?zX65SATC1JZSHrzsd8zlMnicY3YvRIyvMGU6D10dL++jYVgZ1EhoZEY+nT0b?= =?us-ascii?Q?x0yjNRQZjIGjdI66QbbBDZPORmYGO+iS3Rv7r3n6MQtZccioo3mcvcY0Ig5p?= =?us-ascii?Q?hL4uIzT4xPPcXcuk/OJruFHq50TcqBt8+NLH8NiL9QDl1ky0/FM9V0OV95QL?= =?us-ascii?Q?bFtRwunfyWA8/n2Dafgh/v0IpXj6yvi5NPzcGz4OV/A1P2e3EAvcjn6KhQOI?= =?us-ascii?Q?1Q=3D=3D?= arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ET4F6XExGtULIAMZLkA+vsmDOyMQEOvQYpGBjK2XG/zHOeuxcBc8jSo3g2l1tWRgzyIGFJNkYu3RQg14aXql8JCRV9BWSu6EjlDWyG82Ujv5hAKZ+calzT64F5/OrDC5qdcv1bnMbcmvN3v9eGRXPCpzgR6CgCIxdG5rxhhQzutPotOY02yjngKLfbdT1aefQir70W5WGFC0e4I2CHbkq8QHzVpqMZp6mIkIGU6GqhmgmFH/rSTTVMhKssGFv0CoUWiV3eEz/aw4Ac1gQ6cnJ0NQNy3ke4zRrWuFUExjy9hOOrMkwyoLDYRKjcOaidsEufMtz/lCuAD0r6SgbQiQcA== arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wmc+OXkkYZ+6Wie6+0eBxRwEoPMgZ3ZvoUniQ59TAys=; b=cnuOwIeB0xPLqBWw6eqAV+/WzJFFlzFp42nKseR+2xihCfJ3tZj8vPr4NwY7OPDKDKYHtrvQhmlW5M3nAB0yDn5v4K9Phq6IGrfghm1kj2qk8KB9ozBwtJE3yyZMxbcUVcAp8Zrb6G58O8DrVFVarsTV72eYSwbu252VfkWy/8tkI4YovYM+KH+qFajC5Qhde1i1PmQFN2n664z7AwD9dOgrIHYYxXao0h8D9yQ4HPxjKAkWdjCmmprgiNC5EI1AdlNOfA6x9vbbcxpSgvIX4FF10qcVjVqMAkH+iFwxZvs7EECfaxEtPsQNc31KPjcg2H7rfbMbg71nikRmFiEKWA== arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none x-ms-exchange-crosstenant-authas: Internal x-ms-exchange-crosstenant-authsource: BL0PR11MB3250.namprd11.prod.outlook.com x-ms-exchange-crosstenant-network-message-id: cbb012e6-75dd-4375-1d14-08d9fd8dc9e6 x-ms-exchange-crosstenant-originalarrivaltime: 04 Mar 2022 03:19:26.7278 (UTC) x-ms-exchange-crosstenant-fromentityheader: Hosted x-ms-exchange-crosstenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d x-ms-exchange-crosstenant-mailboxtype: HOSTED x-ms-exchange-crosstenant-userprincipalname: ta+bKVNQH2QGdhGXhq8T19V+BSkfV/QI+cl6KUT7S0BuqwxB+xg5XjHyzTuK7bkKWw05HJC4nmndyyEgA9d50A== x-ms-exchange-transport-crosstenantheadersstamped: BN6PR11MB1603 x-originatororg: intel.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org > -----Original Message----- > From: Kevin Liu > Sent: Wednesday, December 29, 2021 5:37 PM > To: dev@dpdk.org > Cc: Yang, Qiming ; Zhang, Qi Z > ; Yang, SteveX ; Yigit, Ferr= uh > ; Liu, KevinX ; > stable@dpdk.org > Subject: [PATCH v2 1/2] net/ice: fix Tx offload path choice > > Testpmd forwards packets in checksum mode that it needs to calculate the > checksum of each layer's protocol. > > When setting the hardware calculates the outer UDP checksum and the > software calculates the outer IP checksum, the dev->tx_pkt_burst in > ice_set_tx_function is set to ice_xmit_pkts_vec_avx2. > The inner and outer UDP checksum of the tunnel packet after forwarding is > wrong.The dev->tx_pkt_burst should be set to ice_xmit_pkts. > > The patch adds RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM to > ICE_TX_NO_VECTOR_FLAGS,set dev->tx_pkt_burst to ice_xmit_pkts.After the > tunnel packet is forwarded, the inner and outer UDP checksum is correct. > > At the same time, the patch of "net/ice: fix Tx Checksum offload" will ca= use > interrupt errors in a special case that only inner IP and inner UDP check= sum > are set for hardware calculation.The patch is updating > ICE_TX_NO_VECTOR_FLAGS, the problem can be solved, so I will restore the > code modification of that patch. > > Fixes: 28f9002ab67f ("net/ice: add Tx AVX512 offload path") > Fixes: 295968d17407 ("ethdev: add namespace") > Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx") > Cc: stable@dpdk.org > > Signed-off-by: Kevin Liu > --- > drivers/net/ice/ice_rxtx.c | 41 ++++++------------- > drivers/net/ice/ice_rxtx_vec_common.h | 59 +++++++++------------------ > 2 files changed, 31 insertions(+), 69 deletions(-) > > diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c inde= x > 4f218bcd0d..041f4bc91f 100644 > --- a/drivers/net/ice/ice_rxtx.c > +++ b/drivers/net/ice/ice_rxtx.c > @@ -2501,35 +2501,18 @@ ice_txd_enable_checksum(uint64_t ol_flags, > << ICE_TX_DESC_LEN_MACLEN_S; > > /* Enable L3 checksum offloads */ > - /*Tunnel package usage outer len enable L3 checksum offload*/ > - if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) { > - if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) { > - *td_cmd |=3D ICE_TX_DESC_CMD_IIPT_IPV4_CSUM; > - *td_offset |=3D (tx_offload.outer_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_offload.outer_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_offload.outer_l3_len >> 2) << > - ICE_TX_DESC_LEN_IPLEN_S; > - } > - } else { > - if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) { > - *td_cmd |=3D ICE_TX_DESC_CMD_IIPT_IPV4_CSUM; > - *td_offset |=3D (tx_offload.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_offload.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_offload.l3_len >> 2) << > - ICE_TX_DESC_LEN_IPLEN_S; > - } > + if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) { > + *td_cmd |=3D ICE_TX_DESC_CMD_IIPT_IPV4_CSUM; > + *td_offset |=3D (tx_offload.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_offload.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_offload.l3_len >> 2) << > + ICE_TX_DESC_LEN_IPLEN_S; > } > > if (ol_flags & RTE_MBUF_F_TX_TCP_SEG) { diff --git > a/drivers/net/ice/ice_rxtx_vec_common.h > b/drivers/net/ice/ice_rxtx_vec_common.h > index 8ff01046e1..2dd2d83650 100644 > --- a/drivers/net/ice/ice_rxtx_vec_common.h > +++ b/drivers/net/ice/ice_rxtx_vec_common.h > @@ -250,7 +250,8 @@ ice_rxq_vec_setup_default(struct ice_rx_queue *rxq) > #define ICE_TX_NO_VECTOR_FLAGS ( \ > RTE_ETH_TX_OFFLOAD_MULTI_SEGS | \ > RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM | \ > - RTE_ETH_TX_OFFLOAD_TCP_TSO) > + RTE_ETH_TX_OFFLOAD_TCP_TSO | \ > + RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM) > > #define ICE_TX_VECTOR_OFFLOAD ( \ > RTE_ETH_TX_OFFLOAD_VLAN_INSERT | \ > @@ -364,45 +365,23 @@ ice_txd_enable_offload(struct rte_mbuf *tx_pkt, > uint32_t td_offset =3D 0; > > /* Tx Checksum Offload */ > - /*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; > - > - /* 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; > - } else if (ol_flags & RTE_MBUF_F_TX_IPV4) { > - td_cmd |=3D ICE_TX_DESC_CMD_IIPT_IPV4; > - td_offset |=3D (tx_pkt->outer_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->outer_l3_len >> 2) << > - ICE_TX_DESC_LEN_IPLEN_S; > - } > - } else { > - /* SET MACLEN */ > - td_offset |=3D (tx_pkt->l2_len >> 1) << > - ICE_TX_DESC_LEN_MACLEN_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->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; > - } > + /* SET MACLEN */ > + td_offset |=3D (tx_pkt->l2_len >> 1) << > + ICE_TX_DESC_LEN_MACLEN_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->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 L4 checksum offloads */ > -- > 2.33.1 Acked-by: Ting Xu