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 47949470E5 for ; Thu, 25 Dec 2025 10:23:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F48940670; Thu, 25 Dec 2025 10:23:31 +0100 (CET) Received: from DM5PR21CU001.outbound.protection.outlook.com (mail-centralusazon11011056.outbound.protection.outlook.com [52.101.62.56]) by mails.dpdk.org (Postfix) with ESMTP id 8067340670 for ; Thu, 25 Dec 2025 10:23:29 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=x3I8K6NXNATjwn009vy4SCZc8u3Ioxcl/T2QaRxWOrFNSwQVpFaf27NsB9PygJK0SyQWZ9pbfr/8mDGlCDKpLR2VN6snnfkUZMFPJQhwu2G7Eynpmw5CLTD1bGJPn+r2I+T2YGDG2LyCi8vVBDfzS/J8Y2fOGCY3c4KsE9d46qcG9Kwb1BhpPG9yUisRsv2wo+WMKrjLHPN67YkigYBPPmcG+oAJrfPPPbrhUgiHQUfwmuXhV4+4b8pNBeV4aNHnINfWzyncpyW7tgWpXwBpDVPSvKZziyBPtpJHLBdYCUbEtPCCgTy1h0TWmMF4XTe2OKnEyGQHhZQZ01uSugmB8Q== 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=IbQCitTP99kkJb/luRz0MZYHTyxprY9IJex9AoBPOQM=; b=NsLFZqMtUIFvRwaAn5UIya6Hb2Pd11Wy3/QwLY/hXOKSY4deTZU59fgvtVAQ72UEKCFm9ZZ84A6fVrpGB3UlCxISadCYFF1WeKmlakgpCWT3cc36d5CoGphpCM5JJTMoffzl1ZTL2gpIt3EEJVyjqlsPvOr3u0vkE8VEhCGb4eULq4JCxTcCUp3+G1m5UViynMvPZXVJBgxX3MiQZFsYv4n4uWinPLVJZhFUxEAiAnPdslAMepAuMUmpuVjrFEtj4ZvGVFjW2Chq47+c+/1290YdhJ4GugOCDbzTA7QsTC2DP9TV9+rXDMAnjIpmopYTyD5TJ3gX3xgavjJES3u4Wg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=syseleven.de 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=IbQCitTP99kkJb/luRz0MZYHTyxprY9IJex9AoBPOQM=; b=qbEkW5jT3c7PMgOlujvv3zrNazNwUNJwbFwvmukJMwbl7MiQu7jV7lLBlHZd6vgOVUZM7ge0gyUeshV7QHIXHJOB5aaOvdmEXeQTnivECReL705nU/KWaDkTOdfoiHpq2zNNtpZPHaeozGAn9lmBKVyAuCTbLmpZ4an5JymTRWRyojX7yn8d9zVYtugAdVSg3odGnlHlLzx/ZbtTfjrNG0hD3tSG+Rn2ZxQLC6emV/3un5uNoMnXZ07j7MTXTbqQcI2iI3LGjfuQdVsp55wjvPeKYjbp9iK84IAPOYBOdstv24BxK9rqqynKN82qSiRy3rXwY4xA5LdXvFBQLpnvog== Received: from BY5PR04CA0030.namprd04.prod.outlook.com (2603:10b6:a03:1d0::40) by BY5PR12MB4050.namprd12.prod.outlook.com (2603:10b6:a03:207::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9456.11; Thu, 25 Dec 2025 09:23:24 +0000 Received: from BY1PEPF0001AE1A.namprd04.prod.outlook.com (2603:10b6:a03:1d0:cafe::82) by BY5PR04CA0030.outlook.office365.com (2603:10b6:a03:1d0::40) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9456.10 via Frontend Transport; Thu, 25 Dec 2025 09:23:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) 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.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by BY1PEPF0001AE1A.mail.protection.outlook.com (10.167.242.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9456.9 via Frontend Transport; Thu, 25 Dec 2025 09:23:23 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 25 Dec 2025 01:23:16 -0800 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 25 Dec 2025 01:23:15 -0800 Received: from nvidia.com (10.127.8.12) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 25 Dec 2025 01:23:14 -0800 From: Shani Peretz To: Adrian Schollmeyer CC: Dariusz Sosnowski , dpdk stable Subject: patch 'net/mlx5: store MTU at Rx queue allocation time' has been queued to stable release 23.11.6 Date: Thu, 25 Dec 2025 11:18:14 +0200 Message-ID: <20251225091938.345892-53-shperetz@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251225091938.345892-1-shperetz@nvidia.com> References: <20251221145746.763179-93-shperetz@nvidia.com> <20251225091938.345892-1-shperetz@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY1PEPF0001AE1A:EE_|BY5PR12MB4050:EE_ X-MS-Office365-Filtering-Correlation-Id: b9c4148c-9a65-4729-fadd-08de43974045 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026|7053199007|13003099007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?ImugIUlAIBJ27ffG8D7toAGVhkqXvi3B1rY6ZSA8jgtfyP5fqfSPBo/hPRwS?= =?us-ascii?Q?3k2hjJcrUziNZCyokBHjklkqrcokbJet64cOxvJvJ42ZCQwiqCgJzdoXH00r?= =?us-ascii?Q?sqXmJO8JsWfUhdqurTpJ1BmVx+EQZXx+i3gn85lVLDTBxug3kn1Q41x9xtQm?= =?us-ascii?Q?t5Bhi7jpEccSLJSa1sg5TJMWen2kFxyohlr+oI7aFSuD33GI2hJhTH+x6sip?= =?us-ascii?Q?X2hte5LJErLHekjVAZ51xR1QXavdevWNKk4madvTpIHnBDtYi+nZ5j7m6NSm?= =?us-ascii?Q?bV5X+yOxBIeT1V++FdV/e6fJcc/9dYjd0WcHn8lDUUQbp3kfG8k5MgxOpLeY?= =?us-ascii?Q?w5hE+W25RQQOf449AqWSTFQEPJQ54EhvAJtU68Xh6dVkHJo/g0+4+nChMm5k?= =?us-ascii?Q?OYSa/uL/KtKzyhWjGoLT1Hvpr6KtLQENRiRgD5tsEHMXqCg8+8unHDmZoPDw?= =?us-ascii?Q?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9R?= =?us-ascii?Q?HIYReKdhWDbgZ6XnB/UN2G4yKtnJDi/MW1lcxgauph0PBnieHbze3w1b8Eha?= =?us-ascii?Q?S2xoqD1s4cP7Qc8HEVAx43mxOKD0xykd0tgGTjhyeINqonMyJJBdLy4dMRkv?= =?us-ascii?Q?daff9VbfXw8H3KK2euyvbDdpNp4HE6LBhM0XmK0eMJv+i3vVbNdCUL/mW5f3?= =?us-ascii?Q?au8PHFIly6H/jUKRtXxEnSFuV3C8XG+VUNCydEIv?= X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026)(7053199007)(13003099007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Dec 2025 09:23:23.0426 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b9c4148c-9a65-4729-fadd-08de43974045 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BY1PEPF0001AE1A.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4050 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.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/30/25. 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://github.com/shanipr/dpdk-stable This queued commit can be viewed at: https://github.com/shanipr/dpdk-stable/commit/8d563f3c6fb0b1b5761ba2c3d14463980a2d405c Thanks. Shani --- >From 8d563f3c6fb0b1b5761ba2c3d14463980a2d405c Mon Sep 17 00:00:00 2001 From: Adrian Schollmeyer Date: Thu, 30 Oct 2025 10:13:13 +0100 Subject: [PATCH] net/mlx5: store MTU at Rx queue allocation time [ upstream commit 4414eb800708475bf1b38794434e590c7204d9d3 ] For shared Rx queues, equal MTU for all ports sharing queues is enforced using mlx5_shared_rxq_match() to make sure, the memory allocated in the Rx buffer is large enough. The check uses the MTU as reported by the ports' private dev_data structs, which contain the MTU currently set for the device. In case one port's MTU is altered after Rx queues are allocated and then a second port joins the shared Rx queue with the old, yet correct MTU, the check fails despite the fact that the Rx buffer size is correct for both ports. This patch adds a new entry to the Rx queue control structure that captures the MTU at the time the Rx buffer was allocated, since this is the relevant information that needs to be checked when a port joins a shared Rx queue. Fixes: 09c2555303be ("net/mlx5: support shared Rx queue") Signed-off-by: Adrian Schollmeyer Acked-by: Dariusz Sosnowski --- .mailmap | 1 + drivers/net/mlx5/mlx5_rx.h | 1 + drivers/net/mlx5/mlx5_rxq.c | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index c691fac4ce..1296224156 100644 --- a/.mailmap +++ b/.mailmap @@ -19,6 +19,7 @@ Adam Ludkiewicz Adham Masarwah Adrian Moreno Adrian Podlawski +Adrian Schollmeyer Adrien Mazarguil Ady Agbarih Agalya Babu RadhaKrishnan diff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h index f9510176a2..1ac95ae78c 100644 --- a/drivers/net/mlx5/mlx5_rx.h +++ b/drivers/net/mlx5/mlx5_rx.h @@ -158,6 +158,7 @@ struct mlx5_rxq_data { /* RX queue control descriptor. */ struct mlx5_rxq_ctrl { struct mlx5_rxq_data rxq; /* Data path structure. */ + uint16_t mtu; /* Original MTU that the queue was allocated with. */ LIST_ENTRY(mlx5_rxq_ctrl) next; /* Pointer to the next element. */ LIST_HEAD(priv, mlx5_rxq_priv) owners; /* Owner rxq list. */ struct mlx5_rxq_obj *obj; /* Verbs/DevX elements. */ diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index a3c7f4a96c..e66fe8e310 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -779,7 +779,7 @@ mlx5_shared_rxq_match(struct mlx5_rxq_ctrl *rxq_ctrl, struct rte_eth_dev *dev, dev->data->port_id, idx); return false; } - if (priv->mtu != spriv->mtu) { + if (priv->mtu != rxq_ctrl->mtu) { DRV_LOG(ERR, "port %u queue index %u failed to join shared group: mtu mismatch", dev->data->port_id, idx); return false; @@ -1769,6 +1769,10 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, } LIST_INIT(&tmpl->owners); MLX5_ASSERT(n_seg && n_seg <= MLX5_MAX_RXQ_NSEG); + /* + * Save the original MTU to check against for shared rx queues. + */ + tmpl->mtu = dev->data->mtu; /* * Save the original segment configuration in the shared queue * descriptor for the later check on the sibling queue creation. -- 2.43.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-12-25 11:16:38.976469942 +0200 +++ 0053-net-mlx5-store-MTU-at-Rx-queue-allocation-time.patch 2025-12-25 11:16:35.842862000 +0200 @@ -1 +1 @@ -From 4414eb800708475bf1b38794434e590c7204d9d3 Mon Sep 17 00:00:00 2001 +From 8d563f3c6fb0b1b5761ba2c3d14463980a2d405c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4414eb800708475bf1b38794434e590c7204d9d3 ] + @@ -21 +22,0 @@ -Cc: stable@dpdk.org @@ -32 +33 @@ -index 1fb3fb5128..50a59a596a 100644 +index c691fac4ce..1296224156 100644 @@ -35 +36,2 @@ -@@ -21,6 +21,7 @@ Adham Masarwah +@@ -19,6 +19,7 @@ Adam Ludkiewicz + Adham Masarwah @@ -37 +38,0 @@ - Adrian Pielech @@ -44 +45 @@ -index 7be31066a5..127abe41fb 100644 +index f9510176a2..1ac95ae78c 100644 @@ -47 +48 @@ -@@ -176,6 +176,7 @@ struct __rte_cache_aligned mlx5_rxq_data { +@@ -158,6 +158,7 @@ struct mlx5_rxq_data { @@ -56 +57 @@ -index 1425886a22..2264dea877 100644 +index a3c7f4a96c..e66fe8e310 100644 @@ -59 +60 @@ -@@ -780,7 +780,7 @@ mlx5_shared_rxq_match(struct mlx5_rxq_ctrl *rxq_ctrl, struct rte_eth_dev *dev, +@@ -779,7 +779,7 @@ mlx5_shared_rxq_match(struct mlx5_rxq_ctrl *rxq_ctrl, struct rte_eth_dev *dev, @@ -68 +69 @@ -@@ -1812,6 +1812,10 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, +@@ -1769,6 +1769,10 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,