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 0F10448B69 for ; Fri, 21 Nov 2025 12:23:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 07DFB4026F; Fri, 21 Nov 2025 12:23:24 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 8C0BA402E0 for ; Fri, 21 Nov 2025 12:23:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763724202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7v57PkkZCBe5GX0qIFC0BLDg3J/McqeZadcDuU5S7FU=; b=e8O5yQ4ZpJI4phXHMav8SEf27nJGXKgn8mog8kAOn26ycPCz7uxRNI2YBIvNhW5uvRvvOf /KkLJjRHbl/nlt054UhNB6uKOZnBiObslA5Pr9pLxtBYR9athTWhB4k/UoqagQZegCGagv 4GjVWT78RIVPoL/+r6x7fq3mEIxTg68= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-61-mioNRFTTNkKGo-gSk7fQ8A-1; Fri, 21 Nov 2025 06:23:18 -0500 X-MC-Unique: mioNRFTTNkKGo-gSk7fQ8A-1 X-Mimecast-MFC-AGG-ID: mioNRFTTNkKGo-gSk7fQ8A_1763724197 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8453F1956048; Fri, 21 Nov 2025 11:23:17 +0000 (UTC) Received: from rh.redhat.com (unknown [10.42.28.165]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 777B430044DC; Fri, 21 Nov 2025 11:23:15 +0000 (UTC) From: Kevin Traynor 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 24.11.4 Date: Fri, 21 Nov 2025 11:20:30 +0000 Message-ID: <20251121112128.485623-46-ktraynor@redhat.com> In-Reply-To: <20251121112128.485623-1-ktraynor@redhat.com> References: <20251121112128.485623-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: InnjutWNWl25Xsd1UbCQedTYoJAhiJICo7tstirbQ-o_1763724197 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 24.11.4 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/26/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/38e475e012b72cc341e3e9644ac751560b7e05f6 Thanks. Kevin --- >From 38e475e012b72cc341e3e9644ac751560b7e05f6 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 99cf07f245..8af58f1614 100644 --- a/.mailmap +++ b/.mailmap @@ -22,4 +22,5 @@ Adrian Moreno Adrian Pielech Adrian Podlawski +Adrian Schollmeyer Adrien Mazarguil Ady Agbarih diff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h index 6ec5f82022..f4b5136d60 100644 --- a/drivers/net/mlx5/mlx5_rx.h +++ b/drivers/net/mlx5/mlx5_rx.h @@ -159,4 +159,5 @@ struct __rte_cache_aligned mlx5_rxq_data { 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. */ diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index 82958565de..0f504e4dd3 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -780,5 +780,5 @@ mlx5_shared_rxq_match(struct mlx5_rxq_ctrl *rxq_ctrl, struct rte_eth_dev *dev, 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); @@ -1770,4 +1770,8 @@ 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 -- 2.51.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-11-21 11:05:11.029038981 +0000 +++ 0046-net-mlx5-store-MTU-at-Rx-queue-allocation-time.patch 2025-11-21 11:05:09.463201169 +0000 @@ -1 +1 @@ -From 4414eb800708475bf1b38794434e590c7204d9d3 Mon Sep 17 00:00:00 2001 +From 38e475e012b72cc341e3e9644ac751560b7e05f6 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 99cf07f245..8af58f1614 100644 @@ -42 +43 @@ -index 7be31066a5..127abe41fb 100644 +index 6ec5f82022..f4b5136d60 100644 @@ -45 +46 @@ -@@ -177,4 +177,5 @@ struct __rte_cache_aligned mlx5_rxq_data { +@@ -159,4 +159,5 @@ struct __rte_cache_aligned mlx5_rxq_data { @@ -52 +53 @@ -index 1425886a22..2264dea877 100644 +index 82958565de..0f504e4dd3 100644 @@ -55 +56 @@ -@@ -781,5 +781,5 @@ mlx5_shared_rxq_match(struct mlx5_rxq_ctrl *rxq_ctrl, struct rte_eth_dev *dev, +@@ -780,5 +780,5 @@ mlx5_shared_rxq_match(struct mlx5_rxq_ctrl *rxq_ctrl, struct rte_eth_dev *dev, @@ -62 +63 @@ -@@ -1813,4 +1813,8 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, +@@ -1770,4 +1770,8 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,