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 17E9D45CE3 for ; Mon, 11 Nov 2024 07:33:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1025540685; Mon, 11 Nov 2024 07:33:36 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2067.outbound.protection.outlook.com [40.107.92.67]) by mails.dpdk.org (Postfix) with ESMTP id 33B9540685 for ; Mon, 11 Nov 2024 07:33:34 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jaZxYyEV+Ks+jXXPypbcvdREVA07YdrZcuKUZwBPTvK+h16V1livldzIZvCK7geOoVia/ZwGBBJUYDfIhzxKLQdMkw13EU3smY0vtnoODmMzLkZ/6nQFsoJzfFvaSj8WJxgwb8N688kiVShuCrriSEZOZ9eB1IV/aW8Nd7yqxS4nKp5nV2zTNu/mYhoBBP4N3fEclSvBcdK82Oi8QTlh4SeKxMQJcbA1pB5RFUIKhAxq1TpZC1h2KzUtSkl9tXvYPdzJKQzaUmGwgFuwTb9Ez8TTwmz0zgSrBXDg4duY8ulRsWniaH0wwFX+vuQcUPS6Bqxtxr33I6uN2d0jKm+4Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=ilBHHJrFp9yRqc6dadWJED/zETf+Nz1f3ihD59F0a5U=; b=XTcQUZIsg1EK6fXpbCRupL4EwLqkuccBeX01PcVrcrjo/Tmc2p2bAYULvDwLexXb/17YjRxGw9uQVCxKG0shJch/qfG6TTa1HRk0spkKzKShNwkhQZIQ5fBb4fLyX7SYpLtuOycZ38CDPwqIaztGwCVDmOFRcYCdbjpPg/QeulMoPCHGjeSKf1oR5Xyrjv4h3sI9tZVOVUxBl/Qm3zGyTNjBPG2R1J/umINBS2sUbU+qH54w0HorMeLVENTWXLO3m5vLwWfcbIpwqfGcMes1DKPXodC6eM78gs4JScD3Sp9+n3yfWsmuo4AxAb0nXk5W2kELNG4HBchB5R17mPjBQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=marvell.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=ilBHHJrFp9yRqc6dadWJED/zETf+Nz1f3ihD59F0a5U=; b=Mu6a87kxMzI0D94Nl07j6Ew8tdCzhOqItz53RPYkulsBMnoPn+5RlM6b9WPGgoirE4AP57/BUkYM8fvKBh0Ve79E2cpu70y4kDrT1Ac5UGplHZ5iLdDiY/unTYTZGBtNDWEb9c6zttSjiQHiY31mCuobImO/xg7C9DYiPOh5oZB91VewTKlSVzdrxcxe7Pwac9k8qiDZSGxfVuB8lgG9wmO0mWszw//XlNB8d4TtY6eW71Z1lq4BdflRrRdp4QGuadhN7at227BOZ8GMzDs0m8m3ClvRrYL0Qf6858ij2j4LmfAWqeZIBHe+7CwLAFUWGdFKCPXRp2yL3gCn0ol7Cw== Received: from BL1PR13CA0093.namprd13.prod.outlook.com (2603:10b6:208:2b9::8) by MW4PR12MB6705.namprd12.prod.outlook.com (2603:10b6:303:1e3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.26; Mon, 11 Nov 2024 06:33:31 +0000 Received: from BN2PEPF000055E0.namprd21.prod.outlook.com (2603:10b6:208:2b9:cafe::ca) by BL1PR13CA0093.outlook.office365.com (2603:10b6:208:2b9::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.14 via Frontend Transport; Mon, 11 Nov 2024 06:33:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN2PEPF000055E0.mail.protection.outlook.com (10.167.245.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.1 via Frontend Transport; Mon, 11 Nov 2024 06:33:30 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 10 Nov 2024 22:33:18 -0800 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.1544.4; Sun, 10 Nov 2024 22:33:17 -0800 From: Xueming Li To: Rakesh Kudurumalla CC: , dpdk stable Subject: patch 'net/cnxk: fix OOP handling for inbound packets' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:27:26 +0800 Message-ID: <20241111062847.216344-41-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241111062847.216344-1-xuemingl@nvidia.com> References: <20241111062847.216344-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055E0:EE_|MW4PR12MB6705:EE_ X-MS-Office365-Filtering-Correlation-Id: 698edf71-91e4-42e8-dfa6-08dd021ac224 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?3VpPSgZ2PPa2waIH1UeuXEogOiYGDFRAa+//nfQtok3iTvfEc/ae0AgIhN4r?= =?us-ascii?Q?DWthneG7oR4DUdcdZs6r+baISLN83SlceRdmxksxT+vPOtUGzv2q54+aINLw?= =?us-ascii?Q?mEnrJjL3VEwcfvPRoljMVG8Bu3QpZ1eVMplAlSggI89QhLucqOnP5dYGUBwV?= =?us-ascii?Q?Vy7SiHjOtyicaR22DEWLIO8thFMNWSQ2a8Za7oaN08c0lwswhv+hQ/mPRkJU?= =?us-ascii?Q?DA3Ke3ibDaiDbDea++AfdZISzuUvCvRGvMRJ1XZqZkX0IVpzJEPEgWC0uczJ?= =?us-ascii?Q?kI+R0sRNv6tiOnbSlAu7rjM5oB1RaqHQF7LshyLA+NsZ6nv4b3dWQrnec/bn?= =?us-ascii?Q?zIKVUmIKu6ch+kmhXjNLfEUd1xoPkGKmBF+IZqU+uP63uCcPgOU+PXN1m76F?= =?us-ascii?Q?XKmRBDg1taJ7fc6K+QHXgO8Dkhzx4s1snHIUuJaJqxf9PGK+lnjNW4UIuMk5?= =?us-ascii?Q?iIurdoT3HhWdH2UzQS1WP5+KWruci916eq6GAchZNUhHCC+plbtg1+VfZA5R?= =?us-ascii?Q?roWIcK0NHWfXfDdJV74c1fgTo2oiEVdbBzw8+hYX0/k7eWj+OX1DxJTciNRr?= =?us-ascii?Q?yNU0yqcxBesDuVmR2QqmdN0Dgo9shpVQ15odmTFAp3czTIvCWw03XSQZlYwk?= =?us-ascii?Q?B67+/upnURkAZQeJNbdzNcoNzEhVODoHJf0Y6Vxu87ASx1ZGsHuUKdbnpRI0?= =?us-ascii?Q?KswNhAORqC6mrdMLScnoYmEXPIIqKm+T6wFdSf2YQmF73W1uiyX9D5ikrHhi?= =?us-ascii?Q?vsnB9/eYELHqkUjaiaY8vOVQStzIrmVszinTMht5PyE6HEUWZXAMuaFWRRuD?= =?us-ascii?Q?a98WERv9IDw61jcXbBzabaawWd/ccxIMN5KMVDFgHsEz7gtVCQq9Qb3kIROu?= =?us-ascii?Q?ObL0s1B13BHxbsP86LY3SIayjDsEIiHEbJ3Qw4+kEtRNxT+WVUWCIrBkJf7h?= =?us-ascii?Q?W7dCHSpoXDosPE4os+t0YI64oz31XrkIqJ8472XVmVxMdT7boF5jMOEHBz9S?= =?us-ascii?Q?k8wZrTI0kZSFFnKCadb49cL1VrgEpZEuLIcQNdlxLC/lBHj76Jz2dCtQ/7Q1?= =?us-ascii?Q?RlDlTZ7CGk9VyY8f6ML5WAbRw0xom6gh8VKBZLIYIw6D00k9YL22MpwEvubo?= =?us-ascii?Q?B9a2GvCzbWrveNmmxRD/m+YSsjC96cAI06uUh0jK/DxtrbpWoov6RXiFeEf6?= =?us-ascii?Q?i4gZp7o1BDDlhcegVvtGh44cpcI5yjwlHld37Uyy/YY9/p/GOkF+ooHyFEFM?= =?us-ascii?Q?HEEtt2YvcQJ+Jyb3VfYenOYia6k9va+VSd8fulGfQ3WWWSrrjkzzfyHY74F+?= =?us-ascii?Q?s9gf9JICjSoiUrUV06fa3DTEXPfxVsk1nIwH9BovxIzvD4PrhjugXqelvzlg?= =?us-ascii?Q?Sfg/gne8MdUK6dkQitUJj6dN4xzCpAWwrUWkkSINNjZP4i53JA=3D=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(376014)(36860700013)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:33:30.4048 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 698edf71-91e4-42e8-dfa6-08dd021ac224 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF000055E0.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB6705 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.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/30/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=92230f6939d975f98fceaa01cf21af926741e87d Thanks. Xueming Li --- >From 92230f6939d975f98fceaa01cf21af926741e87d Mon Sep 17 00:00:00 2001 From: Rakesh Kudurumalla Date: Tue, 1 Oct 2024 11:30:54 +0530 Subject: [PATCH] net/cnxk: fix OOP handling for inbound packets Cc: Xueming Li [ upstream commit d524a5526efa6b4cc01d13d8d50785c08d9b6891 ] To handle OOP for inbound packet, processing is done based on NIX_RX_REAS_F flag. However, for the SKUs that does not support reassembly Inbound Out-Of-Place processing test case fails because reassembly flag is not updated in event mode. This patch fixes the same. Fixes: 5e9e008d0127 ("net/cnxk: support inline ingress out-of-place session") Signed-off-by: Rakesh Kudurumalla --- drivers/net/cnxk/cn10k_ethdev_sec.c | 10 ++++++++++ drivers/net/cnxk/cnxk_ethdev.h | 4 ++++ drivers/net/cnxk/version.map | 1 + 3 files changed, 15 insertions(+) diff --git a/drivers/net/cnxk/cn10k_ethdev_sec.c b/drivers/net/cnxk/cn10k_ethdev_sec.c index 4719f6b863..47822a3d84 100644 --- a/drivers/net/cnxk/cn10k_ethdev_sec.c +++ b/drivers/net/cnxk/cn10k_ethdev_sec.c @@ -14,6 +14,13 @@ #include #include +cnxk_ethdev_rx_offload_cb_t cnxk_ethdev_rx_offload_cb; +void +cnxk_ethdev_rx_offload_cb_register(cnxk_ethdev_rx_offload_cb_t cb) +{ + cnxk_ethdev_rx_offload_cb = cb; +} + static struct rte_cryptodev_capabilities cn10k_eth_sec_crypto_caps[] = { { /* AES GCM */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, @@ -891,6 +898,9 @@ cn10k_eth_sec_session_create(void *device, !(dev->rx_offload_flags & NIX_RX_REAS_F)) { dev->rx_offload_flags |= NIX_RX_REAS_F; cn10k_eth_set_rx_function(eth_dev); + if (cnxk_ethdev_rx_offload_cb) + cnxk_ethdev_rx_offload_cb(eth_dev->data->port_id, + NIX_RX_REAS_F); } } else { struct roc_ot_ipsec_outb_sa *outb_sa, *outb_sa_dptr; diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h index edbb492e2c..138d206987 100644 --- a/drivers/net/cnxk/cnxk_ethdev.h +++ b/drivers/net/cnxk/cnxk_ethdev.h @@ -640,6 +640,10 @@ int cnxk_nix_lookup_mem_metapool_set(struct cnxk_eth_dev *dev); int cnxk_nix_lookup_mem_metapool_clear(struct cnxk_eth_dev *dev); __rte_internal int cnxk_nix_inb_mode_set(struct cnxk_eth_dev *dev, bool use_inl_dev); +typedef void (*cnxk_ethdev_rx_offload_cb_t)(uint16_t port_id, uint64_t flags); +__rte_internal +void cnxk_ethdev_rx_offload_cb_register(cnxk_ethdev_rx_offload_cb_t cb); + struct cnxk_eth_sec_sess *cnxk_eth_sec_sess_get_by_spi(struct cnxk_eth_dev *dev, uint32_t spi, bool inb); struct cnxk_eth_sec_sess * diff --git a/drivers/net/cnxk/version.map b/drivers/net/cnxk/version.map index 77f574bb16..078456a9ed 100644 --- a/drivers/net/cnxk/version.map +++ b/drivers/net/cnxk/version.map @@ -16,4 +16,5 @@ EXPERIMENTAL { INTERNAL { global: cnxk_nix_inb_mode_set; + cnxk_ethdev_rx_offload_cb_register; }; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:07.052138200 +0800 +++ 0040-net-cnxk-fix-OOP-handling-for-inbound-packets.patch 2024-11-11 14:23:05.102192840 +0800 @@ -1 +1 @@ -From d524a5526efa6b4cc01d13d8d50785c08d9b6891 Mon Sep 17 00:00:00 2001 +From 92230f6939d975f98fceaa01cf21af926741e87d Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit d524a5526efa6b4cc01d13d8d50785c08d9b6891 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +25 @@ -index c9cb540e85..6acab8afa0 100644 +index 4719f6b863..47822a3d84 100644 @@ -26,3 +28,3 @@ -@@ -28,6 +28,13 @@ PLT_STATIC_ASSERT(RTE_PMD_CNXK_AR_WIN_SIZE_MAX == ROC_AR_WIN_SIZE_MAX); - PLT_STATIC_ASSERT(RTE_PMD_CNXK_LOG_MIN_AR_WIN_SIZE_M1 == ROC_LOG_MIN_AR_WIN_SIZE_M1); - PLT_STATIC_ASSERT(RTE_PMD_CNXK_AR_WINBITS_SZ == ROC_AR_WINBITS_SZ); +@@ -14,6 +14,13 @@ + #include + #include @@ -40 +42 @@ -@@ -908,6 +915,9 @@ cn10k_eth_sec_session_create(void *device, +@@ -891,6 +898,9 @@ cn10k_eth_sec_session_create(void *device, @@ -51 +53 @@ -index d4440b25ac..350adc1161 100644 +index edbb492e2c..138d206987 100644 @@ -54 +56 @@ -@@ -725,6 +725,10 @@ int cnxk_nix_lookup_mem_metapool_set(struct cnxk_eth_dev *dev); +@@ -640,6 +640,10 @@ int cnxk_nix_lookup_mem_metapool_set(struct cnxk_eth_dev *dev); @@ -66 +68 @@ -index 099c518ecf..edb0a1c059 100644 +index 77f574bb16..078456a9ed 100644 @@ -69 +71 @@ -@@ -23,4 +23,5 @@ EXPERIMENTAL { +@@ -16,4 +16,5 @@ EXPERIMENTAL {