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 C90D0A0C46; Tue, 7 Sep 2021 10:56:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 18C9041152; Tue, 7 Sep 2021 10:56:40 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150053.outbound.protection.outlook.com [40.107.15.53]) by mails.dpdk.org (Postfix) with ESMTP id B68594114A for ; Tue, 7 Sep 2021 10:56:38 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HT2roq9UFR8uTTtYL0JMqmX0imqmmVB20HpdLLTlBYeNdnGLz5Nd5TRSdcZq1WkDGHbq8xvZD1cNoGo1VU9YFJOANvEOe22TSTH6i3nnnX9qka/eYXz08BHInsdL10AQaQs0fKqWcZwCrFkKdLymyHBVO3Q5AsVCxv3xrfkXMMii+RjktCEm8HBIH2waejQSDaZJydbMPWre7ejOXeh7kfOd/gmtY7PsiboYEzvLHVaJLTanYYfMgcPz4LcP3hzxQMzS8dy8AW++aBc/GSGMp4FGk9Oj09on0VDdtm8S3PpVg2K/L2VyYQ+QTuvh9CchrUTZPv6Asr7hIFeIwTtMfA== 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; bh=eEiq19Zl+ovhuKuMjbddbPmCjjLKHlkxa5FtScmvopY=; b=CE8MdCGQN7x1rDSCkk2J7gMshIO5buGstm3MDhdwTwaiXui7tKZoy2SVIEqTLiwf4eDIWjoeW9uhL+3zxcCcYL5DDKFv/jrX92mnsbMCRgsmxlfijAmdU9zyUGoArt6Y70PU0NwAE/0nwMaNVZX5kB7d4g1jCd7N56Y5knyg4lualXrnTKI1vwWRw+BHFJNL1CrlYpRpZpwLUDHPytBLfhGPWHG1IcbT0sw5Ppk0/Ii/SE03bPSLKxgtlkIfVR+zko9uJaji8ak81dr50kW2YWl4loeCWhIiDcnAesEu237q8ImEe9YcAO4vEb5j5/y5NMxVKJrvOmzqpRhJOJXC6w== 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=eEiq19Zl+ovhuKuMjbddbPmCjjLKHlkxa5FtScmvopY=; b=OrGqm/5Roa2RTKDZr32AuGoV26bNr241my04zyeEWia5JjjcYNQFNog0WaB/bbGzIEL98kBzVnZ+uW81c0EmiuP8GWARNa4QN5A98O77lL/aP7FFkCXavmbmxajldA4ZUbegXthxeIu1VbiJd2nJ5ffvcASeqFVSm4IhcNKVDzE= 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 VE1PR04MB7262.eurprd04.prod.outlook.com (2603:10a6:800:1ab::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.21; Tue, 7 Sep 2021 08:56:36 +0000 Received: from VI1PR04MB6960.eurprd04.prod.outlook.com ([fe80::d496:fcce:f667:7aa7]) by VI1PR04MB6960.eurprd04.prod.outlook.com ([fe80::d496:fcce:f667:7aa7%7]) with mapi id 15.20.4478.025; Tue, 7 Sep 2021 08:56:36 +0000 From: Gagandeep Singh To: gakhil@marvell.com, dev@dpdk.org Cc: thomas@monjalon.net, Gagandeep Singh Date: Tue, 7 Sep 2021 14:26:05 +0530 Message-Id: <20210907085605.3010882-6-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210907085605.3010882-1-g.singh@nxp.com> References: <20210826112315.1375237-1-g.singh@nxp.com> <20210907085605.3010882-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR04CA0133.apcprd04.prod.outlook.com (2603:1096:3:16::17) 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 SG2PR04CA0133.apcprd04.prod.outlook.com (2603:1096:3:16::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.19 via Frontend Transport; Tue, 7 Sep 2021 08:56:35 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6847db0f-0e89-46a2-6d33-08d971dd661f X-MS-TrafficTypeDiagnostic: VE1PR04MB7262: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1417; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bzUgtLSQWnedImVxgaoh50atk5waagFJDZCX2ZsdWywOwANN5hMtCwC8jjFfDAYOeJGLzVWNWROZhjaKk4eVfGO69QwdBrhwdvrjzuEc9xWVekHi5EmXnloK9JUnbAjc5zv62uMMzwl02SgWcBs4N2U46wZz7hGW1HIFUuTcj3FLccvzkKCm2NQe0pjY15+g06kzVpyC3BaYIUG+3rTXdtDBi+ek3u428OkCuqOw6CQ32ByDGcyAWXtk8guBJSsRovNCBMl/YCmIF+8ePtGM6J/YCfCC1VQQMt1gWMMdzrWwEfoiIz2iatlxc0qxN3geyesJgYumwMtAgxM+OJT4gV/tHYIR8mvhr+grHj1wFYA3M49al421v9keG4KC9JSv8GVj2uiRRXKJuttplj9Z7TvZu+xi7jq1uHkn3uWXgJrS0b/SjKhdmlZplCUYzRrQ3AFqRKdYeHnIMFL1BZZ83k12wULMA4ZjUjAFsjRSAM2lZLzxX9RVBYcCu/N4fNAEj2wNhJgWJIkZ/ORujDj++M2YNXdsYKxKQoGC9iOxkkYPADY24IS6HVGSdJOgdKG26Jo3HDBHvQwzFLzfo48eGttJA/Xjji4BQRZTcuqSLGrWbU4HfcDjOU4YkkmrbzHYJhzc23fjUD1cdwaJATVh71ZtGt4vWp5WAFvFJEvT06RM2I6FvU9BcDyTEcZjbevhr7nn+RIldf0xFml7gj8yBlph9O0rlK3XR/tpk8GQYEM= 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)(346002)(366004)(39860400002)(136003)(376002)(396003)(1076003)(1006002)(36756003)(55236004)(66556008)(66476007)(4326008)(38100700002)(6666004)(8676002)(52116002)(7696005)(8936002)(66946007)(38350700002)(5660300002)(478600001)(26005)(956004)(2616005)(6486002)(316002)(83380400001)(86362001)(2906002)(186003)(110426009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?eiHM7PWn3t2WOvpvXw1hMe3wPAdgQtYqZvRIDvtaXSRz7n6luEFfI1cskj+R?= =?us-ascii?Q?PStQLbWbRbt5+8jTt9Gt50dRKEVVeJ0rfdA8KeY9689oQWOaBiqUm2vdpjtM?= =?us-ascii?Q?9tYA1G1meHZ8njPvW1XlMJMn/z4D6vFLQgJ5lmBeouUS29Ortv7xmrkGcWvF?= =?us-ascii?Q?gmSqSIErk3KfxaZbADi49BguaGSttQ6+AgnSMiVUoLGRCxSVRZTL/XJO6OuM?= =?us-ascii?Q?L419rloFnKeYbUmdiVjGI9GLRlGjYnyz1H5mre5C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MGHRj168uq85bEqA9eoYsOokPzx9gNFFEiNezscTTuNEyBhiNRl8?= =?us-ascii?Q?10o90Y/yHReqSD43Wb/Si9j+qzqce/28nu6mieuYoyJjYg4p3G/tbNnpUc6B?= =?us-ascii?Q?+2IFAjLEYcWelWvPve5xI2zxGTM/DpsgQ0cwMsrBJwxfR1zWICXaIv91VnH6?= =?us-ascii?Q?M85K54tILigXNF7vQeWZ9z+s?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6847db0f-0e89-46a2-6d33-08d971dd661f X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB6960.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2021 08:56:36.8545 (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: JyPJZCL/1XSe9VOGQgJsb1SO1MT6ls1xRjLx6QCAd4oEodePDxHNzk0hvfnUtnSe X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7262 Subject: [dpdk-dev] [PATCH v2 5/5] crypto/dpaa_sec: 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" This patch add pdcp security short MAC-I support for dpaa_sec driver. Signed-off-by: Gagandeep Singh --- drivers/crypto/dpaa_sec/dpaa_sec.c | 3 +++ drivers/crypto/dpaa_sec/dpaa_sec.h | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 19d4684e24..59ac74f3d8 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -294,6 +294,9 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses) ses->pdcp.hfn_threshold, &cipherdata, &authdata, 0); + } else if (ses->pdcp.domain == RTE_SECURITY_PDCP_MODE_SHORT_MAC) { + shared_desc_len = cnstr_shdsc_pdcp_short_mac(cdb->sh_desc, + 1, swap, &authdata); } else { if (ses->dir == DIR_ENC) { if (ses->pdcp.sdap_enabled) diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h index 368699678b..2ab9c69bb6 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.h +++ b/drivers/crypto/dpaa_sec/dpaa_sec.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: BSD-3-Clause * - * Copyright 2016-2020 NXP + * Copyright 2016-2021 NXP * */ @@ -769,6 +769,15 @@ static const struct rte_security_capability dpaa_sec_security_cap[] = { }, .crypto_capabilities = dpaa_pdcp_capabilities }, + { /* PDCP Lookaside Protocol offload Short MAC */ + .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 = dpaa_pdcp_capabilities + }, { .action = RTE_SECURITY_ACTION_TYPE_NONE } -- 2.25.1