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 C468F43E57 for ; Sat, 13 Apr 2024 14:57:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BE66D40DFB; Sat, 13 Apr 2024 14:57:11 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2086.outbound.protection.outlook.com [40.107.94.86]) by mails.dpdk.org (Postfix) with ESMTP id BF5F7400D6 for ; Sat, 13 Apr 2024 14:57:09 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SaoLWmlAldFlpt3Ci0SolicqbAJyPn6Y2gorp0IKpdxrJRw4aDqvunvVTLFg+QbdacE90I4d/rzY5zx/IVBo7nOBtx8B+FuUQ7yZSd2gP0GHfQAj/FuyI5ebkP0wvK9UuWpx5LkhAXj34MdhJltlb8RbeE0aqjgXMXiaS+CpjQyu21e9vMKDS5I71h2MPFiR9pOQ+1Vt9SX8A6rhi24ixqRQVw5a+ugZDNfXlyU33DL3AcWkaf6CkqoXO47lCNZ0y7ZWSTVMkSoro2kJ3KiFz2aZwB0a1bPV/d44bSKe9UEhVKAlXmDkvyCXIrpz8RAWC9LTuOXF342zKTPOEklG8Q== 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=Mr1qdE+aB9nvmu2u6hXk48y2Qbx2XdHLtPrLvPxV09w=; b=aoa0LNBSrm7KWGeHdqs6sndKJdq7fV+mYsVHpjPt2qtUavmzr8uIZBoEImgyvBY9k/7Vd7Vp3+c4koLP9YOrD4IFjleMflIGbxb9Qm1bALs8Z7Lu/RLguVyGBb/Kv1r4u00IV1FVYlUCbA7ZQ/FvNbwvPfWlt9GG5AlK0I70Flxa3SYBbd0g9arzapIf+mJ77SdWld3pi+VguL4/KC3n+pwefOPpcCnfxCC7SpgTtv8mrIUWAXomDgIg31pozWyaWGOfXgldoKQScgOelp8FC7SEoSM263/mO9vUSaHsHremRH46FzK7Sd+Lt6H3j6U3Igev2zBpo77yH2on0uwYsA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Mr1qdE+aB9nvmu2u6hXk48y2Qbx2XdHLtPrLvPxV09w=; b=YqwHUgr7iRPZJMOE0DzCUTxSYtS2edwuonad0qt9PDQEn+bOKCH1dnPvxyQe1z/OUA0GeEhXPTX1fs6Kb6KvkivngMIYCKoAAs70SXmQgGyXZ/FUUVx+AOzmwlyyyT8WjOBgWoGtWTp3VNg52TeCFSfmAfaruQUCD14o3qsesLh3KwYEW8QgbMjsNfMmTmAOd4W+88TK3ODohjotO4gwBSA+xOprs011c4wh4cDfB9uz8X4KrtPNtkbETh9NwgkmBtaGnTDHdGwTvKL6G+n5nt23aUicQEysUx/YhZbAQQ2cuvlRR7QbsKlxAWt5ivonBgxpXFsvjrprlSXuy97y2w== Received: from DS7PR03CA0144.namprd03.prod.outlook.com (2603:10b6:5:3b4::29) by SA0PR12MB7463.namprd12.prod.outlook.com (2603:10b6:806:24b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Sat, 13 Apr 2024 12:57:06 +0000 Received: from DS3PEPF0000C37C.namprd04.prod.outlook.com (2603:10b6:5:3b4:cafe::34) by DS7PR03CA0144.outlook.office365.com (2603:10b6:5:3b4::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.26 via Frontend Transport; Sat, 13 Apr 2024 12:57:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DS3PEPF0000C37C.mail.protection.outlook.com (10.167.23.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Sat, 13 Apr 2024 12:57:06 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sat, 13 Apr 2024 05:56:46 -0700 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Sat, 13 Apr 2024 05:56:44 -0700 From: Xueming Li To: Radu Nicolau CC: Ting-Kai Ku , Ciara Power , Kai Ji , Anoob Joseph , dpdk stable Subject: patch 'examples/ipsec-secgw: fix cryptodev to SA mapping' has been queued to stable release 23.11.1 Date: Sat, 13 Apr 2024 20:49:15 +0800 Message-ID: <20240413125005.725659-75-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240413125005.725659-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> <20240413125005.725659-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF0000C37C:EE_|SA0PR12MB7463:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b532934-88a0-4263-68cb-08dc5bb9394d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dUtIGDaFWpjSjWMOepFkcz+lTlvyBMzviLGLisrFxzF702/xp/fNnjlU2cd4lBPDWDOxrAtzaeL/zVxa4kEfAn+foVRcnwwvNY8HXtSloc38erbPhnUdFd0px7Ko7lLIUacIApEX7qWMJDdsc313VnlJUKIMNWsGtnWfIfIIN+FQehiuZkVmJDX+wMck8sn/bMv3WbKFNQlFLI90FwRg9K4DYq7h7o/NcV1qMzRyTIE7c1xSbeS4xXmn1r43dTODi8546Fo0EWLnG2Jmtab2W/ZXXgzjprsdYztSgOCvntLtO+hhu3W0e/EAjMCzw2fRxfwQrOhF8VKb6CJt5fuaQNBfjQxxWxCJtR5x8Zq97ghQ/mVvVAShIlZrwbYAuFG8sEY+PbX0Ia/uMTSkC48KwjDWRGgmtWCc54/2b9NICw3rrZBVw6TxZzbgZtu0vTc6w3jTXARdZSfu3Y/JdA0vIl79S7dPYYWv5V4O4xdeMLZRFxnYRCV3PFchwMu5SSwcJTyETEIghPrhQdHmKCdXpa0ReD7usB5vdGB29ssIYQA4GtPpv5hbmg1e9vFFwaurzPmoDwXcqH6O0MyRu65d6xf6atvdLwYFEtVwKfBulFkjNHV+GtYALDMFPvPdIXyfwtgSse+PleDlSUesj3KjSF9avyo9+lx4+m1UoT8pYAb1J09ua9Moj/HrUW4BqWZ4W5Rg06N91uuNH5ClmTCFeG9eb9Ea7pMt831nejd3HbM99dl8YwS4ktp2zTa+BY7/ X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(36860700004)(376005)(82310400014)(1800799015); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2024 12:57:06.6813 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1b532934-88a0-4263-68cb-08dc5bb9394d X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF0000C37C.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB7463 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 23.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/15/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=90d0e13d7d2651f8a32c66378d23605cd664c446 Thanks. Xueming Li --- >From 90d0e13d7d2651f8a32c66378d23605cd664c446 Mon Sep 17 00:00:00 2001 From: Radu Nicolau Date: Tue, 27 Feb 2024 13:28:46 +0000 Subject: [PATCH] examples/ipsec-secgw: fix cryptodev to SA mapping Cc: Xueming Li [ upstream commit f406064ff0988a53f955c74a672d696c595dc0f0 ] There are use cases where a SA should be able to use different cryptodevs on different lcores, for example there can be cryptodevs with just 1 qp per VF. Hence, the check in create lookaside session function is relaxed. Also added a check to verify that a CQP is available for the current lcore. Fixes: a8ade12123c3 ("examples/ipsec-secgw: create lookaside sessions at init") Signed-off-by: Radu Nicolau Tested-by: Ting-Kai Ku Acked-by: Ciara Power Acked-by: Kai Ji Acked-by: Anoob Joseph --- .mailmap | 1 + examples/ipsec-secgw/ipsec.c | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.mailmap b/.mailmap index debb7beb5f..3b32923fef 100644 --- a/.mailmap +++ b/.mailmap @@ -1431,6 +1431,7 @@ Timothy McDaniel Timothy Miskell Timothy Redaelli Tim Shearer +Ting-Kai Ku Ting Xu Tiwei Bie Todd Fujinaka diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c index f5cec4a928..c321108119 100644 --- a/examples/ipsec-secgw/ipsec.c +++ b/examples/ipsec-secgw/ipsec.c @@ -288,10 +288,21 @@ create_lookaside_session(struct ipsec_ctx *ipsec_ctx_lcore[], if (cdev_id == RTE_CRYPTO_MAX_DEVS) cdev_id = ipsec_ctx->tbl[cdev_id_qp].id; else if (cdev_id != ipsec_ctx->tbl[cdev_id_qp].id) { - RTE_LOG(ERR, IPSEC, - "SA mapping to multiple cryptodevs is " - "not supported!"); - return -EINVAL; + struct rte_cryptodev_info dev_info_1, dev_info_2; + rte_cryptodev_info_get(cdev_id, &dev_info_1); + rte_cryptodev_info_get(ipsec_ctx->tbl[cdev_id_qp].id, + &dev_info_2); + if (dev_info_1.driver_id == dev_info_2.driver_id) { + RTE_LOG(WARNING, IPSEC, + "SA mapped to multiple cryptodevs for SPI %d\n", + sa->spi); + + } else { + RTE_LOG(WARNING, IPSEC, + "SA mapped to multiple cryptodevs of different types for SPI %d\n", + sa->spi); + + } } /* Store per core queue pair information */ @@ -908,6 +919,7 @@ ipsec_enqueue(ipsec_xform_fn xform_func, struct ipsec_ctx *ipsec_ctx, continue; } + RTE_ASSERT(sa->cqp[ipsec_ctx->lcore_id] != NULL); enqueue_cop(sa->cqp[ipsec_ctx->lcore_id], &priv->cop); } } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-04-13 20:43:07.299143126 +0800 +++ 0075-examples-ipsec-secgw-fix-cryptodev-to-SA-mapping.patch 2024-04-13 20:43:05.027753892 +0800 @@ -1 +1 @@ -From f406064ff0988a53f955c74a672d696c595dc0f0 Mon Sep 17 00:00:00 2001 +From 90d0e13d7d2651f8a32c66378d23605cd664c446 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit f406064ff0988a53f955c74a672d696c595dc0f0 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -26 +28 @@ -index 66ebc20666..50726e1232 100644 +index debb7beb5f..3b32923fef 100644 @@ -29 +31 @@ -@@ -1442,6 +1442,7 @@ Timothy McDaniel +@@ -1431,6 +1431,7 @@ Timothy McDaniel