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 3BC08A0547; Thu, 28 Oct 2021 13:33:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 222AC4115A; Thu, 28 Oct 2021 13:33:33 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 281424111A for ; Thu, 28 Oct 2021 13:33:30 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10150"; a="230239702" X-IronPort-AV: E=Sophos;i="5.87,189,1631602800"; d="scan'208";a="230239702" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2021 04:33:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,189,1631602800"; d="scan'208";a="573722012" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by FMSMGA003.fm.intel.com with ESMTP; 28 Oct 2021 04:33:29 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 28 Oct 2021 04:33:29 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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.2242.12 via Frontend Transport; Thu, 28 Oct 2021 04:33:29 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.105) 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.2242.12; Thu, 28 Oct 2021 04:33:28 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ahtt5HBBPPko0AbNm48cyltW5PaWLzl8HsJBNhnABWxH5/xy11obXSOC1G9MWKl/47tsUsuQfvaBv9YFS7xL7jwwfJt22a90J3GImrS2TfTR+YPm+hxjKYAdUXFDb1dYu8RIAX7310M6yoomgbKxh4q8hBleoYQbBnnd3r6IFQOB5NL1t/vTa4z2tVtLm21Z9tARKTFXF83/c8O1hNoRdeoq6ktSoeuT1mSFWjap8OxfFqgqYrBuUKtX94maiRiPKk/S6LNc6sC9uzY3kkGRjpKOOK6Z0F4qZoPR+iWuRrF5ziTByhYycsW+O5Q1hCdPpQCt18kl+rfLGd/m5/7d+Q== 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=pknljbgbwUH8DDXkjh1G4MGEWknaJRVfz9beD73nqlE=; b=U/UeS0Qa+xr8g7RB57huzj6bmOZOHLTA6/V1YOV9HJltDGK/1YN5toontPm7wzNrncPWAC2ceh8zkPZPufJ1zjL5uaGCQtSpvGbal//MA09LpLXeNTq5UigUZzZEWCDpnG+4G9i0/Sn7rf6p4pcWtY5onQ3gkTyeXi2fbNgC7lsLgtyAVyaV66ZB/Z4F7QstFf/aQl+UlIFIIkhJ8xbDlm/dYjhO9ls0Ytxj4YnQfVyVvWqx0GXNBFPPvuS0EAcnveiY63I+Y0ElMYBm0OQDc5V1EnEBRII5EXZIuEzJOIthOFcrfXhVR9dk3ZdqRDEOIxX2WStKtQ7aXJkRAOmnqw== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pknljbgbwUH8DDXkjh1G4MGEWknaJRVfz9beD73nqlE=; b=P+zCLBJyC+yt0awpfxLjEHkl5gdHlUZCywXhvFP7rO8dZalBD/yhVxNaS4mlafv9aTD+/zcgJccRHDUdTWSODwaomCi85C0N0Fd+SekDsJAftq9CO7mqV8kIGsob1if7EHX5nCN7najXSW2HZgjwrRZwNWuV0Sxd1vavJN+kAtc= Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by DM4PR11MB5439.namprd11.prod.outlook.com (2603:10b6:5:39b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Thu, 28 Oct 2021 11:33:27 +0000 Received: from DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::2c0c:5383:f814:3b4e]) by DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::2c0c:5383:f814:3b4e%6]) with mapi id 15.20.4649.015; Thu, 28 Oct 2021 11:33:27 +0000 From: "Ananyev, Konstantin" To: "Nicolau, Radu" , Akhil Goyal CC: "dev@dpdk.org" , "anoobj@marvell.com" , "Doherty, Declan" Thread-Topic: [PATCH v4 2/2] examples/ipsec-secgw: add support for TCP TSO Thread-Index: AQHXyzUUhKy8T7Ux0U2XlUSnqKPPlqvoR9uA Date: Thu, 28 Oct 2021 11:33:26 +0000 Message-ID: References: <20211027130345.2249987-1-radu.nicolau@intel.com> <20211027130345.2249987-3-radu.nicolau@intel.com> In-Reply-To: <20211027130345.2249987-3-radu.nicolau@intel.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: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 76b81ab9-4c88-4063-f642-08d99a06c253 x-ms-traffictypediagnostic: DM4PR11MB5439: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: fk2qppCBKXl+SknBvpa9Myd+yoVG1iJatmVjSSiG7S6WEiSbQpPqev5TM6u7r20my16xqNTlBtmcDSD7GOJCuLGd3wWV2xbE9ehMQ0akU1mzhxJH05uBOIGuAkvWE4NHPi+R/q3OFlLDhrg3Wd64cbD6BLnbmMwKTUwEn5i4PEgASgC6CzOi/7htgQTnLthda6+0osWRmzTto5LE0eQnj7FYJ3rMxGRMX/TuBUnAJ7vbsd1OnlYACnPXZqeqiqunN6UTPVutK38NBiDY/1uI0fLAsVtXrkuKnjZLD4Mhm1wxmY5KzWo739UqFmqI3+QJYYh9Qzqy+KeM0Zplt50fEgAyghzWf2RB47be/Mskg1Ra1pULc4oz++dPA35b1zGWZ6s+RAFq0qFCcdRjErX6htl7Czk3U96b6tF/BJCXoYzNHpAo+hhXAkUZncPrupiErn9ScYLTNwzQKtbvimXFHA2poV9DFYVLNMadoCebYyqEYc5TUmmXLVXpMO3npFx3AS22Tj7xaYtE31/MDKY+YeoZAlpsNXwUE0ePfO9aTdQP2fr4PlHESfz+uC8kQNFLEZF7blgNlJpi07QXeiHNDdtop4g01OYQRIEgXM2b0J7iGhT9aDa7SNnDNcHYnzJbgLVxQoVJU6ihSCK/fYsOM2oamhm6HlmwWfyVRXRjvhlhW5Tl7VBeZ5+0M0K8NOLyn0LFLRXphMJ8lcWIwEAhPw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4491.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(82960400001)(122000001)(5660300002)(86362001)(8936002)(83380400001)(33656002)(186003)(38100700002)(38070700005)(26005)(508600001)(55236004)(66946007)(52536014)(9686003)(7696005)(8676002)(55016002)(76116006)(2906002)(66476007)(66556008)(64756008)(66446008)(4326008)(54906003)(71200400001)(110136005)(316002)(6506007)(107886003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?DV3vH8w34htP5bIsr3r/vH9w2Xd7NNQfmY/TcaCDh+agXxsxSg7rzFgQsyAT?= =?us-ascii?Q?wHQJasBqTPElOYIA+DHO13y16lpVUryE2dSDTQjAUiFZXrM5vJCsbWG11w7S?= =?us-ascii?Q?ziBjcvwNwz5RyFwQmRjL9g2xLVybmPWDl5RbIft/tH38QvMPbauvQZ5mxBIr?= =?us-ascii?Q?D/CugRXLbu2ya3ykvYGhXv/i3cnPjzWdQ8m5zdK/sP5NyczszCJvnZ+2QKnk?= =?us-ascii?Q?EG/TNC3s7bNLaZyg2z0NS5GGqFdfaFWZQr4KUfdwnDMRodw1HvtIHyMwkbb7?= =?us-ascii?Q?kVrHsODHVdVhuIpG9qgOvSI/xZ7DQZfOm8J4C8qldkX9vWuT7Mr22RWRB/c4?= =?us-ascii?Q?/p+yOzEIu+38jdArrJmgkNFJ1GtIAZI61F2Yvzf9bLbHHYKh1sNLOGuwY9nX?= =?us-ascii?Q?zGQM8SA9boRZd+t3vLOnkHWDXvpaF7MHd41cR2W0w+lezEX4ZCvUK/3REGuv?= =?us-ascii?Q?2JWW3BdIL9tV3A+Xu8tw2ck2UE922LbhY9IYvba2OACxn+sTy3fn+iuMrre2?= =?us-ascii?Q?6aPYaHc3wcLg8oJ+BCg8onHcJ+UG/duCmlJFsC2UlZeHMvVJEHDAWPglbpzD?= =?us-ascii?Q?BGRax3crqMEgvKjpII131Bh310PURJeL3d/Eb/42+4Z0F3xHOy1cuwCj6EAu?= =?us-ascii?Q?do3By3AoM0zvfWxslRtq9gcAlpsYu4Le7I+OLyO17c21+ceB2VnsObbRjEd+?= =?us-ascii?Q?ZZzTL9TkoMuj0cOz+A08Pgks0uHoTTdfOST7uQmLnjNrUMPPQynU6ni3+lFk?= =?us-ascii?Q?OBIozEHPfca9IEJqVPuV+QiAxnFlwhyxSmX87x16LFYfePrQzxKzy/dBBYro?= =?us-ascii?Q?Ao9Zht+ex82wTgRwLGa6yynt9Lj+CUk6WFJ+TsS/ZJCxuuHSmWkyNPo1lkC7?= =?us-ascii?Q?ANga62HRzM4jVidQki5WnRzHPMNE6P8eZ/DZiRlSFuKJfKF7ybaur1NXHZ66?= =?us-ascii?Q?eGH+DMBm5XcKyroG//qzDOOKNnrEdZaVOIhAignnMMa7uVcyGfAvhK8Aq63L?= =?us-ascii?Q?P4lJWwJQDTo2zsZ/JvacN0EVGyMGzRu4ci7uQubFlji9pPxgevpTjefMGx2l?= =?us-ascii?Q?d+dFAOim4Me2kUl0h8N4dlzpWQZOuZhtulHUpQnQKjAD34UHGUYij25pLw8T?= =?us-ascii?Q?PsCeiDu5jqrhLnjejm04SnMfo5k6IV9RTzZQwEd23pXCbSvF7dBrT23AgjwQ?= =?us-ascii?Q?uboIAGL5LuKyLuu5Gm+xz+nP7eZH/JwMGHGDkDOIC6UgZNMH1j48XVRbXxZ7?= =?us-ascii?Q?CKqSaymj6Kce5GNqQFcOQh7Ufw48YXOsBQ8RNiHjRPMvKV4yNv8GKgeZTosM?= =?us-ascii?Q?lr1uTS1wsEB3r7CQWMJlmU/CbYHwZKmjmZ3nzT+OT4CJgtYUe7Zf2rj5AHHw?= =?us-ascii?Q?IPY6B5+JGK9cnyr2M7xa/2USdJQ85xhnhFOqFQBzdGylI1nFtfdvnzdvyoGO?= =?us-ascii?Q?AfJTT//KfZT/WztuDYK8jKL8oasLNdZMUUBpwz5eqotOHKLxvihXZjHXshSa?= =?us-ascii?Q?BxSfdzmXpsSVzLdXUHpLUPe6oDNRHcejMhclvB170dFmqVjIV7qO+Zss8NP4?= =?us-ascii?Q?+cwLPvDAqjmIf8D3BZyXXWWttfmm4vkIYrebXwSK7s0Sv0Ypibns65wi+Xob?= =?us-ascii?Q?g2F8eUauheK0mtGlAbQd/SkJNVuJaDTbjaPNYazcj5MMWXh9qI2NmsDN1SBf?= =?us-ascii?Q?X7/bNQ=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: DM6PR11MB4491.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 76b81ab9-4c88-4063-f642-08d99a06c253 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Oct 2021 11:33:26.9440 (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: 5X7YXI84BJIxJfatacdXLFQ5736FcAvcQTc0BSlsi50XGWI/QfA43r+ucvi0uwgPHMd4JntVpqqQuFqP3Dnr3vK8Y1TYPfiUERp3bBfbRsk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5439 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v4 2/2] examples/ipsec-secgw: add support for TCP TSO 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 Sender: "dev" > Add support to allow user to specific MSS for TCP TSO offload on a per SA > basis. MSS configuration in the context of IPsec is only supported for > outbound SA's in the context of an inline IPsec Crypto offload. >=20 > Signed-off-by: Declan Doherty > Signed-off-by: Radu Nicolau > --- > doc/guides/rel_notes/release_21_11.rst | 4 ++++ > doc/guides/sample_app_ug/ipsec_secgw.rst | 11 +++++++++++ > examples/ipsec-secgw/ipsec-secgw.c | 4 ++++ > examples/ipsec-secgw/ipsec.h | 1 + > examples/ipsec-secgw/ipsec_process.c | 22 +++++++++++++++++++++ > examples/ipsec-secgw/sa.c | 25 +++++++++++++++++++++--- > 6 files changed, 64 insertions(+), 3 deletions(-) >=20 > diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_note= s/release_21_11.rst > index b5b5abadee..35ececc3f2 100644 > --- a/doc/guides/rel_notes/release_21_11.rst > +++ b/doc/guides/rel_notes/release_21_11.rst > @@ -306,6 +306,10 @@ New Features > * Pcapng format with timestamps and meta-data. > * Fixes packet capture with stripped VLAN tags. >=20 > +* **IPsec Security Gateway sample application new features.** > + > + * Added support for TSO (only for inline crypto TCP packets) > + >=20 > Removed Items > ------------- > diff --git a/doc/guides/sample_app_ug/ipsec_secgw.rst b/doc/guides/sample= _app_ug/ipsec_secgw.rst > index 782574dd39..639d309a6e 100644 > --- a/doc/guides/sample_app_ug/ipsec_secgw.rst > +++ b/doc/guides/sample_app_ug/ipsec_secgw.rst > @@ -720,6 +720,17 @@ where each options means: >=20 > * *udp-encap* >=20 > + ```` > + > + * Maximum segment size for TSO offload, available for egress SAs only. > + > + * Optional: Yes, TSO offload not set by default > + > + * Syntax: > + > + * *mss N* N is the segment size in bytes > + > + > Example SA rules: >=20 > .. code-block:: console > diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ip= sec-secgw.c > index 4bdf99b62b..5fcf424efe 100644 > --- a/examples/ipsec-secgw/ipsec-secgw.c > +++ b/examples/ipsec-secgw/ipsec-secgw.c > @@ -398,6 +398,10 @@ prepare_one_packet(struct rte_mbuf *pkt, struct ipse= c_traffic *t) > pkt->l2_len =3D 0; > pkt->l3_len =3D sizeof(*iph4); > pkt->packet_type |=3D RTE_PTYPE_L3_IPV4; > + if (pkt->packet_type & RTE_PTYPE_L4_TCP) > + pkt->l4_len =3D sizeof(struct rte_tcp_hdr); > + else if (pkt->packet_type & RTE_PTYPE_L4_UDP) > + pkt->l4_len =3D sizeof(struct rte_udp_hdr); > } else if (eth->ether_type =3D=3D rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6)= ) { > int next_proto; > size_t l3len, ext_len; > diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h > index 8405c48171..2c3640833d 100644 > --- a/examples/ipsec-secgw/ipsec.h > +++ b/examples/ipsec-secgw/ipsec.h > @@ -137,6 +137,7 @@ struct ipsec_sa { > enum rte_security_ipsec_sa_direction direction; > uint8_t udp_encap; > uint16_t portid; > + uint16_t mss; > uint8_t fdir_qid; > uint8_t fdir_flag; >=20 > diff --git a/examples/ipsec-secgw/ipsec_process.c b/examples/ipsec-secgw/= ipsec_process.c > index 5012e1a6a4..bb56e97ad7 100644 > --- a/examples/ipsec-secgw/ipsec_process.c > +++ b/examples/ipsec-secgw/ipsec_process.c > @@ -222,6 +222,28 @@ prep_process_group(void *sa, struct rte_mbuf *mb[], = uint32_t cnt) > for (j =3D 0; j !=3D cnt; j++) { > priv =3D get_priv(mb[j]); > priv->sa =3D sa; > + /* setup TSO related fields if TSO enabled*/ > + if (priv->sa->mss) { > + /* TCP only */ > + uint32_t ptype =3D mb[j]->packet_type; > + if (ptype & (RTE_PTYPE_L4_TCP =3D=3D 0)) It should be: if ((ptype & RTE_PTYPE_L4_MASK) =3D=3D RTE_PTYPE_L4_TCP) ... With that fixed: Acked-by: Konstantin Ananyev > + continue; > + > + mb[j]->tso_segsz =3D priv->sa->mss; > + if ((IS_TUNNEL(priv->sa->flags))) { > + mb[j]->outer_l3_len =3D mb[j]->l3_len; > + mb[j]->outer_l2_len =3D mb[j]->l2_len; > + mb[j]->ol_flags |=3D > + (RTE_MBUF_F_TX_OUTER_IP_CKSUM | > + RTE_MBUF_F_TX_TUNNEL_ESP); > + } > + mb[j]->ol_flags |=3D (RTE_MBUF_F_TX_TCP_SEG | > + RTE_MBUF_F_TX_TCP_CKSUM); > + if (RTE_ETH_IS_IPV4_HDR(ptype)) > + mb[j]->ol_flags |=3D RTE_MBUF_F_TX_OUTER_IPV4; > + else > + mb[j]->ol_flags |=3D RTE_MBUF_F_TX_OUTER_IPV6; > + } > } > } >=20 > diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c > index 88dd30464f..97f265cc7b 100644 > --- a/examples/ipsec-secgw/sa.c > +++ b/examples/ipsec-secgw/sa.c > @@ -677,6 +677,16 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, > continue; > } >=20 > + if (strcmp(tokens[ti], "mss") =3D=3D 0) { > + INCREMENT_TOKEN_INDEX(ti, n_tokens, status); > + if (status->status < 0) > + return; > + rule->mss =3D atoi(tokens[ti]); > + if (status->status < 0) > + return; > + continue; > + } > + > if (strcmp(tokens[ti], "fallback") =3D=3D 0) { > struct rte_ipsec_session *fb; >=20 > @@ -970,7 +980,7 @@ sa_create(const char *name, int32_t socket_id, uint32= _t nb_sa) > } >=20 > static int > -check_eth_dev_caps(uint16_t portid, uint32_t inbound) > +check_eth_dev_caps(uint16_t portid, uint32_t inbound, uint32_t tso) > { > struct rte_eth_dev_info dev_info; > int retval; > @@ -999,6 +1009,12 @@ check_eth_dev_caps(uint16_t portid, uint32_t inboun= d) > "hardware TX IPSec offload is not supported\n"); > return -EINVAL; > } > + if (tso && (dev_info.tx_offload_capa & > + RTE_ETH_TX_OFFLOAD_TCP_TSO) =3D=3D 0) { > + RTE_LOG(WARNING, PORT, > + "hardware TCP TSO offload is not supported\n"); > + return -EINVAL; > + } > } > return 0; > } > @@ -1127,7 +1143,7 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct ip= sec_sa entries[], >=20 > if (ips->type =3D=3D RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL || > ips->type =3D=3D RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO) { > - if (check_eth_dev_caps(sa->portid, inbound)) > + if (check_eth_dev_caps(sa->portid, inbound, sa->mss)) > return -EINVAL; > } >=20 > @@ -1638,8 +1654,11 @@ sa_check_offloads(uint16_t port_id, uint64_t *rx_o= ffloads, > if ((rule_type =3D=3D RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO || > rule_type =3D=3D > RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL) > - && rule->portid =3D=3D port_id) > + && rule->portid =3D=3D port_id) { > *tx_offloads |=3D RTE_ETH_TX_OFFLOAD_SECURITY; > + if (rule->mss) > + *tx_offloads |=3D RTE_ETH_TX_OFFLOAD_TCP_TSO; > + } > } > return 0; > } > -- > 2.25.1