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 78A02A0C43; Thu, 26 Aug 2021 13:23:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B99D541215; Thu, 26 Aug 2021 13:23:43 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10085.outbound.protection.outlook.com [40.107.1.85]) by mails.dpdk.org (Postfix) with ESMTP id CA6634120E for ; Thu, 26 Aug 2021 13:23:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bEhV0iOfSW4/A0YpRZxczz9vYmTrAUFSepNFo3AcnS/04uUn0WEAgl977U1QqUckRiMJuHVsgTweSUA/cfQTWg4tmBDVLsiYyrfdJNmCzMy2+axRDKHvqyzSByjl52tvJLMV6SxHpfr7mevqQIIFo+sVBUa1+F7jb8de8cgItoDl7P8nFGFvDlATqfIeTFs4ijkHW/4uxG6aUXnwivnjgQM16rTB9m1oYmUaNx2ZRRfctymtOgb/cXxSHrwrnh2KsrpCYFefQxj+ESaAtqqSBVMk4euZSc17rDkakrxR8IGEi/BM9RTy42zGNgcxvUQiCfvkfGWLiXzNdVkSjRuuew== 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=l54jMJ+R6Zx9mKAjXnvf5/oWFNs176HATRN56MxaXQs=; b=TaKQmwfrXveVKSy/PqlpPWhLtb0cVeriERrP8BJvCLWpgr6Iom6Xcg1rf3wUDvWLQUnrFldak9hAj/RRW6D/kPuJmRjZH5pimuD5F0ZBcHmq+oWmOO5mvnNEDiSRyMJI7Vub8IGxdaU7DGuZi6XLjeJTDTbE1xfG1tkAPFnykFCuBvqzqrP9qKACHzU5L115lappUULKoUP72565iG9fF4Lvs7nGbu8sV/VjlAUcQS4HRAVkt4ZdeNT8yfUHYJ4sPS1AVutK5gk+mWXVmEgXSPed8qBQ2h7B+qJTB0o+bB83cxzZhqkmeAYNlIBw5l70rFAmXyF9x7Tebceb1l5OTQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none 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=l54jMJ+R6Zx9mKAjXnvf5/oWFNs176HATRN56MxaXQs=; b=MkFP4A4YA6MBAjuSp/gXQx6v1IAB5MUPFvjSMFHuzzcGLAT5RcWRlBK69XXmuQVfxb9jIkSyGyNkOjs21onB1rpRHoyz/ny0XJJBLGL3i/Csxk91a4xVQXajf/WSkR6qJlQJzK/nFaN2pSmMBdi2qFQh82gNnNgaR28G2pt7BZA= Authentication-Results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB6960.eurprd04.prod.outlook.com (2603:10a6:803:12d::10) by VI1PR04MB4477.eurprd04.prod.outlook.com (2603:10a6:803:6e::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.20; Thu, 26 Aug 2021 11:23:38 +0000 Received: from VI1PR04MB6960.eurprd04.prod.outlook.com ([fe80::d496:fcce:f667:7aa7]) by VI1PR04MB6960.eurprd04.prod.outlook.com ([fe80::d496:fcce:f667:7aa7%8]) with mapi id 15.20.4457.018; Thu, 26 Aug 2021 11:23:38 +0000 From: Gagandeep Singh To: gakhil@marvell.com, dev@dpdk.org Cc: thomas@monjalon.net, Hemant Agrawal , Gagandeep Singh Date: Thu, 26 Aug 2021 16:53:12 +0530 Message-Id: <20210826112315.1375237-3-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210826112315.1375237-1-g.singh@nxp.com> References: <20210826112315.1375237-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR06CA0179.apcprd06.prod.outlook.com (2603:1096:1:1e::33) To VI1PR04MB6960.eurprd04.prod.outlook.com (2603:10a6:803:12d::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from lsv03457.swis.in-blr01.nxp.com (14.142.151.118) by SG2PR06CA0179.apcprd06.prod.outlook.com (2603:1096:1:1e::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.19 via Frontend Transport; Thu, 26 Aug 2021 11:23:36 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5d507a97-124e-4c8e-14a0-08d96883f35e X-MS-TrafficTypeDiagnostic: VI1PR04MB4477: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3276; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9yQhUWnkYDKQg8Dc6lKwHwLw7Q98NeBXvzvdoSrA6qktci5tuuRHWtKfFlwhTGeH+tNwfHIDTIwtwpqJBougHyvr8ehfjI3hSTdW0109+715x8hkQMn9Fps8KwU6g/+vFmTwG6ffvrk41ncdaBvP315mCszEhN5Tj7bqrpzHYbwOOoZEO/fBgVx/OmofkCn56f3aKSa3GlmVCDSXSB+JYZpOR67T0ORTQrCqISQ3i5KfyHFH13yjFSOtGGHeyczR+jaYK0v7OEeUvnc4zCBOl4ouetv/ce+um3NC5Q7xgWTac7nz3xMW1uJ5j/BRPglzG8jqPYhDW7meumddoTRKGNH8TvnplPnLN+naghcJqLzd5pn7CIG7l6461E9xHYwR0cTb5Lrl85MhUDXZKpoi76Jti6pWvybobKJ5rxGlv6hrz5B4muETp1tkcHq5ad3aEvDnQLd03WHzUbBwaAvgzgZMXpilQyJuxicl2leJx+iFfi8I5KJZOlnAhp29BGBAUNfb9CjHiAFKbWoeNjv2jFeWXWruihmo4zfBiLR5qOWMzMZfgAsLxsshgf3Z2dVIIkC2OLA49i/kBvZD6VBb+4CyiCuZavpgG1GFswJCx7gdmyKbEGOwtEXmQoOcRmVQQ4rsYGFB2DtcMKY5wvYbhWwC+EchAkucPgYgFu2KuPgNOeCawqrhYB/+0pPmQUJTib45DhNRpWpsnyxSXgA56/QjGZ1+GFIjF+Xg6e3WKOA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB6960.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(508600001)(55236004)(66946007)(8676002)(8936002)(66556008)(2616005)(26005)(86362001)(186003)(83380400001)(956004)(15650500001)(66476007)(6666004)(36756003)(52116002)(7696005)(1006002)(54906003)(4326008)(5660300002)(2906002)(38100700002)(38350700002)(1076003)(316002)(6486002)(110426009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?pWSCrPHQbn9n9PZ3JzwZNE/1M8vPh8y2UvgQBNnMl4FLyUHsxIEokBRN1BOH?= =?us-ascii?Q?JD4It6rWLVK+mOkkb5zzQvGCnFyJRSZPXResduDy/Fk0CtH2CaomV4q9O8YM?= =?us-ascii?Q?M0BEEj84uemlZ83b1+frj9ci8woDVCL1k3AA4JMEb6IeI2BE4vw41v6RJoKi?= =?us-ascii?Q?KhLQaQesGMlvcypXWjv+CvH6p+VPNcz47f+LzoIaN1bzVdxORgln1xflqCL2?= =?us-ascii?Q?nd4lMGg7w31obhlpyCXRON1CGgr6JsZgl6L7wT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+N4IO3LADHY708/w2HZcxISCPhGzyqtxpR2vkrsaO3YYvHixbjNSDcBB?= =?us-ascii?Q?FPNM15WYpVbqIspSocNlcBx5B/f1SATQS96eMSkKhL5E5kOU1rCBOTiwjcQ8?= =?us-ascii?Q?Ff4UF1KcaRK+cv2HvB54c3MxcfiJwlLbKXOKzkNvG3VLgf81YQ/xhDi2+pGP?= =?us-ascii?Q?lk1hN3/KBD1MgmhS3Wz1Q5U4?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d507a97-124e-4c8e-14a0-08d96883f35e X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB6960.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2021 11:23:38.6333 (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: NQbU5hgG7efgt/5t9ZwRP0sq/Samt6e2MQ0mZD73i0cO4+US6y+BC2G5xIXjs7Pq X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4477 Subject: [dpdk-dev] [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 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. 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. MAC-I = f(key, varShortMAC-I, count, bearer, direction). Here varShortMAC-I is prepared by using (current cellId, pci of source cell and C-RNTI of old cell). Other parameters like count, bearer and direction set to all 1. 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(-) diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-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) const char *cperf_pdcp_domain_strs[] = { [RTE_SECURITY_PDCP_MODE_CONTROL] = "control", - [RTE_SECURITY_PDCP_MODE_DATA] = "data" + [RTE_SECURITY_PDCP_MODE_DATA] = "data", + [RTE_SECURITY_PDCP_MODE_SHORT_MAC] = "short_mac" }; 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 } }; 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 @@ -408,6 +408,15 @@ PMD which supports the IPsec and PDCP protocol. }, .crypto_capabilities = pmd_capabilities }, + { /* PDCP Lookaside Protocol offload short MAC-I */ + .action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL, + .protocol = RTE_SECURITY_PROTOCOL_PDCP, + .pdcp = { + .domain = RTE_SECURITY_PDCP_MODE_SHORT_MAC, + .capa_flags = 0 + }, + .crypto_capabilities = pmd_capabilities + }, { .action = RTE_SECURITY_ACTION_TYPE_NONE } diff --git a/doc/guides/tools/cryptoperf.rst b/doc/guides/tools/cryptoperf.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: * ``--pdcp-domain `` - Set PDCP domain to specify Control/user plane. + Set PDCP domain to specify short_mac/control/user plane. * ``--docsis-hdr-sz `` 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 */ }; /** PDCP Frame direction */ -- 2.25.1