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 6D0FD42B37; Thu, 18 May 2023 08:53:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0682B42B71; Thu, 18 May 2023 08:53:26 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 1633C40E25 for ; Thu, 18 May 2023 08:53:21 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34I3EC0Q006407; Wed, 17 May 2023 23:53:20 -0700 Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2170.outbound.protection.outlook.com [104.47.57.170]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3qmyexb4a9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 May 2023 23:53:20 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AGxxWykQjaklRbu0GU5k+geCMoG873Z1jpmifqjRcnK/aobnkk03NBoshuTdO81+yryo9RffNHVqNcP7PfELfXGh7B4dnNw5tE1kGV9Zhy4O/yG1bdm2lBiIxTHUvxO/Hse32WtdK8kV38CoIL43N825n1p8GgOoDsboWUUPthYewF+3+qD+UOtr+OPi9gleUuw9WK9yXc6wn0dFlyrmxvcGsQl6c8C1PqT89kSfohIGRgu4HbIRorp6Dy2/Ws493Z0ACAk7Dg1A4avE4bmnra1HytKbsDYYL0g1xFrZp2gfmCd3Qpje39oSbWikQwlrp2Q5PwCJ0dtWfrxuxh1esg== 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=AcKmgh5YJBAEe3XemN4NN/ca1iglJMOjSofePDj6e+c=; b=ETuPqnU1zB87QKi0y/WMsmD9jbFoOrr7sLnfxhcrALdngqG+1xJf/OtfejZrZywdWf50H2mRyt9zUakdMFOLlLV+jDjsyycPE5UuVOus78+ajN2kDCfX+1sIPUJcQ4bbd8Gzkmd5t0fYCn7ZQMcKjic5WjQeJZv2xF7FX2alMCbHuSN8M51bkfX1a27Y533biwpbG61p3C/oCOmo9hLe/phHHc52ct3lNvm+EBP6o/3ij+Ul16tjwwYXHiTNNBcB1InseGJqL3WMOJT54dIb2+dnrDfvZggv3yJ93i83HoCOZxAbPZYa4c2OS1QPTlsb7a3xzU7GCZrqaJCA8brKAw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AcKmgh5YJBAEe3XemN4NN/ca1iglJMOjSofePDj6e+c=; b=cEceyB06o56Qh146ioXzpqnuwLPOp8Rdn/TuZrU+KIk9nGe/i02DIjsxQgLlInOKyP4h6xVWLT1JFNK9S5djmA+CrvJmn9cBRaPybQCCYadnJlY1kUVmspzhnOLdJCfiMN1NxwgirOogmOE9YRXibaIkrLC1qj3oajlKC6RV5Ig= Received: from PH0PR18MB4672.namprd18.prod.outlook.com (2603:10b6:510:c9::16) by CH2PR18MB3302.namprd18.prod.outlook.com (2603:10b6:610:26::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.17; Thu, 18 May 2023 06:53:13 +0000 Received: from PH0PR18MB4672.namprd18.prod.outlook.com ([fe80::9225:bda3:4faa:a84b]) by PH0PR18MB4672.namprd18.prod.outlook.com ([fe80::9225:bda3:4faa:a84b%4]) with mapi id 15.20.6411.017; Thu, 18 May 2023 06:53:13 +0000 From: Anoob Joseph To: Akhil Goyal , Thomas Monjalon , Jerin Jacob Kollanukkaran , Konstantin Ananyev , Bernard Iremonger CC: Hemant Agrawal , =?iso-8859-1?Q?Mattias_R=F6nnblom?= , Kiran Kumar Kokkilagadda , Volodymyr Fialko , "dev@dpdk.org" , Olivier Matz Subject: RE: [PATCH v2 02/22] lib: add pdcp protocol Thread-Topic: [PATCH v2 02/22] lib: add pdcp protocol Thread-Index: AQHZiAtrqtKeoy/hzEyY8C+Y79fxFa9d5kjA Date: Thu, 18 May 2023 06:53:12 +0000 Message-ID: References: <20221222092522.1628-1-anoobj@marvell.com> <20230414174512.642-1-anoobj@marvell.com> <20230414174512.642-3-anoobj@marvell.com> In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-dg-rorf: true x-dg-ref: =?iso-8859-1?Q?PG1ldGE+PGF0IG5tPSJib2R5LnR4dCIgcD0iYzpcdXNlcnNcYW5vb2JqXG?= =?iso-8859-1?Q?FwcGRhdGFccm9hbWluZ1wwOWQ4NDliNi0zMmQzLTRhNDAtODVlZS02Yjg0?= =?iso-8859-1?Q?YmEyOWUzNWJcbXNnc1xtc2ctYTU4ZTE0ZjMtZjU0OC0xMWVkLTljNTItNG?= =?iso-8859-1?Q?MwMzRmNWY5YjRmXGFtZS10ZXN0XGE1OGUxNGY0LWY1NDgtMTFlZC05YzUy?= =?iso-8859-1?Q?LTRjMDM0ZjVmOWI0ZmJvZHkudHh0IiBzej0iMjcxNzAiIHQ9IjEzMzI4OD?= =?iso-8859-1?Q?Y2Mzg5NTk1OTgzMyIgaD0iOTk4bG5UYW9obXF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UFBQUFBQUFB?= =?iso-8859-1?Q?QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU?= =?iso-8859-1?Q?FBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB?= =?iso-8859-1?Q?QUFBQUFBQUFBQUFBQUFBQUFBQUFB?= x-dg-reffour: QUFBQUFBQUFDQUFBQUFBQUFBQUFBQUFBQVFBQUFBQUFBQUFDQUFBQUFBQT0iLz48L21ldGE+ x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR18MB4672:EE_|CH2PR18MB3302:EE_ x-ms-office365-filtering-correlation-id: d9df873c-c9b8-4a9a-f472-08db576c8ca2 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Y+qOdwhM8ic6lKDOwf+qzCBO0/Wu4EPGnfHlj3VMDcZZwNew+N7CqlbPNNEKwTV06leqV808FFt0QtSDW+6r9KlTyCulQG53qwUPmX2KHhFHAgKrAc9/T1IjQOHTL5y7IWmXLnYEJWmxSugIVmEM7XacZzvLboQpihql7niZ4Om7M038yXQijNrE9OakThCsOIR8qnvqV1/basnqQJ7wCbNcnuv3iEvWMiIPLeQO2DzmbXkjn7Xh8r512/zjoLx6LpVKzs12DcxbYu6xMRsNTbJU/wSKN0a+pDbYRyNS5L2AOEJkSUjBNYA6YM0LKk2k7wrEckluB74G2+sTHn9BUu17oesvK6x0IoH/bm52r2stXQkofZ+cHNtXzmrv4ArxAxcGHLNNL9WaiRWq7/JsckrQSM4lhlc4YxqN7m/ZOqM1ut8b3iYIUcrNQZHIhv8/94/cpux4RfzEfJi2KRvV3CgBU91GT/fgHUR7HOJbA6wZuxLmfeXuKtzwsKrZXzAdgaC6iW3suSu/i5puZxNBpqDTcRtZhto+5gOIJnRAmRoooNe1YZ9YSPp/c+lM1aUnqlPjCj4XbXHR9r8cb4/PU1HT2aH959CqARviPk9cqkyyu/zyV0N74YTdozHonDH2 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4672.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(366004)(39860400002)(136003)(396003)(376002)(451199021)(38070700005)(66574015)(33656002)(66556008)(76116006)(64756008)(316002)(66476007)(66446008)(478600001)(4326008)(54906003)(110136005)(86362001)(7696005)(83380400001)(6506007)(53546011)(186003)(26005)(66946007)(9686003)(8936002)(2906002)(5660300002)(30864003)(8676002)(52536014)(55016003)(71200400001)(122000001)(41300700001)(38100700002)(579004)(559001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?MEpHcG1MuWwjU+umfKQPSH/kMrisPfQbrwDFzUD7OEK7GHVGht9cg2/GPZ?= =?iso-8859-1?Q?8ElVH52cxtyNqt/XZQ/J8nVB6dWlZW63d7JDF+1ifHDyUPvCIEV6DMRNAT?= =?iso-8859-1?Q?KqBbCWN+1Vc6aIfTnAlwlhlfJwKB/cXL2SXXL3B7GLGeG7flP/KEwYn9VD?= =?iso-8859-1?Q?/T0JHHcWPrR8kyqmBi/fAC4af1IMRBnRwzHcz81RGHyN5XeH/Ujx+0xAdK?= =?iso-8859-1?Q?yakkXn0AFTwNxxhKpPf59algYleHyQYhP8n5i+HbSSYA9DQWgzyxJ349VL?= =?iso-8859-1?Q?GNRh2JhK6DW/P8V5wxRsxOFHtlHidwAlPNCRy1qXRr6PARTXvHwwWdqRVG?= =?iso-8859-1?Q?Uvr5A9ZhX7d3ORygkly+CixU5f9M8+lw8kg2LDflE0f67RLw8NRvVJfG4T?= =?iso-8859-1?Q?gssiu3om0BT3YmpjN0HiLApqFx+Is7IRdzH7vmAhsQzN8QfwrhbrAiTz/6?= =?iso-8859-1?Q?R79zXi478k+3Nb0h0o/rLLq5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1?Q?ibDI9v3sj0nOedHPmRHBJ3d7M1bEgPpPyGARsEIhfgmRM2sX0p/gq93g2/?= =?iso-8859-1?Q?HEe1RMQ54hHoHnnezEk3CSAERliVWGZWk+v+//0VV5r4w4QkMSblt6QgYn?= =?iso-8859-1?Q?mOkEtUDnGtpVPkgKdGITMMQmo9fCnFMFO+thgQHHEGfWsWluQoEdsZxdzJ?= =?iso-8859-1?Q?a6/ku59C0jCpwJKpLJoFMsGGeZ4jMMOebVYrqJBtdIpO0lL1C8VUktssIY?= =?iso-8859-1?Q?qzq/0e1YLh/BY=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB4672.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9df873c-c9b8-4a9a-f472-08db576c8ca2 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 May 2023 06:53:13.0131 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: BaXJ+bF9zfK5Ayu0Q2OQOR+3CMHXoXIHEmtKvdxnNa34v7JGYJuwZg3ym/lAL6Uqf06zMImPW63xWA7kpR2e9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR18MB3302 X-Proofpoint-GUID: MAPYCrOVDTlKb_9CGyPpniDi7JxNZFPl X-Proofpoint-ORIG-GUID: MAPYCrOVDTlKb_9CGyPpniDi7JxNZFPl X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-18_04,2023-05-17_02,2023-02-09_01 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 Hi Akhil, Thanks for the review. Please see inline. Thanks, Anoob > -----Original Message----- > From: Akhil Goyal > Sent: Tuesday, May 16, 2023 9:01 PM > To: Anoob Joseph ; Thomas Monjalon > ; Jerin Jacob Kollanukkaran ; > Konstantin Ananyev ; Bernard > Iremonger > Cc: Hemant Agrawal ; Mattias R=F6nnblom > ; Kiran Kumar Kokkilagadda > ; Volodymyr Fialko ; > dev@dpdk.org; Olivier Matz > Subject: RE: [PATCH v2 02/22] lib: add pdcp protocol >=20 > Hi Anoob, >=20 > Fix check patch issues and please see some inline comments. [Anoob] Checkpatch warnings are false positives. I'll try to work around co= uple of them. Rest we may need to ignore. >=20 > > Subject: [PATCH v2 02/22] lib: add pdcp protocol > > > > Add Packet Data Convergence Protocol (PDCP) processing library. > > > > The library is similar to lib_ipsec which provides IPsec processing > > capabilities in DPDK. > > > > PDCP would involve roughly the following options, 1. Transfer of user > > plane data 2. Transfer of control plane data 3. Header compression 4. > > Uplink data compression 5. Ciphering and integrity protection > > > > PDCP library provides following control path APIs that is used to > > configure various PDCP entities, 1. rte_pdcp_entity_establish() 2. > > rte_pdcp_entity_suspend() 3. rte_pdcp_entity_release() > > > > Signed-off-by: Anoob Joseph > > Signed-off-by: Kiran Kumar K > > Signed-off-by: Volodymyr Fialko > > --- > > doc/api/doxy-api-index.md | 3 +- > > doc/api/doxy-api.conf.in | 1 + > > lib/meson.build | 1 + > > lib/pdcp/meson.build | 17 +++++ > > lib/pdcp/pdcp_crypto.c | 21 +++++ > > lib/pdcp/pdcp_crypto.h | 15 ++++ > > lib/pdcp/pdcp_entity.h | 95 +++++++++++++++++++++++ > > lib/pdcp/pdcp_process.c | 138 > +++++++++++++++++++++++++++++++++ > > lib/pdcp/pdcp_process.h | 13 ++++ > > lib/pdcp/rte_pdcp.c | 138 +++++++++++++++++++++++++++++++++ > > lib/pdcp/rte_pdcp.h | 157 > ++++++++++++++++++++++++++++++++++++++ > > lib/pdcp/version.map | 10 +++ > > 12 files changed, 608 insertions(+), 1 deletion(-) create mode > > 100644 lib/pdcp/meson.build create mode 100644 lib/pdcp/pdcp_crypto.c > > create mode 100644 lib/pdcp/pdcp_crypto.h create mode 100644 > > lib/pdcp/pdcp_entity.h create mode 100644 lib/pdcp/pdcp_process.c > > create mode 100644 lib/pdcp/pdcp_process.h create mode 100644 > > lib/pdcp/rte_pdcp.c create mode 100644 lib/pdcp/rte_pdcp.h create > > mode 100644 lib/pdcp/version.map > > > > diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md > > index debbe4134f..cd7a6cae44 100644 > > --- a/doc/api/doxy-api-index.md > > +++ b/doc/api/doxy-api-index.md > > @@ -128,7 +128,8 @@ The public API headers are grouped by topics: > > [eCPRI](@ref rte_ecpri.h), > > [L2TPv2](@ref rte_l2tpv2.h), > > [PPP](@ref rte_ppp.h), > > - [PDCP hdr](@ref rte_pdcp_hdr.h) > > + [PDCP hdr](@ref rte_pdcp_hdr.h), > > + [PDCP](@ref rte_pdcp.h) > > > > - **QoS**: > > [metering](@ref rte_meter.h), > > diff --git a/doc/api/doxy-api.conf.in b/doc/api/doxy-api.conf.in index > > d230a19e1f..58789308a9 100644 > > --- a/doc/api/doxy-api.conf.in > > +++ b/doc/api/doxy-api.conf.in > > @@ -62,6 +62,7 @@ INPUT =3D @TOPDIR@/doc/api/doxy-api= - > > index.md \ > > @TOPDIR@/lib/net \ > > @TOPDIR@/lib/pcapng \ > > @TOPDIR@/lib/pci \ > > + @TOPDIR@/lib/pdcp \ > > @TOPDIR@/lib/pdump \ > > @TOPDIR@/lib/pipeline \ > > @TOPDIR@/lib/port \ diff --git > > a/lib/meson.build b/lib/meson.build index 0812ce6026..d217c04ea9 > > 100644 > > --- a/lib/meson.build > > +++ b/lib/meson.build > > @@ -64,6 +64,7 @@ libraries =3D [ > > 'flow_classify', # flow_classify lib depends on pkt framework = table lib > > 'graph', > > 'node', > > + 'pdcp', # pdcp lib depends on crypto and security > > ] > > > > optional_libs =3D [ > > diff --git a/lib/pdcp/meson.build b/lib/pdcp/meson.build new file mode > > 100644 index 0000000000..ccaf426240 > > --- /dev/null > > +++ b/lib/pdcp/meson.build > > @@ -0,0 +1,17 @@ > > +# SPDX-License-Identifier: BSD-3-Clause # Copyright(C) 2023 Marvell. > > + > > +if is_windows > > + build =3D false > > + reason =3D 'not supported on Windows' > > + subdir_done() > > +endif > > + > > +sources =3D files( > > + 'pdcp_crypto.c', > > + 'pdcp_process.c', > > + 'rte_pdcp.c', > > + ) > > +headers =3D files('rte_pdcp.h') > > + > > +deps +=3D ['mbuf', 'net', 'cryptodev', 'security'] > > diff --git a/lib/pdcp/pdcp_crypto.c b/lib/pdcp/pdcp_crypto.c new file > > mode 100644 index 0000000000..755e27ec9e > > --- /dev/null > > +++ b/lib/pdcp/pdcp_crypto.c > > @@ -0,0 +1,21 @@ > > +/* SPDX-License-Identifier: BSD-3-Clause > > + * Copyright(C) 2023 Marvell. > > + */ > > + > > +#include > > + > > +#include "pdcp_crypto.h" > > + > > +int > > +pdcp_crypto_sess_create(struct rte_pdcp_entity *entity, const struct > > rte_pdcp_entity_conf *conf) > > +{ > > + RTE_SET_USED(entity); > > + RTE_SET_USED(conf); > > + return 0; > > +} > > + > > +void > > +pdcp_crypto_sess_destroy(struct rte_pdcp_entity *entity) { > > + RTE_SET_USED(entity); > > +} > > diff --git a/lib/pdcp/pdcp_crypto.h b/lib/pdcp/pdcp_crypto.h new file > > mode 100644 index 0000000000..6563331d37 > > --- /dev/null > > +++ b/lib/pdcp/pdcp_crypto.h > > @@ -0,0 +1,15 @@ > > +/* SPDX-License-Identifier: BSD-3-Clause > > + * Copyright(C) 2023 Marvell. > > + */ > > + > > +#ifndef PDCP_CRYPTO_H > > +#define PDCP_CRYPTO_H > > + > > +#include > > + > > +int pdcp_crypto_sess_create(struct rte_pdcp_entity *entity, > > + const struct rte_pdcp_entity_conf *conf); > > + > > +void pdcp_crypto_sess_destroy(struct rte_pdcp_entity *entity); > > + > > +#endif /* PDCP_CRYPTO_H */ > > diff --git a/lib/pdcp/pdcp_entity.h b/lib/pdcp/pdcp_entity.h new file > > mode 100644 index 0000000000..ca1d56b516 > > --- /dev/null > > +++ b/lib/pdcp/pdcp_entity.h > > @@ -0,0 +1,95 @@ > > +/* SPDX-License-Identifier: BSD-3-Clause > > + * Copyright(C) 2023 Marvell. > > + */ > > + > > +#ifndef PDCP_ENTITY_H > > +#define PDCP_ENTITY_H > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +struct entity_priv; > > + > > +/* IV generation function based on the entity configuration */ > > +typedef void (*iv_gen_t)(struct rte_crypto_op *cop, const struct > > +entity_priv > > *en_priv, > > + uint32_t count); > > + > > +struct entity_state { > > + uint32_t rx_next; > > + uint32_t tx_next; > > + uint32_t rx_deliv; > > + uint32_t rx_reord; > > +}; > > + > > +/* > > + * Layout of PDCP entity: [rte_pdcp_entity] [entity_priv] > > +[entity_dl/ul] */ > > + > > +struct entity_priv { > > + /** Crypto sym session. */ > > + struct rte_cryptodev_sym_session *crypto_sess; > > + /** Entity specific IV generation function. */ > > + iv_gen_t iv_gen; > > + /** Entity state variables. */ > > + struct entity_state state; > > + /** Flags. */ > > + struct { > > + /** PDCP PDU has 4 byte MAC-I. */ > > + uint64_t is_authenticated : 1; > > + /** Cipher offset & length in bits. */ > > + uint64_t is_ciph_in_bits : 1; > > + /** Auth offset & length in bits. */ > > + uint64_t is_auth_in_bits : 1; > > + /** Is UL/transmitting PDCP entity. */ > > + uint64_t is_ul_entity : 1; > > + /** Is NULL auth. */ > > + uint64_t is_null_auth : 1; > > + } flags; > > + /** Crypto op pool. */ > > + struct rte_mempool *cop_pool; > > + /** PDCP header size. */ > > + uint8_t hdr_sz; > > + /** PDCP AAD size. For AES-CMAC, additional message is prepended > for > > the operation. */ > > + uint8_t aad_sz; > > + /** Device ID of the device to be used for offload. */ > > + uint8_t dev_id; > > +}; > > + > > +struct entity_priv_dl_part { > > + /* NOTE: when in-order-delivery is supported, post PDCP packets > > +would > > need to cached. */ > > + uint8_t dummy; > > +}; > > + > > +struct entity_priv_ul_part { > > + /* > > + * NOTE: when re-establish is supported, plain PDCP packets & > COUNT > > values need to be > > + * cached. > > + */ > > + uint8_t dummy; > > +}; > > + > > +static inline struct entity_priv * > > +entity_priv_get(const struct rte_pdcp_entity *entity) { > > + return RTE_PTR_ADD(entity, sizeof(struct rte_pdcp_entity)); } > > + > > +static inline struct entity_priv_dl_part * entity_dl_part_get(const > > +struct rte_pdcp_entity *entity) { > > + return RTE_PTR_ADD(entity, sizeof(struct rte_pdcp_entity) + > > sizeof(struct entity_priv)); > > +} > > + > > +static inline struct entity_priv_ul_part * entity_ul_part_get(const > > +struct rte_pdcp_entity *entity) { > > + return RTE_PTR_ADD(entity, sizeof(struct rte_pdcp_entity) + > > sizeof(struct entity_priv)); > > +} > > + > > +static inline int > > +pdcp_hdr_size_get(enum rte_security_pdcp_sn_size sn_size) { > > + return RTE_ALIGN_MUL_CEIL(sn_size, 8) / 8; } > > + > > +#endif /* PDCP_ENTITY_H */ > > diff --git a/lib/pdcp/pdcp_process.c b/lib/pdcp/pdcp_process.c new > > file mode 100644 index 0000000000..d4b158536d > > --- /dev/null > > +++ b/lib/pdcp/pdcp_process.c > > @@ -0,0 +1,138 @@ > > +/* SPDX-License-Identifier: BSD-3-Clause > > + * Copyright(C) 2023 Marvell. > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include "pdcp_crypto.h" > > +#include "pdcp_entity.h" > > +#include "pdcp_process.h" > > + > > +static int > > +pdcp_crypto_xfrm_get(const struct rte_pdcp_entity_conf *conf, struct > > rte_crypto_sym_xform **c_xfrm, > > + struct rte_crypto_sym_xform **a_xfrm) { > > + *c_xfrm =3D NULL; > > + *a_xfrm =3D NULL; > > + > > + if (conf->crypto_xfrm =3D=3D NULL) > > + return -EINVAL; > > + > > + if (conf->crypto_xfrm->type =3D=3D RTE_CRYPTO_SYM_XFORM_CIPHER) > { > > + *c_xfrm =3D conf->crypto_xfrm; > > + *a_xfrm =3D conf->crypto_xfrm->next; > > + } else if (conf->crypto_xfrm->type =3D=3D > > RTE_CRYPTO_SYM_XFORM_AUTH) { > > + *a_xfrm =3D conf->crypto_xfrm; > > + *c_xfrm =3D conf->crypto_xfrm->next; > > + } else { > > + return -EINVAL; > > + } > > + > > + return 0; > > +} > > + > > +static int > > +pdcp_entity_priv_populate(struct entity_priv *en_priv, const struct > > rte_pdcp_entity_conf *conf) > > +{ > > + struct rte_crypto_sym_xform *c_xfrm, *a_xfrm; > > + int ret; > > + > > + /** > > + * flags.is_authenticated > > + * > > + * MAC-I would be added in case of control plane packets and when > > authentication > > + * transform is not NULL. > > + */ > > + > > + if (conf->pdcp_xfrm.domain =3D=3D > > RTE_SECURITY_PDCP_MODE_CONTROL) > > + en_priv->flags.is_authenticated =3D 1; >=20 > This check should be added after getting the xfrm. > If domain =3D=3D control and a_xfrm is NULL, then it should be error, rig= ht? [Anoob] Lib PDCP would handle such cases. Even if a_xfrm is non NULL but is= NULL auth, it is lib PDCP which would add zeroized digest. And a_xfrm =3D= =3D NULL is also treated as NULL auth generally. The comment above this exp= lains the same. Idea is to have lib PDCP handle all possible cases rather t= han putting too much restrictions on both app & PMD. >=20 > > + > > + ret =3D pdcp_crypto_xfrm_get(conf, &c_xfrm, &a_xfrm); > > + if (ret) > > + return ret; > > + > > + if (a_xfrm !=3D NULL) > > + en_priv->flags.is_authenticated =3D 1; > > + > > + /** > > + * flags.is_ciph_in_bits > > + * > > + * For ZUC & SNOW3G cipher algos, offset & length need to be > > +provided > > in bits. > > + */ > > + > > + if ((c_xfrm->cipher.algo =3D=3D RTE_CRYPTO_CIPHER_SNOW3G_UEA2) > || > > + (c_xfrm->cipher.algo =3D=3D RTE_CRYPTO_CIPHER_ZUC_EEA3)) > > + en_priv->flags.is_ciph_in_bits =3D 1; > > + > > + /** > > + * flags.is_auth_in_bits > > + * > > + * For ZUC & SNOW3G authentication algos, offset & length need to > be > > provided in bits. > > + */ > > + > > + if (a_xfrm !=3D NULL) { > > + if ((a_xfrm->auth.algo =3D=3D > RTE_CRYPTO_AUTH_SNOW3G_UIA2) > > || > > + (a_xfrm->auth.algo =3D=3D RTE_CRYPTO_AUTH_ZUC_EIA3)) > > + en_priv->flags.is_auth_in_bits =3D 1; > > + } > > + > > + /** > > + * flags.is_ul_entity > > + * > > + * Indicate whether the entity is UL/transmitting PDCP entity. > > + */ > > + if (conf->pdcp_xfrm.pkt_dir =3D=3D RTE_SECURITY_PDCP_UPLINK) > > + en_priv->flags.is_ul_entity =3D 1; > > + > > + /** > > + * flags.is_null_auth > > + * > > + * For NULL auth, 4B zeros need to be added by lib PDCP. Indicate > that > > + * algo is NULL auth to perform the same. > > + */ > > + if (a_xfrm !=3D NULL && a_xfrm->auth.algo =3D=3D > > RTE_CRYPTO_AUTH_NULL) > > + en_priv->flags.is_null_auth =3D 1; > > + > > + /** > > + * hdr_sz > > + * > > + * PDCP header size of the entity > > + */ > > + en_priv->hdr_sz =3D pdcp_hdr_size_get(conf->pdcp_xfrm.sn_size); > > + > > + /** > > + * aad_sz > > + * > > + * For AES-CMAC, additional message is prepended for processing. > > +Need > > to be trimmed after > > + * crypto processing is done. > > + */ > > + if (a_xfrm !=3D NULL && a_xfrm->auth.algo =3D=3D > > RTE_CRYPTO_AUTH_AES_CMAC) > > + en_priv->aad_sz =3D 8; > > + else > > + en_priv->aad_sz =3D 0; > > + > > + return 0; > > +} > > + > > +int > > +pdcp_process_func_set(struct rte_pdcp_entity *entity, const struct > > rte_pdcp_entity_conf *conf) > > +{ > > + struct entity_priv *en_priv; > > + int ret; > > + > > + if (entity =3D=3D NULL || conf =3D=3D NULL) > > + return -EINVAL; > > + > > + en_priv =3D entity_priv_get(entity); > > + > > + ret =3D pdcp_entity_priv_populate(en_priv, conf); > > + if (ret) > > + return ret; > > + > > + return 0; > > +} > > diff --git a/lib/pdcp/pdcp_process.h b/lib/pdcp/pdcp_process.h new > > file mode 100644 index 0000000000..fd53fff0aa > > --- /dev/null > > +++ b/lib/pdcp/pdcp_process.h > > @@ -0,0 +1,13 @@ > > +/* SPDX-License-Identifier: BSD-3-Clause > > + * Copyright(C) 2023 Marvell. > > + */ > > + > > +#ifndef PDCP_PROCESS_H > > +#define PDCP_PROCESS_H > > + > > +#include > > + > > +int > > +pdcp_process_func_set(struct rte_pdcp_entity *entity, const struct > > rte_pdcp_entity_conf *conf); > > + > > +#endif /* PDCP_PROCESS_H */ > > diff --git a/lib/pdcp/rte_pdcp.c b/lib/pdcp/rte_pdcp.c new file mode > > 100644 index 0000000000..8914548dbd > > --- /dev/null > > +++ b/lib/pdcp/rte_pdcp.c > > @@ -0,0 +1,138 @@ > > +/* SPDX-License-Identifier: BSD-3-Clause > > + * Copyright(C) 2023 Marvell. > > + */ > > + > > +#include > > +#include > > +#include > > + > > +#include "pdcp_crypto.h" > > +#include "pdcp_entity.h" > > +#include "pdcp_process.h" > > + > > +static int > > +pdcp_entity_size_get(const struct rte_pdcp_entity_conf *conf) { > > + int size; > > + > > + size =3D sizeof(struct rte_pdcp_entity) + sizeof(struct entity_priv); > > + > > + if (conf->pdcp_xfrm.pkt_dir =3D=3D RTE_SECURITY_PDCP_DOWNLINK) > > + size +=3D sizeof(struct entity_priv_dl_part); > > + else if (conf->pdcp_xfrm.pkt_dir =3D=3D RTE_SECURITY_PDCP_UPLINK) > > + size +=3D sizeof(struct entity_priv_ul_part); > > + else > > + return -EINVAL; > > + > > + return RTE_ALIGN_CEIL(size, RTE_CACHE_LINE_SIZE); } > > + > > +struct rte_pdcp_entity * > > +rte_pdcp_entity_establish(const struct rte_pdcp_entity_conf *conf) { > > + struct rte_pdcp_entity *entity =3D NULL; > > + struct entity_priv *en_priv; > > + int ret, entity_size; > > + > > + if (conf =3D=3D NULL || conf->cop_pool =3D=3D NULL) { > > + rte_errno =3D -EINVAL; > > + return NULL; > > + } >=20 > errnos are normally set as positive values. [Anoob] I do not think so. I checked rte_ethdev.h, rte_flow.h etc and all A= PIs are returning negative values in case of errors. >=20 >=20 > > + > > + if (conf->pdcp_xfrm.en_ordering || conf- > > >pdcp_xfrm.remove_duplicates || conf->is_slrb || > > + conf->en_sec_offload) { > > + rte_errno =3D -ENOTSUP; > > + return NULL; > > + } > > + > > + /* > > + * 6.3.2 PDCP SN > > + * Length: 12 or 18 bits as indicated in table 6.3.2-1. The length > > +of the > > PDCP SN is > > + * configured by upper layers (pdcp-SN-SizeUL, pdcp-SN-SizeDL, or > > +sl- > > PDCP-SN-Size in > > + * TS 38.331 [3]) > > + */ > > + if ((conf->pdcp_xfrm.sn_size !=3D RTE_SECURITY_PDCP_SN_SIZE_12) > && > > + (conf->pdcp_xfrm.sn_size !=3D RTE_SECURITY_PDCP_SN_SIZE_18)) { > > + rte_errno =3D -ENOTSUP; > > + return NULL; > > + } >=20 > Check for PDCP crypto algos may also be added. > As only 4 cipher and 4 auth algos are supported in case of PDCP. [Anoob] Validation happens when we create session. Please check, pdcp: add crypto session create and destroy >=20 > > + > > + if (conf->pdcp_xfrm.hfn || conf->pdcp_xfrm.hfn_threshold) { > > + rte_errno =3D -EINVAL; > > + return NULL; > > + } >=20 > What is the reason to set errno as EINVAL when HFN is set? [Anoob] HFN is part of pdcp_xfrm which is defined in rte_security. Lib PDCP= allows user to specify complete 32 bit count value using rte_pdcp_entity_c= onf.count. Since HFN is also used to construct 32 bit count value, having t= wo ways to set count would be misleading. Hence lib PDCP would enforce that= application does not set this value. >=20 > > + > > + entity_size =3D pdcp_entity_size_get(conf); > > + if (entity_size < 0) { > > + rte_errno =3D -EINVAL; > > + return NULL; > > + } > > + > > + entity =3D rte_zmalloc_socket("pdcp_entity", entity_size, > > RTE_CACHE_LINE_SIZE, SOCKET_ID_ANY); > > + if (entity =3D=3D NULL) { > > + rte_errno =3D -ENOMEM; > > + return NULL; > > + } > > + > > + en_priv =3D entity_priv_get(entity); > > + > > + en_priv->state.rx_deliv =3D conf->count; > > + en_priv->state.tx_next =3D conf->count; > > + en_priv->cop_pool =3D conf->cop_pool; > > + > > + /* Setup crypto session */ > > + ret =3D pdcp_crypto_sess_create(entity, conf); > > + if (ret) > > + goto entity_free; > > + > > + ret =3D pdcp_process_func_set(entity, conf); > > + if (ret) > > + goto crypto_sess_destroy; > > + > > + return entity; > > + > > +crypto_sess_destroy: > > + pdcp_crypto_sess_destroy(entity); > > +entity_free: > > + rte_free(entity); > > + rte_errno =3D ret; > > + return NULL; > > +} > > + > > +int > > +rte_pdcp_entity_release(struct rte_pdcp_entity *pdcp_entity, struct > > +rte_mbuf > > *out_mb[]) > > +{ > > + if (pdcp_entity =3D=3D NULL) > > + return -EINVAL; > > + > > + /* Teardown crypto sessions */ > > + pdcp_crypto_sess_destroy(pdcp_entity); > > + > > + rte_free(pdcp_entity); > > + > > + RTE_SET_USED(out_mb); > > + return 0; > > +} > > + > > +int > > +rte_pdcp_entity_suspend(struct rte_pdcp_entity *pdcp_entity, > > + struct rte_mbuf *out_mb[]) > > +{ > > + struct entity_priv *en_priv; > > + > > + if (pdcp_entity =3D=3D NULL) > > + return -EINVAL; > > + > > + en_priv =3D entity_priv_get(pdcp_entity); > > + > > + if (en_priv->flags.is_ul_entity) { > > + en_priv->state.tx_next =3D 0; > > + } else { > > + en_priv->state.rx_next =3D 0; > > + en_priv->state.rx_deliv =3D 0; > > + } > > + > > + RTE_SET_USED(out_mb); > > + > > + return 0; > > +} > > diff --git a/lib/pdcp/rte_pdcp.h b/lib/pdcp/rte_pdcp.h new file mode > > 100644 index 0000000000..33c355b05a > > --- /dev/null > > +++ b/lib/pdcp/rte_pdcp.h > > @@ -0,0 +1,157 @@ > > +/* SPDX-License-Identifier: BSD-3-Clause > > + * Copyright(C) 2023 Marvell. > > + */ > > + > > +#ifndef RTE_PDCP_H > > +#define RTE_PDCP_H > > + > > +/** > > + * @file rte_pdcp.h > > + * > > + * RTE PDCP support. > > + * > > + * librte_pdcp provides a framework for PDCP protocol processing. >=20 > A framework for PDCP protocol processing. [Anoob] Will do next version. >=20 > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > + > > +#ifdef __cplusplus > > +extern "C" { > > +#endif > > + > > +/** > > + * PDCP entity. >=20 > You can probably explain more on what a PDCP entity is. [Anoob] Will do in next version. >=20 > > + */ > > +struct rte_pdcp_entity { > > + /** > > + * PDCP entities may hold packets for purposes of in-order delivery > (in > > + * case of receiving PDCP entity) and re-transmission (in case of > > + * transmitting PDCP entity). > > + * > > + * For receiving PDCP entity, it may hold packets when in-order > > + * delivery is enabled. The packets would be cached until either a > > + * packet that completes the sequence arrives or when t-Reordering > > timer > > + * expires. > > + * > > + * When post-processing of PDCP packet which completes a > sequence is > > + * done, the API may return more packets than enqueued. > Application is > > + * expected to provide *rte_pdcp_pkt_post_process()* with > *out_mb* > > + * which can hold maximum number of packets which may be > returned. > > + */ >=20 > The above comment explains the need for holding the packets. > But it does not talk about the parameter it is explaining. > This explanation should be part of programmer's guide and not the API > guide. [Anoob] Agreed. Will make the required changes. >=20 > > + uint32_t max_pkt_cache; > > + /** User area for saving application data. */ > > + uint64_t user_area[2]; >=20 > Is it being used right now in the patches? > If not, can we add it later? > And if really needed now, can we rename to user_data [Anoob] Agreed. Will remove. >=20 > > +} __rte_cache_aligned; > > + > > +/** > > + * PDCP entity configuration to be used for establishing an entity. > > + */ > > +/* Structure rte_pdcp_entity_conf 8< */ struct rte_pdcp_entity_conf { > > + /** PDCP transform for the entity. */ > > + struct rte_security_pdcp_xform pdcp_xfrm; > > + /** Crypto transform applicable for the entity. */ > > + struct rte_crypto_sym_xform *crypto_xfrm; > > + /** Mempool for crypto symmetric session. */ > > + struct rte_mempool *sess_mpool; > > + /** Crypto op pool.*/ > > + struct rte_mempool *cop_pool; > > + /** > > + * 32 bit count value (HFN + SN) to be used for the first packet. > > + * pdcp_xfrm.hfn would be ignored as the HFN would be derived > from > > this value. > > + */ >=20 > If the HFN is to be ignored, then why to add a check in entity establish = and > return EINVAL? > It should be silently ignored in that case with a debug print at max. [Anoob] Explained above. Please check. >=20 >=20 > > + uint32_t count; > > + /** Indicate whether the PDCP entity belongs to Side Link Radio > Bearer. > > */ > > + bool is_slrb; > > + /** Enable security offload on the device specified. */ > > + bool en_sec_offload; > > + /** Device on which security/crypto session need to be created. */ > > + uint8_t dev_id; > > + /** Reverse direction during IV generation. Can be used to simulate > > +UE > > crypto processing.*/ > > + bool reverse_iv_direction; > > +}; > > +/* >8 End of structure rte_pdcp_entity_conf. */ > > + > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this API may change without prior notice > > + * > > + * 5.1.1 PDCP entity establishment > > + * > > + * Establish PDCP entity based on provided input configuration. > > + * > > + * @param conf > > + * Parameters to be used for initializing PDCP entity object. > > + * @return > > + * - Valid handle if success > > + * - NULL in case of failure. rte_errno will be set to error code > > + */ > > +__rte_experimental > > +struct rte_pdcp_entity * > > +rte_pdcp_entity_establish(const struct rte_pdcp_entity_conf *conf); > > + > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this API may change without prior notice > > + * > > + * 5.1.3 PDCP entity release > > + * > > + * Release PDCP entity. > > + * > > + * For UL/transmitting PDCP entity, all stored PDCP SDUs would be > dropped. > > + * For DL/receiving PDCP entity, the stored PDCP SDUs would be > > +returned in > > + * *out_mb* buffer. The buffer should be large enough to hold all > > +cached > > + * packets in the entity. > > + * > > + * @param pdcp_entity > > + * Pointer to the PDCP entity to be released. > > + * @param[out] out_mb > > + * The address of an array that can hold up to > > *rte_pdcp_entity.max_pkt_cache* > > + * pointers to *rte_mbuf* structures. > > + * @return > > + * - 0: Success and no cached packets to return > > + * - >0: Success and the number of packets returned in out_mb > > + * - <0: Error code in case of failures > > + */ > > +__rte_experimental > > +int > > +rte_pdcp_entity_release(struct rte_pdcp_entity *pdcp_entity, > > + struct rte_mbuf *out_mb[]); > > + > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this API may change without prior notice > > + * > > + * 5.1.4 PDCP entity suspend > > + * > > + * Suspend PDCP entity. > > + * > > + * For DL/receiving PDCP entity, the stored PDCP SDUs would be > > +returned in > > + * *out_mb* buffer. The buffer should be large enough to hold all > > +cached > > + * packets in the entity. > > + * > > + * For UL/transmitting PDCP entity, *out_mb* buffer would be unused. > > + * > > + * @param pdcp_entity > > + * Pointer to the PDCP entity to be suspended. > > + * @param[out] out_mb > > + * The address of an array that can hold up to > > *rte_pdcp_entity.max_pkt_cache* > > + * pointers to *rte_mbuf* structures. > > + * @return > > + * - 0: Success and no cached packets to return > > + * - >0: Success and the number of packets returned in out_mb > > + * - <0: Error code in case of failures > > + */ > > +__rte_experimental > > +int > > +rte_pdcp_entity_suspend(struct rte_pdcp_entity *pdcp_entity, > > + struct rte_mbuf *out_mb[]); > > + > > +#ifdef __cplusplus > > +} > > +#endif > > + > > +#endif /* RTE_PDCP_H */ > > diff --git a/lib/pdcp/version.map b/lib/pdcp/version.map new file mode > > 100644 index 0000000000..923e165f3f > > --- /dev/null > > +++ b/lib/pdcp/version.map > > @@ -0,0 +1,10 @@ > > +EXPERIMENTAL { > > + global: > > + > > + # added in 23.07 > > + rte_pdcp_entity_establish; > > + rte_pdcp_entity_release; > > + rte_pdcp_entity_suspend; > > + > > + local: *; > > +}; > > -- > > 2.25.1