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 E6A18A00C4; Thu, 17 Feb 2022 20:22:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B077440395; Thu, 17 Feb 2022 20:22:56 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 1630F40150 for ; Thu, 17 Feb 2022 20:22:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645125775; x=1676661775; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ZX+WANqCDaCSjVPwBgjpl8oLDT2DKItX87pD1x6jb18=; b=XxZkVcx9CehYKb/ogLBB0yknAb0j2gtWzvEFagRqc1MCO+eXXp72QlrK I+KXnXgVCqUHC4dL0hqOoLUn32mV8F7HlkiD13xgWMUiKLBzOATvDQwky cjRUKaek2poOgiPN2gZq99IR1TsqphosaZ0eS1dvLB3FemBb1sQtdCnmU oOoMh0c3LGq3G25f2PvapSlgqCvQkjcQivgYZPxwybJY8fB53u+EPwEMo tsxTL5AzgL/x0ewGCaiKDMjpUdBOi1Xa7sycIwafMTqHEPIfnO3wAsDNL q7siq+eQE/OW2mSuOcshO16lpBzWRlB9C+vYhle73WYYUGTmldPsb6VgZ A==; X-IronPort-AV: E=McAfee;i="6200,9189,10261"; a="314220361" X-IronPort-AV: E=Sophos;i="5.88,376,1635231600"; d="scan'208";a="314220361" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2022 11:22:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,376,1635231600"; d="scan'208";a="777488580" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga005.fm.intel.com with ESMTP; 17 Feb 2022 11:22:49 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 17 Feb 2022 11:22:49 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 17 Feb 2022 11:22:49 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Thu, 17 Feb 2022 11:22:49 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.174) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Thu, 17 Feb 2022 11:22:48 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kt5LXZr1A0uYADsRRIlMvHMbw1Q2bxV5LuxWVSGAd6s8DlBh7hIX1p7fUsg5w73UJ5WTj2GpjDylfUNHfWN63mhDR/VUyFhD4Zut+KAyi2u0+yrEwAA4T4szS+CzkQFoTvkmSdo1S0IZ6/xEgZpfgRe/iWEkVPcEuk0ukXsyxRCvrJ7osSnnkrhRW0IjHZLyfV+hz0uYpR7tUwJu1b2kKugAg9wSW4jGTla/CwuuQLW2cWABvZ0DtB84SxUS4Tf3SGMSwWmEuu67OLwQp/wZ/DoPA3c9TVhNdNgIzSJhUNVBZXc+PMtOrwDD16u1c/uJtWu4G7AEgXTGd3BmghTruw== 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=Bc+4l/YhzxFr5VF9K+xcA22r71ZC9S6n8W/O00Redk0=; b=UuNoixsoa+l3KcSZWsRj+dcB4qr7b+lDTOrCDXc+NlJ2kbEdrT8IYyI9d0SDQUS/qVKvXq+jW9TGzrSvnD6/2xA3cPvluaXRyCcodZrTBCXLG8Usi/G3CyJldpcrlpryesE2LJxWrsecmaOI3LrSjF8BxYcMDAJGAzozpThss3pIhc7atTeG3UVr/GE259KWcKtNt29mjLkmckrfjA2FOGY4giWFrBJUBAixHJeScQeAK9uVGPLvRA5Ci6WhkC3ViYqFLoAAjmJEdDQU7bzS0XP0yQDpQdD7omb1og40RiFBPGQb8UVtvqOyC+hwSCtugljWm5HVLcv4ajv1H3bNVQ== 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 BY5PR11MB4482.namprd11.prod.outlook.com (2603:10b6:a03:1ca::33) by MWHPR11MB1534.namprd11.prod.outlook.com (2603:10b6:301:c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.15; Thu, 17 Feb 2022 19:22:47 +0000 Received: from BY5PR11MB4482.namprd11.prod.outlook.com ([fe80::cb1:647b:cf14:af61]) by BY5PR11MB4482.namprd11.prod.outlook.com ([fe80::cb1:647b:cf14:af61%4]) with mapi id 15.20.4995.016; Thu, 17 Feb 2022 19:22:47 +0000 From: "Ananyev, Konstantin" To: Nithin Dabilpuram , "jerinj@marvell.com" , "Nicolau, Radu" , Akhil Goyal CC: "dev@dpdk.org" Subject: RE: [PATCH v2 2/4] examples/ipsec-secgw: disable Tx chksum offload for inline Thread-Topic: [PATCH v2 2/4] examples/ipsec-secgw: disable Tx chksum offload for inline Thread-Index: AQHYG+vEpxlJntnZfUeswr6tca6hA6yYLrIQ Date: Thu, 17 Feb 2022 19:22:47 +0000 Message-ID: References: <20220206143022.13098-1-ndabilpuram@marvell.com> <20220207062641.26574-1-ndabilpuram@marvell.com> <20220207062641.26574-2-ndabilpuram@marvell.com> In-Reply-To: <20220207062641.26574-2-ndabilpuram@marvell.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 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: 4be3fd80-ea66-4916-f68f-08d9f24ae156 x-ms-traffictypediagnostic: MWHPR11MB1534:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1388; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Luz9gUWgaZ2TWFKlyIaqHKtwkltG8PiKLg9v/i+0ouKfb5lh6qAgEBXoF39vF3vI23Yjd1pR96KNhSWU80h8RIfPXwZIxDHvBOvXkjr1qGgmHJAliwqDN5iyQdQlwyq4KO1iwikKRf6AkkKU/VM9P+9q5PV05l0k73XicBGwzEe65GKVGtK66PSnNPI5T9ECkKJTgcB177JOkvr459Pk39UpA2bMt16huehnj69Evsfe72jEgVgBq6dKXRG1t0RA53DCu3tClqKUlOqxK2S/UoJAGGyJ+VAyY28zL0CMLDfqq1Sdxyfq0kobva+YVhN3OHSHeMvmjX5R70+HPl2i6GAIM2idMqUEltZbRPJfkHLqqHy335cC1NvKMmGnxvy6U/NGKT9BGih9lHlcZCE891zNaGOkTMUdTixamZ0oRgYDzeZYSTc/KQalHdY6eGFNjAQVrh3U5GwFzHOH6S6Er5xPiPHqZx4GoWV+tZzGXp3T97lmR4H7EoYv8XoW727WG7Hm4IZJTjCj0eSp/pvUQYmjOIcCvzrkKcrNo4NpzN0bbOszB+VX6FhsYA9d5XI86hVRfTOva3NloSHNpe3A/zEBa7z/sDIRM1ZmxygoHmyGACr/vPQ/KUorgQ72q/Hp5v0WaV0LkBnheHV52Va+kLRy4JufuxKwmCX+kIIvPOkC7ZHkIokkbIP8cIzS2H7owwUMICchBtRBXXqJrZLBbA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR11MB4482.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(9686003)(26005)(186003)(38070700005)(316002)(110136005)(5660300002)(122000001)(82960400001)(86362001)(8936002)(76116006)(7696005)(52536014)(508600001)(38100700002)(66946007)(66556008)(4326008)(2906002)(55016003)(66476007)(66446008)(64756008)(8676002)(33656002)(6506007)(83380400001)(71200400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?HiA+0hYBjitNvZevHt+wahN2IeGK9v1gDN6PCfB0f9UdyZx09gdoeW0ODnlt?= =?us-ascii?Q?QMuxiBLo9zuzHabUZSZGDLXWyVuA6PUspkDi8KnotILbrYIyiGAUDH5x1nEp?= =?us-ascii?Q?Y4udnHgED+psIq0x0gNyvFKu9XNBSuUL5dT+ErAUB5WEf7SjgpHT7ak/JEH0?= =?us-ascii?Q?RPR/FhSYKZHtlk83eIMG3HHGfZTOC80KfP1LgT6BXPIzAE8SMUf6NeWs5uKY?= =?us-ascii?Q?FhCEdBK+oBq23H4LUS9Zsqbb6a8tD7bhKDPoXz+d8j7C18GsN0ip6+B1/2hO?= =?us-ascii?Q?xvkdpBRTPmyZquZkLdUEKgnnmubLb+AoiGXOQl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tbe54uWkJsn/s/Ud7QtGqgsobdHPaFNICML/9Souwd6XMrvxs8xm?= =?us-ascii?Q?FtjLmDyd4/B04EWqsUh603FpS2xXxlCS43U/OdpeFOnTQjbCFsdi8/BqxroT?= =?us-ascii?Q?t8JaTa17+trNtgcLpBAlVdLvijLDnZcbWAxCT3qHSwscP2sn+XLV8YBhbNoX?= =?us-ascii?Q?C+ji9RX+dH+i1n6fH4yU5/7yMtt1kXTvktOZ3kYlAlhkaKn+iEAC+rX0L4nm?= =?us-ascii?Q?CGNldKeRTU6yL5GRh9+mB8ezdB2cyirhmYj/Rwo8Pz8nRD2VZx690qYel0Iz?= =?us-ascii?Q?y+xCTKy3u5f8i6JDRBP6SZzT35mkjYh732niuH6YZyJ6XgJmcjjLJbUY900W?= =?us-ascii?Q?j3NA+ceQVqA5qdfNt2I9k1OrL3HdPUaZqdJLWz6bH3zHglitxERCj7zqgYlt?= =?us-ascii?Q?CDaPd/4Bx/4AMOh51UahQySRiewSwnNtCVy+ymPkZKbxmmM+UhfjUMvrcN5i?= =?us-ascii?Q?ASqrwQ=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: BY5PR11MB4482.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4be3fd80-ea66-4916-f68f-08d9f24ae156 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Feb 2022 19:22:47.0929 (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: mZYnsbSnIMOV+0Kgn7SJseXmMqIaWOCTYTytvqbrxmAdOpq5YFX4mdpPINm86HgGoflg2GQMkWHe5zAclkMYAknVM06EoU/f6ei98ffKXSU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1534 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 > Enable Tx IPv4 checksum offload only when Tx inline crypto is needed. > In other cases such as Tx Inline protocol offload, checksum computation > is implicitly taken care by HW. The advantage of having only necessary > offloads enabled is that Tx burst function can be as light as possible. I am still not sure this is a right thing to do. Could you explain what will happen for lookaside modes? Would they always fall-back to SW cksum calculation? >=20 > Signed-off-by: Nithin Dabilpuram > --- > examples/ipsec-secgw/ipsec-secgw.c | 3 --- > examples/ipsec-secgw/sa.c | 9 +++++++++ > 2 files changed, 9 insertions(+), 3 deletions(-) >=20 > diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ip= sec-secgw.c > index 21abc0d..d8a9bfa 100644 > --- a/examples/ipsec-secgw/ipsec-secgw.c > +++ b/examples/ipsec-secgw/ipsec-secgw.c > @@ -2314,9 +2314,6 @@ port_init(uint16_t portid, uint64_t req_rx_offloads= , uint64_t req_tx_offloads) > local_port_conf.txmode.offloads |=3D > RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE; >=20 > - if (dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM) > - local_port_conf.txmode.offloads |=3D RTE_ETH_TX_OFFLOAD_IPV4_CKSUM; > - > printf("port %u configuring rx_offloads=3D0x%" PRIx64 > ", tx_offloads=3D0x%" PRIx64 "\n", > portid, local_port_conf.rxmode.offloads, > diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c > index 1839ac7..b878a48 100644 > --- a/examples/ipsec-secgw/sa.c > +++ b/examples/ipsec-secgw/sa.c > @@ -1790,6 +1790,15 @@ sa_check_offloads(uint16_t port_id, uint64_t *rx_o= ffloads, > RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL) > && rule->portid =3D=3D port_id) { > *tx_offloads |=3D RTE_ETH_TX_OFFLOAD_SECURITY; > + > + /* Checksum offload is not needed for inline protocol as > + * all processing for Outbound IPSec packets will be > + * implicitly taken care and for non-IPSec packets, > + * there is no need of IPv4 Checksum offload. > + */ > + if (rule_type =3D=3D RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO) > + *tx_offloads |=3D RTE_ETH_TX_OFFLOAD_IPV4_CKSUM; > + > if (rule->mss) > *tx_offloads |=3D RTE_ETH_TX_OFFLOAD_TCP_TSO; > } > -- > 2.8.4