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 A4E16A04A2; 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 2B3F84279F; Fri, 4 Mar 2022 04:19:37 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id C929D40150 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=1646363975; x=1677899975; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=l/shkmVFSPawfm5ATR0bj8KHly/oqoXXD1ZtX7jAkbU=; b=Ix5v7JFA2+inNydLnuIXtpUYTXTFmBIvEdqM2Ew2KFJTzcgAjXHlr9Yc 2Rp7hqM9NIHAYaFhyyyuptRxnm7O0vhpEoQ6mhZSh4rrdBgBemdgi0Ry0 z3B3drBdzuO2TYvZZNCZ0We6Q9FOxBSps1xucIJ9WHBua5Mmr1aa8lvpw GO7hNTmzpV1MaM63tI3IxKSrp6Gj6pK5wUEDCyK4IsHljnFAJtDn2Dyde DUWqXyNQL5h9CuACwIu6EzUAwh9OPWpKMcQJGiGSm6MJUh3Dxk+SCc0U5 mbkOuyoV6qiEBqhia2+oY8QDwGu18D7U3Ee4Ur5UQ6vX7u9uGomixldLS Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10275"; a="253814245" X-IronPort-AV: E=Sophos;i="5.90,154,1643702400"; d="scan'208";a="253814245" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.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="511708930" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by orsmga006.jf.intel.com with ESMTP; 03 Mar 2022 19:19:33 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX605.amr.corp.intel.com (10.22.229.18) 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:33 -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:33 -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:33 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=icruwP5wJUQkXIxV5oI5IfMjxWmtT0kGRkTXHUomJ16vdU1tG25AJkeaUxN2vZC3XYTL3zb2KLHdlj8NCog39C9krX7RIeojEZ6Jvv4wYNVXbXdwokgBkKpCiGZsu0azEygDdhTHB8cSf8p+Oxd55jAvaVxeJqkbESS5mA+JdZUlUWO2f69KNMvrSUrs46FAfwQhGMB4NgrSr+tlWBgxO4N1ekOqUdVFBji+yB9tWlHcw9RSJpQ7DNeeFURqXmzQpcwgMmK6qacsIyGP58jcfcranS5C677k5XOx+INcgDor8KCAzbHRP5+affBS7qgw9nXEcgBUtef2gJVBPwX3Ew== 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=RT3Z72mJA80klEPMImEtYo8L0Fn+34gVIBDxUcL4cSI=; b=Bb71KC0hUXPsxMQ6Qwthq4kirAg5y5b5tqj9mhEAddNYlIIJ3SA5U10rTR7HLB2IMz/x9663kKkUQ/79iLn476+/mdap3Czu5vCRbyly7WufkDuGiHGkkY/Mdy7/hJw0pPFSr6hYPf8BHN8iPa2KZOlTj5nDpbESUUh0PgcALNLhJFjEw/vximvQRCtZRBLqG5sxmvbESd0kwgP9+cpcYlex7V8ZW/LEqsV20Ll1XAwydMHaJ7f0ufHyHovi+ymO+SwM0If1sxxOoh0hSspem/czQbLhJwCeblSmmERUbKtwj1Y0vBARocCNl4xJ52e05b/WswvwlpQJYkX6gnWl7w== 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 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?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 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 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 >=20 > Testpmd forwards packets in checksum mode that it needs to calculate the > checksum of each layer's protocol. >=20 > 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. >=20 > 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. >=20 > 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. >=20 > 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 >=20 > 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(-) >=20 > 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; >=20 > /* 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; > } >=20 > 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) >=20 > #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; >=20 > /* 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; > } >=20 > /* Enable L4 checksum offloads */ > -- > 2.33.1 Acked-by: Ting Xu