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 7B89CA0C47; Thu, 2 Sep 2021 13:34:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0253A4003E; Thu, 2 Sep 2021 13:34:45 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 1026F4003C for ; Thu, 2 Sep 2021 13:34:43 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18281A6H011500; Thu, 2 Sep 2021 04:34:43 -0700 Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2175.outbound.protection.outlook.com [104.47.57.175]) by mx0b-0016f401.pphosted.com with ESMTP id 3attqmgptb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 02 Sep 2021 04:34:42 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bmF9XaJvnADzAIazHTxSzmKBibtbH3hyqDjAt5CEdLYIFiLKaS6iVVcijoo4KUJVM20NxyGtp6DQNFbx/neRM3yeM26otaVSK6rVnuNOvM1VAM5AOyaojN9zsGZU3nieo6rULZR5Pkxu6ihzc8LH8ZPVbiDSEW/E2j+a7dO178QBdUNjgfnWNMrpr9B88+9MxrtOkdIgid1zFMQl8UCvrzzMhiyiFosKWLYmRkqAyIRJ4evAv+6wZYWSGbWJBybAznYrGCQirjTFx6iczrQmEoG/3fuve8jpV+x0bhOky/MgTqGUm+CbyxPnukrRVrkhvR/mDbcGtyjnPaw2W5e/pA== 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-SenderADCheck; bh=AbY9a/u+y+CEbYvwiEg/iGl3xc9ro1Gdtmd32XKGaPA=; b=d+whzG8flJmOkE6biqnCqeKAZw4gHY47NHmnMmj9bs4f1Y4er1zmyehnFlJ8OIZnCThVwJAAGRjonIgUm3PUJTB+E9bO9FQAVg7+IBVDWTfitFOivp4cErPp4eBv3Nb4nEOLPeWBCjalse9buiI8EnELhTOqQ56xDVAP55KmP/nGK9TWSfPdk5aKon+5VpLXF8oyCamAUoyj9nIRPgE34PfnbNIWwxEzh4Psam7HR4kkx83bLZC1lXgnGeUMllTCOZ//W4F9eUzhqhCzaNh2mxzhIkuCHIFOUtjxnoQopcOOJP9eIDZ7wJLhJxEsvXapIsExxSXFZEZ7rCzs1FmS6Q== 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=AbY9a/u+y+CEbYvwiEg/iGl3xc9ro1Gdtmd32XKGaPA=; b=YD9opLuAjflACDseU66Ufn7naacI7yL2LlJ8gyZtNWx0hcGASZJR4nGoUoZe8rz2mSixfR93sUN8r/zpWkPwna4ubwkMZvxhpQTEWm9vyMO3wHcgJ4E5KsTb063NxmkiJM5OgkleHNqCYGzcFj42vK2kqYAQggkYV8ygt9tKFB0= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by CO1PR18MB4746.namprd18.prod.outlook.com (2603:10b6:303:e9::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Thu, 2 Sep 2021 11:34:41 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::411f:5b87:321e:de29]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::411f:5b87:321e:de29%4]) with mapi id 15.20.4478.022; Thu, 2 Sep 2021 11:34:41 +0000 From: Akhil Goyal To: Gagandeep Singh , "dev@dpdk.org" CC: "thomas@monjalon.net" , Hemant Agrawal Thread-Topic: [EXT] [PATCH 2/5] security: add pdcp short MAC-I support Thread-Index: AQHXmmzVY6Vc357vfkiwciKqmTyidKuQp0UA Date: Thu, 2 Sep 2021 11:34:41 +0000 Message-ID: References: <20210826112315.1375237-1-g.singh@nxp.com> <20210826112315.1375237-3-g.singh@nxp.com> In-Reply-To: <20210826112315.1375237-3-g.singh@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=marvell.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a0732a4b-537c-4077-1b98-08d96e05a7a1 x-ms-traffictypediagnostic: CO1PR18MB4746: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: FY8PYA6zVqjHr9LiqZNqYaBcZw+rdKSCcSmwaeDk3PAPA7UUoUetnoK4u6kjObWGruwHGz/GDKYnKw7A1rK8+1hV6HicXHrJ4nexuZtXOWqQdZsI5IjG+xxoLdpRRLM8cl+u2ZWGy2bb3WIEWhcu4vIpxXWjH8BYLRyDY0oT1YosPmg5cX01bArtSipkLZ/4d8Mpkagrsmst4JC3jEEKtUEUTlyDO8O0BS1V5U9CwhFGArnocB4Qq88qPmis6D/nWCH3uSaz1HJ8HKaVqbH8iKpCTqVOLtpG1TVHCCjUIXqu9w//wbAxaf5/uYU9aAzoeJsfabw+uRqPmiYjgk7INKst7rJBoNwnHtmuvWNBMBSHAAyZPpXOwP4fvPlPYGFaTagj92fyzLRbRY5fVb5WFrG+sN9QTw7kReIcrPh8LCOFa2nBJ8QIjATCpr9iwTKmNMJxP8Kag9+pGxuUKfgnl/mnEu9gyizpuxgL5iXHGZP6O4wsSq6LDqdZJIwbpANfRdhDFquO+TKGhi6Qc/eyp5+dxNxTpQl6nX96zkok3MgaHICtWxqEFamq4I3CbbUIQ5eqD4N5Zz9QAMd+ldVNYg5evDUkQwIuQCCj+gFo0LrzYWigxLDv1pW/IHfYeR32LtJkb+W52l8lZOSRK8ljCZwcKBa7pA25MQs0GUS5ezo5ttkJ6crcPuwhOuFBwWGuQD7qZx1JTOlyxfr35uiVUg== 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:(4636009)(366004)(136003)(39860400002)(376002)(346002)(396003)(9686003)(86362001)(38100700002)(2906002)(66476007)(4326008)(33656002)(8936002)(71200400001)(5660300002)(54906003)(8676002)(83380400001)(66446008)(52536014)(110136005)(26005)(122000001)(76116006)(478600001)(7696005)(38070700005)(186003)(15650500001)(55236004)(55016002)(66946007)(316002)(64756008)(66556008)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?luO/wx8xUcqGFT0nu4h9vKWAav4oA0dyaWyACnTzaAQyFlsYkbGXLqI/HkXp?= =?us-ascii?Q?ctDgKqwNsT/hXXypWPFZqJzgrF1G+Y895y3jgOm7blt+T+PhjWCKB2hn2Zlv?= =?us-ascii?Q?sh7v4vW8dzdPvi7rdn0xTgiM/QPKhxqtZH3NkPS8veAvcs2oFgv0pYHAgRRL?= =?us-ascii?Q?Qw3tyhc9wODUopJnvw+E3bk2kmITqTroDT+YVbTZp5TpJiGuIzX4zu0YKE6X?= =?us-ascii?Q?sNZMkFzTDqHkcrbxTqotY/T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=?us-ascii?Q?8QgliqMIC0m7Wx4Fu0WxS23jLNxuqmimihgqenfdC8yFx3F3omOI1yf8XH54?= =?us-ascii?Q?qyN1d4xzg6DKcJPiBLcnpXL8bs57JCEwvkqIzBBPh1Pyt0hyovmqTRKJP23g?= =?us-ascii?Q?yhwFa8DkcP3RQ8entbwAI6QjRrXGx2Ujz/OhACm6sWxVMZnyhTGAyfReU1pj?= =?us-ascii?Q?OMa70FnZhvGtg7pM2gMP9FnA?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" 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: a0732a4b-537c-4077-1b98-08d96e05a7a1 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2021 11:34:41.4308 (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: BpMSCqz1lhycaN4DFUh8bOmetB8Q+trbT6UqX+H2vJW7njGzgBf5NgaDnN/JFR71nrdbBASZ73oyzsd6hN9VLw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR18MB4746 X-Proofpoint-GUID: InRd5K040L18vYII-xoJgOu7cEmSOPnE X-Proofpoint-ORIG-GUID: InRd5K040L18vYII-xoJgOu7cEmSOPnE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-02_04,2021-09-02_01,2020-04-07_01 Subject: Re: [dpdk-dev] [EXT] [PATCH 2/5] security: add pdcp short MAC-I support 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" > From: Hemant Agrawal >=20 Title should be "security: support PDCP short MAC-I" > This patch add support to handle PDCP short MAC-I domain > along with standard control and data domains as it has to > be treaty as special case with PDCP protocol offload support. Spell check treated. >=20 > ShortMAC-I is the 16 least significant bits of calculated MAC-I. Usually > when a RRC message is exchanged between UE and eNodeB it is integrity & > ciphered protected. >=20 > MAC-I =3D f(key, varShortMAC-I, count, bearer, direction). > Here varShortMAC-I is prepared by using (current cellId, pci of source ce= ll > and C-RNTI of old cell). Other parameters like count, bearer and > direction set to all 1. >=20 > Signed-off-by: Gagandeep Singh > Signed-off-by: Hemant Agrawal > --- > app/test-crypto-perf/cperf_options_parsing.c | 8 +++++++- > doc/guides/prog_guide/rte_security.rst | 11 ++++++++++- > doc/guides/tools/cryptoperf.rst | 2 +- > lib/security/rte_security.h | 1 + > 4 files changed, 19 insertions(+), 3 deletions(-) >=20 > diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-cryp= to- > perf/cperf_options_parsing.c > index e84f56cfaa..0348972c85 100644 > --- a/app/test-crypto-perf/cperf_options_parsing.c > +++ b/app/test-crypto-perf/cperf_options_parsing.c > @@ -662,7 +662,8 @@ parse_pdcp_sn_sz(struct cperf_options *opts, const > char *arg) >=20 > const char *cperf_pdcp_domain_strs[] =3D { > [RTE_SECURITY_PDCP_MODE_CONTROL] =3D "control", > - [RTE_SECURITY_PDCP_MODE_DATA] =3D "data" > + [RTE_SECURITY_PDCP_MODE_DATA] =3D "data", > + [RTE_SECURITY_PDCP_MODE_SHORT_MAC] =3D "short_mac" > }; >=20 > static int > @@ -677,6 +678,11 @@ parse_pdcp_domain(struct cperf_options *opts, > const char *arg) > cperf_pdcp_domain_strs > [RTE_SECURITY_PDCP_MODE_DATA], > RTE_SECURITY_PDCP_MODE_DATA > + }, > + { > + cperf_pdcp_domain_strs > + [RTE_SECURITY_PDCP_MODE_SHORT_MAC], > + RTE_SECURITY_PDCP_MODE_SHORT_MAC > } > }; >=20 > diff --git a/doc/guides/prog_guide/rte_security.rst > b/doc/guides/prog_guide/rte_security.rst > index f72bc8a78f..ad92c16868 100644 > --- a/doc/guides/prog_guide/rte_security.rst > +++ b/doc/guides/prog_guide/rte_security.rst > @@ -1,5 +1,5 @@ > .. SPDX-License-Identifier: BSD-3-Clause > - Copyright 2017,2020 NXP > + Copyright 2017,2020-2021 NXP >=20 >=20 >=20 > @@ -408,6 +408,15 @@ PMD which supports the IPsec and PDCP protocol. > }, > .crypto_capabilities =3D pmd_capabilities > }, > + { /* PDCP Lookaside Protocol offload short MAC-I */ > + .action =3D RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL, > + .protocol =3D RTE_SECURITY_PROTOCOL_PDCP, > + .pdcp =3D { > + .domain =3D RTE_SECURITY_PDCP_MODE_SHORT_MAC, > + .capa_flags =3D 0 > + }, > + .crypto_capabilities =3D pmd_capabilities > + }, > { > .action =3D RTE_SECURITY_ACTION_TYPE_NONE > } > diff --git a/doc/guides/tools/cryptoperf.rst b/doc/guides/tools/cryptoper= f.rst > index be3109054d..9a7b990596 100644 > --- a/doc/guides/tools/cryptoperf.rst > +++ b/doc/guides/tools/cryptoperf.rst > @@ -318,7 +318,7 @@ The following are the application command-line > options: >=20 > * ``--pdcp-domain `` You can add short_mac here as well. >=20 > - Set PDCP domain to specify Control/user plane. > + Set PDCP domain to specify short_mac/control/user plane. >=20 > * ``--docsis-hdr-sz `` >=20 > diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h > index 88d31de0a6..2e136d7929 100644 > --- a/lib/security/rte_security.h > +++ b/lib/security/rte_security.h > @@ -233,6 +233,7 @@ struct rte_security_macsec_xform { > enum rte_security_pdcp_domain { > RTE_SECURITY_PDCP_MODE_CONTROL, /**< PDCP control > plane */ > RTE_SECURITY_PDCP_MODE_DATA, /**< PDCP data plane */ > + RTE_SECURITY_PDCP_MODE_SHORT_MAC, /**< PDCP short mac > */ > }; >=20 > /** PDCP Frame direction */ > -- > 2.25.1