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 11513A0C41; Thu, 18 Nov 2021 08:31:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 80DC141143; Thu, 18 Nov 2021 08:31:00 +0100 (CET) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2069.outbound.protection.outlook.com [40.107.22.69]) by mails.dpdk.org (Postfix) with ESMTP id D619540696 for ; Thu, 18 Nov 2021 08:30:58 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NuNUyAejF06WOQpvfahlFIc7hReEDvEk5eBst3BVsGJihKV1dBOYVOIDSBj13ctn5IobShC/D2BHDGM9vXCoNzJHbeaMPyIQSe0XqhEIjZ/FL6UesUsJY+BuPzhjH0XznpyMthQv+9y/Nu84p0AmkfBr9Ir5s30WZ3J/jYhTiRhzQvCyPqoKXZOA70UJ3aKuksn0XpP6EERGtoc1yEK59SnD6pzCk5EyCoFx0v3x+rI9T7/3QVsZHUTu+GgbpdnUHfkgBY6XQ+lAq6IIPxKH5ShX7tocrPnBOVZFMKCn1UhvMcSUfD/3ODptArqo/yJw4rD3GfIVFM4znOmGU+SVvQ== 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=002DXswxSfP/DzyEUmMgHgpDttekjbpEOEiC5km+1/Y=; b=WoOzwf9Yj1EzUQr7S0wruLse6ljDV+kPU+2hKOFzUExdacdBcKSd775ZaPcaofj0jJ3M2536O4Fv2PlttPoavBaFcNM5gGbV6bLbKfr4WXhJbPfQ9aIMbtneIt7yT6JpmCxl42crrd8CeDTQ3Vdd+G2qsD2MO0qga13yMnPIZuPyFFjoIpVd3sUIW2sGTzyUQFiP50yMs6nQkAWrUwba9eGRXJw2jC8S0FIjuih9nd9GA4DRP5gyUqM6FUUJblJk6KbBvmV0gsU189RX8yv6WYdjBmuw26F44K0XRYT7EsHwhhdAVVmx8XWB+idQwaIZR/0VPz3gpBSfzsWJbX6H2Q== 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=002DXswxSfP/DzyEUmMgHgpDttekjbpEOEiC5km+1/Y=; b=KP5At/c1YwVt6zkYSRoTf5qSgS9UFseVWrZkHuFSNq3Dxk1eWb76UvtVJhO+P+C87ojB9YoiQb7fGJZJrDadFCqLMYWDiBY1RL+v37QyZGwU2c51KWpUGNJN3y9Lo+nOsIts76llEvLXt/3oI5ZbPph1DXwXQl4fgEEZMDLCwWo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) by AM6PR04MB6247.eurprd04.prod.outlook.com (2603:10a6:20b:be::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.26; Thu, 18 Nov 2021 07:30:51 +0000 Received: from AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::9895:b941:f782:6999]) by AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::9895:b941:f782:6999%9]) with mapi id 15.20.4649.026; Thu, 18 Nov 2021 07:30:51 +0000 From: Gagandeep Singh To: gakhil@marvell.com, dev@dpdk.org Cc: Gagandeep Singh Subject: [PATCH] drivers/crypto: no support for SA lifetime Date: Thu, 18 Nov 2021 13:00:30 +0530 Message-Id: <20211118073030.2662798-1-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR01CA0013.apcprd01.prod.exchangelabs.com (2603:1096:4:191::9) To AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) MIME-Version: 1.0 Received: from lsv03457.swis.in-blr01.nxp.com (14.142.151.118) by SI2PR01CA0013.apcprd01.prod.exchangelabs.com (2603:1096:4:191::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Thu, 18 Nov 2021 07:30:49 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e9e10928-7118-46ef-9ee1-08d9aa65589b X-MS-TrafficTypeDiagnostic: AM6PR04MB6247: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:269; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PYGn5PniVJffZxOUE0QyQ9LmlN62a5p4NEbdy1oDHMvRvn71A8+8bNmxl62jOWtNi8X+CucEoudRBhJcrCY2ynCEa4gWd77NBc2VTwGKN4uTrFcIaKCdl9+ruc4+e4qq+LDofRa9jhrZFalNDprXu0qwV+zH/g3uPgY3k7nxYsnyzE8Wk1T370m7DB5TwdJaA0gFqdVIZY3gd8MiOQHhcJKDQppywqMUr3roOi/YhhbKap7LNNBr6lA6Pf58/TMwbC8vM149jiE42HLZF8HYPS1ZUf2O85JAI4O092ZPmM+1VMUoGmNwcYmyusZWXs6hMRcsK3jnq3RjkE1rlpeSurn4vQ7c/v+/TZrwKszKDLlsvUH9a7um4EIO5t2ViGEl7Osl5NM+AScGugXUUfjlJWpG3dorccqiFLeW8Pb0SXeeHj+ogfatXBRNW3AY2302TUZhcQ0vT5UXBF2hMJ7YbRgJ6c5jBm2gt4T/SbQqTj+pzstgRm7kO13Lfyc+yOZQrBJrXMmg+K6OonCexajSzWQcj22s09r0fFgn0ksDGIbv7zmgHt7yEWCBaBzCKGLQ5fYbHVmYVubIB6YQDRiEGJ0BRbBpIm5qGwKAi62I6hksq+O7HsOEJB7E6Q6YeRlHPZWyT7nPRXhfZl2zMNVnAt0lCURccjSzrDUzQWvoGGSpotm8eBfG3jEUEdjCmGvK4Y20gruiIwsp5Jf5RMV/TFnc3dlctEV5nQZgLR83hcE= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8198.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(5660300002)(8676002)(7696005)(86362001)(956004)(1076003)(2906002)(55236004)(508600001)(2616005)(1006002)(4326008)(6486002)(186003)(6666004)(66946007)(36756003)(66556008)(38350700002)(38100700002)(66476007)(316002)(8936002)(52116002)(26005)(83380400001)(110426009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?f9EQ3kuGHX4fwEGFimEHBApNelfmSP9FIbSkUWsuQ7kY5y3Rxz/M9YGz/7tF?= =?us-ascii?Q?Rym3/GeDqGcp6Pk+tJFN5CSfPgCjjNgPhb4ZqMiKG39D30WGUDNTZ57wTLoy?= =?us-ascii?Q?OpnHglM4StTZiu8AO6TLIa1osE1AEaD4dtFsfviTA4i65IpuhgaWOUr4zykM?= =?us-ascii?Q?WTzAvvkBdHNQCqalqQb14W5b0qVXTItNeC2R2SgpYgPaLWxV+1+txs97G+uM?= =?us-ascii?Q?qrXRCKnKBFfmh0PKd+mNTHqLCwg28cmOig8wp57Sp6GDu9vInPoddRGQZ/2u?= =?us-ascii?Q?BgPoNDwMM56obxFwDN303X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?= =?us-ascii?Q?sQGEFxhzy2ZZQFAaDHgcFIJG4LzED79zFh+al8hsDQa83p8fPme0ejpYzFg5?= =?us-ascii?Q?wNNRRGFweau/IaBGKwXXPMryVmn9vmpeqvTNX26Az2P4edJg9dV6nVcrUjV5?= =?us-ascii?Q?3yIQcKbIUclM4WRtSfaR5Pvel9YDz3x88LM3r9eQN6rWPR6RxRIfrU4H5Kv4?= =?us-ascii?Q?vQLGwUjp6H+kqW4jwGUp+MN2O95zOhFOJatS/rmfePVPb4mDkZlbPPJr4PqB?= =?us-ascii?Q?fO6iA1W2NEONj+v+RIuZroBs/zQmEz+GwLqYeFsxMYDbvl6kdNndD28hrSig?= =?us-ascii?Q?iDevSbgLnG/vVhm8TaeM/58ruuliEvIh2gjPpzbLiG51lfvEN5OW0m0XxRvB?= =?us-ascii?Q?/D2/ty8ZTbbBJXbXPpo=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e9e10928-7118-46ef-9ee1-08d9aa65589b X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2021 07:30:51.3828 (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: qD5+QVLy6sphplWtuGfKNMo+XhEVD59fsQ7F+umJP8GiQ+8228k5oWFQ//I4dXKN X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB6247 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 dpaa, dpaa2 and caam_jr drivers do not support SA expiry. Signed-off-by: Gagandeep Singh --- drivers/crypto/caam_jr/caam_jr.c | 6 ++++++ drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 6 ++++++ drivers/crypto/dpaa_sec/dpaa_sec.c | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c index 5909eca6e4..8e9cfe73d8 100644 --- a/drivers/crypto/caam_jr/caam_jr.c +++ b/drivers/crypto/caam_jr/caam_jr.c @@ -1756,6 +1756,12 @@ caam_jr_set_ipsec_session(__rte_unused struct rte_cryptodev *dev, PMD_INIT_FUNC_TRACE(); + if (ipsec_xform->life.bytes_hard_limit != 0 || + ipsec_xform->life.bytes_soft_limit != 0 || + ipsec_xform->life.packets_hard_limit != 0 || + ipsec_xform->life.packets_soft_limit != 0) + return -ENOTSUP; + if (ipsec_xform->direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) { cipher_xform = &conf->crypto_xform->cipher; auth_xform = &conf->crypto_xform->next->auth; diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 2e8e4c6adf..a5b052375d 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -2877,6 +2877,12 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, priv->fle_pool = dev_priv->fle_pool; flc = &priv->flc_desc[0].flc; + if (ipsec_xform->life.bytes_hard_limit != 0 || + ipsec_xform->life.bytes_soft_limit != 0 || + ipsec_xform->life.packets_hard_limit != 0 || + ipsec_xform->life.packets_soft_limit != 0) + return -ENOTSUP; + memset(session, 0, sizeof(dpaa2_sec_session)); if (conf->crypto_xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER) { diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 9a7d5eb8b7..a552e64506 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -2820,6 +2820,12 @@ dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev, session->proto_alg = conf->protocol; session->ctxt = DPAA_SEC_IPSEC; + if (ipsec_xform->life.bytes_hard_limit != 0 || + ipsec_xform->life.bytes_soft_limit != 0 || + ipsec_xform->life.packets_hard_limit != 0 || + ipsec_xform->life.packets_soft_limit != 0) + return -ENOTSUP; + if (ipsec_xform->direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) session->dir = DIR_ENC; else -- 2.25.1