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 DA90042B37; Thu, 18 May 2023 08:51:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 783E342B71; Thu, 18 May 2023 08:51:25 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 8236040E25 for ; Thu, 18 May 2023 08:51:23 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34HMFG8c012878; Wed, 17 May 2023 23:51:21 -0700 Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2046.outbound.protection.outlook.com [104.47.51.46]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3qn7jb9hs6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 May 2023 23:51:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WXWZf+xyRmJV2ueXa8qkTgp6M1le+mj25senvfH+NXiJh05DDef7tVLs3CXuVQUHsaKrMAO0Vgt0vO2Nbh4RkeANvSclhqnDR4YWg4HtfoNKeVErK65lvyMQ0qQa5S6kz2dIyIZZNSLZQCLn9b54z8yQLlyWlsHA4zQpJdeBiqu73C/TC/6Q01n60Yu1bzbeT/+lLURdUc6VR8EngyJOxVCqgT0x3AsiEly3sd+nBTO1LK3jU0uxzth4o+f0+qE3EewQOy4UTCibQnGaNMHAXD9n7S6xnsA5aSlKX7Q2kr4XIjiZuSJDiY/TxMad03LhtC847+gO/f82OXpAlN14hw== 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=Ek/oZ5pwTgFagJGnwMyVVMCPNmj5nLDdUdFOJLzcnYk=; b=Xur+u4pCEyM620RCmrjg2kzHhRd+e9zj7/lJWpJ8boTGZkHrI4NR6VU8dZuI/4wLVxkdfo4aeosiVYowwkf3LmbFcZDBHImz6YLbt9gPsdkE3dSzLHw+mEvU28J3WEbSg/1/n0bTLJ/tqocGMKC0sivJXVpVfDkEsTXaqKBcA7lKy1gNtjiVZ74YVsLZAYVCVe8xEpsHjcH9VDXNwU9SUGHvQZ6ww0OXEc5QK9VJcjXwJVpbrRJtc39C1Jt3sihJmsFq809Fv9G3p2ZbOjoIQ53CBr6B5lRUgTu1MuC/zD1aWK/aQ3YY2QJaS36qmwMLuQy+JmmGpscmxnOCvnxkfA== 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=Ek/oZ5pwTgFagJGnwMyVVMCPNmj5nLDdUdFOJLzcnYk=; b=YSZr7bYbcOqu33adleskrC/jjxJW9vb6ZOUn0hQDlFHiD3vx75Zqd/1Kf+yrh6kQoHep4byhlj7VnlZiiZWvCh3yYQ/0qoFcxvntqAQ4nS0TFs6xovLb4Idr2NpJzXPVAp4NIazilxzN98jjuxC2HAGZsAwBQsg02zdaJ4nGVPE= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by SN7PR18MB3935.namprd18.prod.outlook.com (2603:10b6:806:10c::21) 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:51:18 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::831b:85d2:9a45:8489]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::831b:85d2:9a45:8489%6]) with mapi id 15.20.6411.019; Thu, 18 May 2023 06:51:17 +0000 From: Akhil Goyal To: Anoob Joseph , 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 08/22] pdcp: add IV generation routines Thread-Topic: [PATCH v2 08/22] pdcp: add IV generation routines Thread-Index: AQHZbvkHhHXADz9KkUyQzbgbeHtUL69fy5vg Date: Thu, 18 May 2023 06:51:17 +0000 Message-ID: References: <20221222092522.1628-1-anoobj@marvell.com> <20230414174512.642-1-anoobj@marvell.com> <20230414174512.642-9-anoobj@marvell.com> In-Reply-To: <20230414174512.642-9-anoobj@marvell.com> Accept-Language: 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+PGF0IG5tPSJib2R5LnR4dCIgcD0iYzpcdXNlcnNcZ2FraGlsXG?= =?iso-8859-1?Q?FwcGRhdGFccm9hbWluZ1wwOWQ4NDliNi0zMmQzLTRhNDAtODVlZS02Yjg0?= =?iso-8859-1?Q?YmEyOWUzNWJcbXNnc1xtc2ctNjE1OGZjNGQtZjU0OC0xMWVkLWEwOTMtOT?= =?iso-8859-1?Q?RlNmY3NjYxOTA3XGFtZS10ZXN0XDYxNThmYzRmLWY1NDgtMTFlZC1hMDkz?= =?iso-8859-1?Q?LTk0ZTZmNzY2MTkwN2JvZHkudHh0IiBzej0iMTQ0MzciIHQ9IjEzMzI4OD?= =?iso-8859-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nNBR3dBWHdCM0FHOEFjZ0JrQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB?= =?iso-8859-1?Q?QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU?= =?iso-8859-1?Q?FBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB?= =?iso-8859-1?Q?QUFBQUFBQUFBQUFBQUFBQUFBQUFB?= x-dg-reffour: QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQVFBQUFBQUFBQUFDQUFBQUFBQT0iLz48L21ldGE+ x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO6PR18MB4484:EE_|SN7PR18MB3935:EE_ x-ms-office365-filtering-correlation-id: 66f5d83c-6834-4c8d-4bf4-08db576c47f3 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: K38hnvzw8Ulg46FLYr05SjM8FPSFqNzcyyJs7xKw5oOHNlND7ViCCmLyPRWtj1As+zifr2oB4QwcVDh7zgK8q6yN5ss0tTdXateYLwXn66Na6mKQnJoDhynIKogONKRVuygvox+0uhctKdcfxyDYtetc3PqIOZiU5uFggl8f6ViyAE0jEse+Ce3n5/IE8q4r1dDFnVUwFxgtPLZmVxxsBV4Acb8JSO1zZhs8sDQiieouCmaOnmEWpe6oPzliRro1ITUUb5hJOKnCm93DYmCDk/YYkB3DepRO3DgcqvD/2TLkU9SdNw8UQtm1CdrvlzY9sfrDko7i/gxu4AsYftrS/5AhyliMcLLdYSCluTbnhTwr8WUi8PRepqiZdiLOzZsIl6/U+UzvPs0llctS/67G7LmBvhfgN573vmM/LtUPuTq6UnHTicH9IlKdx1iJ9R/Nhj8x2znXPxuzpE0bSG4DLOClNLT4V60dduM6FZWyRS6qNw4vJkARlhGADojrZEh6TdZlUNKIGc5/rTD/E3XpDamaQ1JqGjSMMdnpZmqtSAvRdzuLJKPIzN08HvInbcUrStSpfbtpD7Q+buC3F7k1Bm2DrpCW516NPITk0S+uXM3F2kBsOROGy80EvHwjt5hK x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(39860400002)(366004)(376002)(396003)(346002)(136003)(451199021)(86362001)(83380400001)(7696005)(41300700001)(33656002)(122000001)(5660300002)(30864003)(52536014)(8676002)(38100700002)(316002)(38070700005)(66476007)(4326008)(66556008)(66446008)(55016003)(2906002)(66946007)(76116006)(64756008)(55236004)(186003)(6506007)(9686003)(26005)(8936002)(71200400001)(110136005)(478600001)(54906003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?frM5870FhzxqxSo3EldVuEH0YUijwzRhUhOLewN/fH07etGIjtvU7GwZW5?= =?iso-8859-1?Q?1v5fRf6oWiat5rmqIl8lBQIs5ZhzB+k5kbv/lYbUjDLgJvYGTvrDKyHfnm?= =?iso-8859-1?Q?ssnmIHiiJMg4oFvRmYg1ipASG58oQqMwR0y8McGgAlweKMgsOUySYnl2QC?= =?iso-8859-1?Q?7aT0f6k1T25PrutP/aNvimUXlQcqAJu8NVTS22LhmEZ8R9uJJHwaTt3hHr?= =?iso-8859-1?Q?VQ30svvEg8mj/f8EpyBg06FvsUBmKpL6CKrsjIUy8smUA9JmFwUnJhb3jC?= =?iso-8859-1?Q?iWzwVhB+Pluq5Q3UWZjfYK3cAwUk64CYSEY0kXKMF9kXWsteDqoWzJG/e0?= =?iso-8859-1?Q?4Y0byZhMJ9QV08x/glEGSfjPunMHB77erVNTzk1lgIYv4ebRU+pCz7s7QG?= =?iso-8859-1?Q?BKDZX22DZdKQzG1tQ9qq6Qftpk6AoHmIAB42YbN0l2jdQS0ETWGVUtKe7J?= =?iso-8859-1?Q?NKT/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0pZoD92AYUr1i7T?= =?iso-8859-1?Q?Ue8kV220pp7b3owI01gG7jN/CW5mRsSb3Qt8YGT/Xjn7PAnmoqrrFcXCuG?= =?iso-8859-1?Q?N9qs1YvudlyW6JGX2rN6znYIGPSTr70Rwnb7un6X+I3PN6/db+L8uFVCnE?= =?iso-8859-1?Q?tTQ+79MTKy3WQzhle81xKeXrKqAL5kPD0R9mkgp6lVsNyzzOuz/9rX8/tu?= =?iso-8859-1?Q?hTQEXCJh9tTfkY42HK0ZvCAxv6ytaWSDWtvfbaQY8VbIlI0TM+l3oAXa3Y?= =?iso-8859-1?Q?GcFKSuyVxEU90pylrwjKv43SqzqeeA+VAg?= 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: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 66f5d83c-6834-4c8d-4bf4-08db576c47f3 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 May 2023 06:51:17.7789 (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: W47trRKchx7IKRa6Zk0606cAoXit6MVbgJEoXgqrluFtd1ivBwnrOz4b33phIeJ7edxJL18SYOlGLCDHLiP/nA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR18MB3935 X-Proofpoint-GUID: Mdfz45nErMThjGMr4ACQVGCF6NwLQECX X-Proofpoint-ORIG-GUID: Mdfz45nErMThjGMr4ACQVGCF6NwLQECX 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_05,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 > Subject: [PATCH v2 08/22] pdcp: add IV generation routines >=20 > For PDCP, IV generated has varying formats depending on the ciphering and > authentication algorithm used. Add routines to populate IV accordingly. >=20 > Signed-off-by: Anoob Joseph > Signed-off-by: Volodymyr Fialko > --- > lib/pdcp/pdcp_entity.h | 87 ++++++++++++ > lib/pdcp/pdcp_process.c | 284 > ++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 371 insertions(+) >=20 > diff --git a/lib/pdcp/pdcp_entity.h b/lib/pdcp/pdcp_entity.h > index d2d9bbe149..3108795977 100644 > --- a/lib/pdcp/pdcp_entity.h > +++ b/lib/pdcp/pdcp_entity.h > @@ -26,6 +26,89 @@ struct entity_state { > uint32_t rx_reord; > }; >=20 > +union auth_iv_partial { > + /* For AES-CMAC, there is no IV, but message gets prepended */ > + struct { > +#if RTE_BYTE_ORDER =3D=3D RTE_LITTLE_ENDIAN > + uint64_t count : 32; > + uint64_t zero_38_39 : 2; > + uint64_t direction : 1; > + uint64_t bearer : 5; > + uint64_t zero_40_63 : 24; > +#else > + uint64_t count : 32; > + uint64_t bearer : 5; > + uint64_t direction : 1; > + uint64_t zero_38_39 : 2; > + uint64_t zero_40_63 : 24; > +#endif > + } aes_cmac; > + struct { > +#if RTE_BYTE_ORDER =3D=3D RTE_LITTLE_ENDIAN > + uint64_t count : 32; > + uint64_t zero_37_39 : 3; > + uint64_t bearer : 5; > + uint64_t zero_40_63 : 24; > + > + uint64_t rsvd_65_71 : 7; > + uint64_t direction_64 : 1; > + uint64_t rsvd_72_111 : 40; > + uint64_t rsvd_113_119 : 7; > + uint64_t direction_112 : 1; > + uint64_t rsvd_120_127 : 8; > +#else > + uint64_t count : 32; > + uint64_t bearer : 5; > + uint64_t zero_37_39 : 3; > + uint64_t zero_40_63 : 24; > + > + uint64_t direction_64 : 1; > + uint64_t rsvd_65_71 : 7; > + uint64_t rsvd_72_111 : 40; > + uint64_t direction_112 : 1; > + uint64_t rsvd_113_119 : 7; > + uint64_t rsvd_120_127 : 8; > +#endif > + } zs; > + uint64_t u64[2]; > +}; Can we add pictorial comments for each of the IV formats? So that we may not need to refer the specifications again and again. > + > +union cipher_iv_partial { > + struct { > +#if RTE_BYTE_ORDER =3D=3D RTE_LITTLE_ENDIAN > + uint64_t count : 32; > + uint64_t zero_38_39 : 2; > + uint64_t direction : 1; > + uint64_t bearer : 5; > + uint64_t zero_40_63 : 24; > +#else > + uint64_t count : 32; > + uint64_t bearer : 5; > + uint64_t direction : 1; > + uint64_t zero_38_39 : 2; > + uint64_t zero_40_63 : 24; > +#endif > + uint64_t zero_64_127; > + } aes_ctr; > + struct { > +#if RTE_BYTE_ORDER =3D=3D RTE_LITTLE_ENDIAN > + uint64_t count : 32; > + uint64_t zero_38_39 : 2; > + uint64_t direction : 1; > + uint64_t bearer : 5; > + uint64_t zero_40_63 : 24; > +#else > + uint64_t count : 32; > + uint64_t bearer : 5; > + uint64_t direction : 1; > + uint64_t zero_38_39 : 2; > + uint64_t zero_40_63 : 24; > +#endif > + uint64_t rsvd_64_127; > + } zs; > + uint64_t u64[2]; > +}; > + > /* > * Layout of PDCP entity: [rte_pdcp_entity] [entity_priv] [entity_dl/ul] > */ > @@ -35,6 +118,10 @@ struct entity_priv { > struct rte_cryptodev_sym_session *crypto_sess; > /** Entity specific IV generation function. */ > iv_gen_t iv_gen; > + /** Pre-prepared auth IV. */ > + union auth_iv_partial auth_iv_part; > + /** Pre-prepared cipher IV. */ > + union cipher_iv_partial cipher_iv_part; > /** Entity state variables. */ > struct entity_state state; > /** Flags. */ > diff --git a/lib/pdcp/pdcp_process.c b/lib/pdcp/pdcp_process.c > index 79d6ca352a..9c1a5e0669 100644 > --- a/lib/pdcp/pdcp_process.c > +++ b/lib/pdcp/pdcp_process.c > @@ -13,6 +13,181 @@ > #include "pdcp_entity.h" > #include "pdcp_process.h" >=20 > +/* Enum of supported algorithms for ciphering */ > +enum pdcp_cipher_algo { > + PDCP_CIPHER_ALGO_NULL, > + PDCP_CIPHER_ALGO_AES, > + PDCP_CIPHER_ALGO_ZUC, > + PDCP_CIPHER_ALGO_SNOW3G, > + PDCP_CIPHER_ALGO_MAX > +}; > + > +/* Enum of supported algorithms for integrity */ > +enum pdcp_auth_algo { > + PDCP_AUTH_ALGO_NULL, > + PDCP_AUTH_ALGO_AES, > + PDCP_AUTH_ALGO_ZUC, > + PDCP_AUTH_ALGO_SNOW3G, > + PDCP_AUTH_ALGO_MAX > +}; > + > +/* IV generation functions based on type of operation (cipher - auth) */ > + > +static void > +pdcp_iv_gen_null_null(struct rte_crypto_op *cop, const struct entity_pri= v > *en_priv, uint32_t count) > +{ > + /* No IV required for NULL cipher + NULL auth */ > + RTE_SET_USED(cop); > + RTE_SET_USED(en_priv); > + RTE_SET_USED(count); > +} > + > +static void > +pdcp_iv_gen_null_aes_cmac(struct rte_crypto_op *cop, const struct > entity_priv *en_priv, > + uint32_t count) > +{ > + struct rte_crypto_sym_op *op =3D cop->sym; > + struct rte_mbuf *mb =3D op->m_src; > + uint8_t *m_ptr; > + uint64_t m; > + > + /* AES-CMAC requires message to be prepended with info on count etc > */ > + > + /* Prepend by 8 bytes to add custom message */ > + m_ptr =3D (uint8_t *)rte_pktmbuf_prepend(mb, 8); > + > + m =3D en_priv->auth_iv_part.u64[0] | > ((uint64_t)(rte_cpu_to_be_32(count))); > + > + rte_memcpy(m_ptr, &m, 8); > +} > + > +static void > +pdcp_iv_gen_null_zs(struct rte_crypto_op *cop, const struct entity_priv > *en_priv, uint32_t count) > +{ > + uint64_t iv_u64[2]; > + uint8_t *iv; > + > + iv =3D rte_crypto_op_ctod_offset(cop, uint8_t *, PDCP_IV_OFFSET); > + > + iv_u64[0] =3D en_priv->auth_iv_part.u64[0] | > ((uint64_t)(rte_cpu_to_be_32(count))); > + rte_memcpy(iv, &iv_u64[0], 8); > + > + iv_u64[1] =3D iv_u64[0] ^ en_priv->auth_iv_part.u64[1]; > + rte_memcpy(iv + 8, &iv_u64[1], 8); > +} > + > +static void > +pdcp_iv_gen_aes_ctr_null(struct rte_crypto_op *cop, const struct entity_= priv > *en_priv, > + uint32_t count) > +{ > + uint64_t iv_u64[2]; > + uint8_t *iv; > + > + iv =3D rte_crypto_op_ctod_offset(cop, uint8_t *, PDCP_IV_OFFSET); > + > + iv_u64[0] =3D en_priv->cipher_iv_part.u64[0] | > ((uint64_t)(rte_cpu_to_be_32(count))); > + iv_u64[1] =3D 0; > + rte_memcpy(iv, iv_u64, 16); > +} > + > +static void > +pdcp_iv_gen_zs_null(struct rte_crypto_op *cop, const struct entity_priv > *en_priv, uint32_t count) > +{ > + uint64_t iv_u64; > + uint8_t *iv; > + > + iv =3D rte_crypto_op_ctod_offset(cop, uint8_t *, PDCP_IV_OFFSET); > + > + iv_u64 =3D en_priv->cipher_iv_part.u64[0] | > ((uint64_t)(rte_cpu_to_be_32(count))); > + rte_memcpy(iv, &iv_u64, 8); > + rte_memcpy(iv + 8, &iv_u64, 8); > +} > + > +static void > +pdcp_iv_gen_zs_zs(struct rte_crypto_op *cop, const struct entity_priv > *en_priv, uint32_t count) > +{ > + uint64_t iv_u64[2]; > + uint8_t *iv; > + > + iv =3D rte_crypto_op_ctod_offset(cop, uint8_t *, PDCP_IV_OFFSET); > + > + /* Generating cipher IV */ > + iv_u64[0] =3D en_priv->cipher_iv_part.u64[0] | > ((uint64_t)(rte_cpu_to_be_32(count))); > + rte_memcpy(iv, &iv_u64[0], 8); > + rte_memcpy(iv + 8, &iv_u64[0], 8); > + > + iv +=3D PDCP_IV_LEN; > + > + /* Generating auth IV */ > + iv_u64[0] =3D en_priv->auth_iv_part.u64[0] | > ((uint64_t)(rte_cpu_to_be_32(count))); > + rte_memcpy(iv, &iv_u64[0], 8); > + > + iv_u64[1] =3D iv_u64[0] ^ en_priv->auth_iv_part.u64[1]; > + rte_memcpy(iv + 8, &iv_u64[1], 8); > +} > + > +static void > +pdcp_iv_gen_zs_aes_cmac(struct rte_crypto_op *cop, const struct entity_p= riv > *en_priv, > + uint32_t count) > +{ > + struct rte_crypto_sym_op *op =3D cop->sym; > + struct rte_mbuf *mb =3D op->m_src; > + uint8_t *m_ptr, *iv; > + uint64_t iv_u64[2]; > + uint64_t m; > + > + iv =3D rte_crypto_op_ctod_offset(cop, uint8_t *, PDCP_IV_OFFSET); > + iv_u64[0] =3D en_priv->cipher_iv_part.u64[0] | > ((uint64_t)(rte_cpu_to_be_32(count))); > + rte_memcpy(iv, &iv_u64[0], 8); > + rte_memcpy(iv + 8, &iv_u64[0], 8); > + > + m_ptr =3D (uint8_t *)rte_pktmbuf_prepend(mb, 8); > + m =3D en_priv->auth_iv_part.u64[0] | > ((uint64_t)(rte_cpu_to_be_32(count))); > + rte_memcpy(m_ptr, &m, 8); > +} > + > +static void > +pdcp_iv_gen_aes_ctr_aes_cmac(struct rte_crypto_op *cop, const struct > entity_priv *en_priv, > + uint32_t count) > +{ > + struct rte_crypto_sym_op *op =3D cop->sym; > + struct rte_mbuf *mb =3D op->m_src; > + uint8_t *m_ptr, *iv; > + uint64_t iv_u64[2]; > + uint64_t m; > + > + iv =3D rte_crypto_op_ctod_offset(cop, uint8_t *, PDCP_IV_OFFSET); > + > + iv_u64[0] =3D en_priv->cipher_iv_part.u64[0] | > ((uint64_t)(rte_cpu_to_be_32(count))); > + iv_u64[1] =3D 0; > + rte_memcpy(iv, iv_u64, PDCP_IV_LEN); > + > + m_ptr =3D (uint8_t *)rte_pktmbuf_prepend(mb, 8); > + m =3D en_priv->auth_iv_part.u64[0] | > ((uint64_t)(rte_cpu_to_be_32(count))); > + rte_memcpy(m_ptr, &m, 8); > +} > + > +static void > +pdcp_iv_gen_aes_ctr_zs(struct rte_crypto_op *cop, const struct entity_pr= iv > *en_priv, uint32_t count) > +{ > + uint64_t iv_u64[2]; > + uint8_t *iv; > + > + iv =3D rte_crypto_op_ctod_offset(cop, uint8_t *, PDCP_IV_OFFSET); > + > + iv_u64[0] =3D en_priv->cipher_iv_part.u64[0] | > ((uint64_t)(rte_cpu_to_be_32(count))); > + iv_u64[1] =3D 0; > + rte_memcpy(iv, iv_u64, PDCP_IV_LEN); > + > + iv +=3D PDCP_IV_LEN; > + > + iv_u64[0] =3D en_priv->auth_iv_part.u64[0] | > ((uint64_t)(rte_cpu_to_be_32(count))); > + rte_memcpy(iv, &iv_u64[0], 8); > + > + iv_u64[1] =3D iv_u64[0] ^ en_priv->auth_iv_part.u64[1]; > + rte_memcpy(iv + 8, &iv_u64[1], 8); > +} > + > 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) > @@ -36,6 +211,111 @@ pdcp_crypto_xfrm_get(const struct > rte_pdcp_entity_conf *conf, struct rte_crypto_ > return 0; > } >=20 > +static int > +pdcp_iv_gen_func_set(struct rte_pdcp_entity *entity, const struct > rte_pdcp_entity_conf *conf) > +{ > + struct rte_crypto_sym_xform *c_xfrm, *a_xfrm; > + enum rte_security_pdcp_direction direction; > + enum pdcp_cipher_algo ciph_algo; > + enum pdcp_auth_algo auth_algo; > + struct entity_priv *en_priv; > + int ret; > + > + en_priv =3D entity_priv_get(entity); > + > + direction =3D conf->pdcp_xfrm.pkt_dir; > + if (conf->reverse_iv_direction) > + direction =3D !direction; > + > + ret =3D pdcp_crypto_xfrm_get(conf, &c_xfrm, &a_xfrm); > + if (ret) > + return ret; > + > + if (c_xfrm =3D=3D NULL) > + return -EINVAL; > + > + memset(&en_priv->auth_iv_part, 0, sizeof(en_priv->auth_iv_part)); > + memset(&en_priv->cipher_iv_part, 0, sizeof(en_priv->cipher_iv_part)); > + > + switch (c_xfrm->cipher.algo) { > + case RTE_CRYPTO_CIPHER_NULL: > + ciph_algo =3D PDCP_CIPHER_ALGO_NULL; > + break; > + case RTE_CRYPTO_CIPHER_AES_CTR: > + ciph_algo =3D PDCP_CIPHER_ALGO_AES; > + en_priv->cipher_iv_part.aes_ctr.bearer =3D conf- > >pdcp_xfrm.bearer; > + en_priv->cipher_iv_part.aes_ctr.direction =3D direction; > + break; > + case RTE_CRYPTO_CIPHER_SNOW3G_UEA2: > + ciph_algo =3D PDCP_CIPHER_ALGO_SNOW3G; > + en_priv->cipher_iv_part.zs.bearer =3D conf->pdcp_xfrm.bearer; > + en_priv->cipher_iv_part.zs.direction =3D direction; > + break; > + case RTE_CRYPTO_CIPHER_ZUC_EEA3: > + ciph_algo =3D PDCP_CIPHER_ALGO_ZUC; > + en_priv->cipher_iv_part.zs.bearer =3D conf->pdcp_xfrm.bearer; > + en_priv->cipher_iv_part.zs.direction =3D direction; > + break; > + default: > + return -ENOTSUP; > + } > + > + if (a_xfrm !=3D NULL) { > + switch (a_xfrm->auth.algo) { > + case RTE_CRYPTO_AUTH_NULL: > + auth_algo =3D PDCP_AUTH_ALGO_NULL; > + break; > + case RTE_CRYPTO_AUTH_AES_CMAC: > + auth_algo =3D PDCP_AUTH_ALGO_AES; > + en_priv->auth_iv_part.aes_cmac.bearer =3D conf- > >pdcp_xfrm.bearer; > + en_priv->auth_iv_part.aes_cmac.direction =3D direction; > + break; > + case RTE_CRYPTO_AUTH_SNOW3G_UIA2: > + auth_algo =3D PDCP_AUTH_ALGO_SNOW3G; > + en_priv->auth_iv_part.zs.bearer =3D conf- > >pdcp_xfrm.bearer; > + en_priv->auth_iv_part.zs.direction_64 =3D direction; > + en_priv->auth_iv_part.zs.direction_112 =3D direction; > + break; > + case RTE_CRYPTO_AUTH_ZUC_EIA3: > + auth_algo =3D PDCP_AUTH_ALGO_ZUC; > + en_priv->auth_iv_part.zs.bearer =3D conf- > >pdcp_xfrm.bearer; > + en_priv->auth_iv_part.zs.direction_64 =3D direction; > + en_priv->auth_iv_part.zs.direction_112 =3D direction; > + break; > + default: > + return -ENOTSUP; > + } > + } else { > + auth_algo =3D PDCP_AUTH_ALGO_NULL; > + } > + > + static const iv_gen_t > iv_gen_map[PDCP_CIPHER_ALGO_MAX][PDCP_AUTH_ALGO_MAX] =3D { > + [PDCP_CIPHER_ALGO_NULL][PDCP_AUTH_ALGO_NULL] =3D > pdcp_iv_gen_null_null, > + [PDCP_CIPHER_ALGO_NULL][PDCP_AUTH_ALGO_AES] =3D > pdcp_iv_gen_null_aes_cmac, > + [PDCP_CIPHER_ALGO_NULL][PDCP_AUTH_ALGO_SNOW3G] =3D > pdcp_iv_gen_null_zs, > + [PDCP_CIPHER_ALGO_NULL][PDCP_AUTH_ALGO_ZUC] =3D > pdcp_iv_gen_null_zs, > + > + [PDCP_CIPHER_ALGO_AES][PDCP_AUTH_ALGO_NULL] =3D > pdcp_iv_gen_aes_ctr_null, > + [PDCP_CIPHER_ALGO_AES][PDCP_AUTH_ALGO_AES] =3D > pdcp_iv_gen_aes_ctr_aes_cmac, > + [PDCP_CIPHER_ALGO_AES][PDCP_AUTH_ALGO_SNOW3G] =3D > pdcp_iv_gen_aes_ctr_zs, > + [PDCP_CIPHER_ALGO_AES][PDCP_AUTH_ALGO_ZUC] =3D > pdcp_iv_gen_aes_ctr_zs, > + > + [PDCP_CIPHER_ALGO_SNOW3G][PDCP_AUTH_ALGO_NULL] =3D > pdcp_iv_gen_zs_null, > + [PDCP_CIPHER_ALGO_SNOW3G][PDCP_AUTH_ALGO_AES] =3D > pdcp_iv_gen_zs_aes_cmac, > + > [PDCP_CIPHER_ALGO_SNOW3G][PDCP_AUTH_ALGO_SNOW3G] =3D > pdcp_iv_gen_zs_zs, > + [PDCP_CIPHER_ALGO_SNOW3G][PDCP_AUTH_ALGO_ZUC] =3D > pdcp_iv_gen_zs_zs, > + > + [PDCP_CIPHER_ALGO_ZUC][PDCP_AUTH_ALGO_NULL] =3D > pdcp_iv_gen_zs_null, > + [PDCP_CIPHER_ALGO_ZUC][PDCP_AUTH_ALGO_AES] =3D > pdcp_iv_gen_zs_aes_cmac, > + [PDCP_CIPHER_ALGO_ZUC][PDCP_AUTH_ALGO_SNOW3G] =3D > pdcp_iv_gen_zs_zs, > + [PDCP_CIPHER_ALGO_ZUC][PDCP_AUTH_ALGO_ZUC] =3D > pdcp_iv_gen_zs_zs, > + }; > + > + en_priv->iv_gen =3D iv_gen_map[ciph_algo][auth_algo]; > + > + return 0; > +} > + > static inline void > cop_prepare(const struct entity_priv *en_priv, struct rte_mbuf *mb, stru= ct > rte_crypto_op *cop, > uint8_t data_offset, uint32_t count, const bool is_auth) > @@ -909,6 +1189,10 @@ pdcp_process_func_set(struct rte_pdcp_entity > *entity, const struct rte_pdcp_enti >=20 > en_priv =3D entity_priv_get(entity); >=20 > + ret =3D pdcp_iv_gen_func_set(entity, conf); > + if (ret) > + return ret; > + > ret =3D pdcp_entity_priv_populate(en_priv, conf); > if (ret) > return ret; > -- > 2.25.1