From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 3CC3EA0471 for ; Thu, 20 Jun 2019 14:46:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A13A01D3D9; Thu, 20 Jun 2019 14:46:20 +0200 (CEST) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30046.outbound.protection.outlook.com [40.107.3.46]) by dpdk.org (Postfix) with ESMTP id AD7B81D3A8 for ; Thu, 20 Jun 2019 14:46:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4CFx9hUbbc1WqKRna0LsBzVbEbDLwJsVIST0TpV34xA=; b=sSOh1ZmHYHSny1VIhAyGJ2FcoIMThx3GRcHNjcIhRAH4x3O4y19T1S69Ne93jDGVVTP+YmBpW5Y9/FEsQ4gD+Z30T8DvSdCOFkXoKYNY6Yq/6O44ssUmfKETabAfQ0foaDh1mC+35/WoMQW8ygG7jvrollPqiuhOTddaL4L+m9Q= Received: from VE1PR04MB6639.eurprd04.prod.outlook.com (20.179.235.82) by VE1PR04MB6733.eurprd04.prod.outlook.com (20.179.233.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1987.12; Thu, 20 Jun 2019 12:46:18 +0000 Received: from VE1PR04MB6639.eurprd04.prod.outlook.com ([fe80::a929:3d03:7bb7:d5e0]) by VE1PR04MB6639.eurprd04.prod.outlook.com ([fe80::a929:3d03:7bb7:d5e0%7]) with mapi id 15.20.1987.014; Thu, 20 Jun 2019 12:46:18 +0000 From: Akhil Goyal To: Konstantin Ananyev , "dev@dpdk.org" Thread-Topic: [PATCH v2] ipsec: support multi-segment packets Thread-Index: AQHVF0PVLktohJiGH02v2s0RI4OY+6akmsag Date: Thu, 20 Jun 2019 12:46:18 +0000 Message-ID: References: <20190527182328.12143-1-konstantin.ananyev@intel.com> <20190531000006.13918-1-konstantin.ananyev@intel.com> In-Reply-To: <20190531000006.13918-1-konstantin.ananyev@intel.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; x-originating-ip: [92.120.1.65] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ba65006f-c785-4187-d778-08d6f57d4a46 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VE1PR04MB6733; x-ms-traffictypediagnostic: VE1PR04MB6733: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 0074BBE012 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(366004)(136003)(376002)(346002)(189003)(199004)(6246003)(66946007)(68736007)(8676002)(256004)(71200400001)(305945005)(74316002)(99286004)(8936002)(71190400001)(81166006)(7736002)(81156014)(55016002)(64756008)(446003)(476003)(44832011)(76116006)(6506007)(66556008)(66476007)(66446008)(26005)(86362001)(14444005)(6436002)(7696005)(486006)(186003)(76176011)(11346002)(229853002)(33656002)(5660300002)(66066001)(14454004)(3846002)(53936002)(102836004)(2906002)(25786009)(6116002)(73956011)(9686003)(2501003)(110136005)(52536014)(478600001)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR04MB6733; H:VE1PR04MB6639.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: qI5W27X84eqxayXG5hZkSE8H/tnYxcUjDnExYEVWymRUMw5tWOTgf9PEIKP2IKmiZ36RGD3iDq/hPU3ocwSVuFUOuAxOMidHApMZPXyEdHuiPMY9rjpb6DOChbd/L13qVNZKyhBoVYluP0seIafZ8f9Mx5mqthZTTNiFPNFqH+9lg23hGa+TJoOGbIBRjUwIvzSZvfjxRt3hDBhxL/GVERCYK+Ovk9spznbcbOjIEVUBzLnWgdy9WKQz0CGAFJuoWax2nSH526Cmwm/7Ke0NtRP+/SEzlOYtPtj7lO8mLk183f56LTMBG5BSnmHKEV1BN4tNjq+GJfI7xlziCxrReSkp5YOPnG1oOWfmzDetJwpyTMO2wjzSQh9oH+TXO1n0JvtZPyauRqCVEnZRhHI3DwYBYwnK5FhKEVKMWWRpSjM= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba65006f-c785-4187-d778-08d6f57d4a46 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jun 2019 12:46:18.3818 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: akhil.goyal@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6733 Subject: Re: [dpdk-dev] [PATCH v2] ipsec: support multi-segment packets X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Hi Konstantin, >=20 > Add support for packets that consist of multiple segments. > Take into account that trailer bytes (padding, ESP tail, ICV) > can spawn across multiple segments. >=20 > Signed-off-by: Konstantin Ananyev > --- Which all action types does this patch work well with? Will it work for lookaside none and inline crypto case both? For the other 2, ipsec lib is not used. Also how can the SG support be tested? >=20 > v1 -> v2: > merge with latest mainline > fix build problem for RTE_BUILD_SHARED_LIB=3Dy > update programmer's guide >=20 > doc/guides/prog_guide/ipsec_lib.rst | 1 - > lib/librte_ipsec/Makefile | 3 +- > lib/librte_ipsec/esp_inb.c | 148 +++++++++++++++++++++------- > lib/librte_ipsec/misc.h | 61 ++++++++++++ > 4 files changed, 175 insertions(+), 38 deletions(-) >=20 > diff --git a/doc/guides/prog_guide/ipsec_lib.rst > b/doc/guides/prog_guide/ipsec_lib.rst > index 6fc08886f..63b75b652 100644 > --- a/doc/guides/prog_guide/ipsec_lib.rst > +++ b/doc/guides/prog_guide/ipsec_lib.rst > @@ -162,7 +162,6 @@ Limitations > The following features are not properly supported in the current version= : >=20 > * ESP transport mode for IPv6 packets with extension headers. > -* Multi-segment packets. > * Updates of the fields in inner IP header for tunnel mode > (as described in RFC 4301, section 5.1.2). > * Hard/soft limit for SA lifetime (time interval/byte count). > diff --git a/lib/librte_ipsec/Makefile b/lib/librte_ipsec/Makefile > index e80926baa..22f29d98a 100644 > --- a/lib/librte_ipsec/Makefile > +++ b/lib/librte_ipsec/Makefile > @@ -9,7 +9,8 @@ LIB =3D librte_ipsec.a > CFLAGS +=3D -O3 > CFLAGS +=3D $(WERROR_FLAGS) -I$(SRCDIR) > CFLAGS +=3D -DALLOW_EXPERIMENTAL_API > -LDLIBS +=3D -lrte_eal -lrte_mbuf -lrte_net -lrte_cryptodev -lrte_securit= y > +LDLIBS +=3D -lrte_eal -lrte_mempool -lrte_mbuf -lrte_net > +LDLIBS +=3D -lrte_cryptodev -lrte_security >=20 I believe this build dependency should also be updated in meson.build file = as well. > EXPORT_MAP :=3D rte_ipsec_version.map >=20 > diff --git a/lib/librte_ipsec/esp_inb.c b/lib/librte_ipsec/esp_inb.c > index 3e12ca103..819d2bf25 100644 > --- a/lib/librte_ipsec/esp_inb.c > +++ b/lib/librte_ipsec/esp_inb.c > @@ -104,6 +104,34 @@ inb_cop_prepare(struct rte_crypto_op *cop, > } > } >=20