* [PATCH v2] net/mlx5: store rxq MTU at allocation time
[not found] <20251028100144.36284-1-a.schollmeyer@syseleven.de>
@ 2025-10-30 9:13 ` a.schollmeyer
2025-10-30 10:21 ` Dariusz Sosnowski
0 siblings, 1 reply; 5+ messages in thread
From: a.schollmeyer @ 2025-10-30 9:13 UTC (permalink / raw)
To: Dariusz Sosnowski, Viacheslav Ovsiienko, Bing Zhao, Ori Kam,
Suanming Mou, Matan Azrad, Xueming Li
Cc: dev, Michael Rossberg, Erez Ferber, Adrian Schollmeyer, stable
From: Adrian Schollmeyer <a.schollmeyer@syseleven.de>
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")
Cc: stable@dpdk.org
Signed-off-by: Adrian Schollmeyer <a.schollmeyer@syseleven.de>
---
drivers/net/mlx5/mlx5_rx.h | 1 +
drivers/net/mlx5/mlx5_rxq.c | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h
index 6380895502..58bc2c9f21 100644
--- a/drivers/net/mlx5/mlx5_rx.h
+++ b/drivers/net/mlx5/mlx5_rx.h
@@ -169,6 +169,7 @@ struct __rte_cache_aligned 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 5cf7d4971b..c652204ea8 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -773,7 +773,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;
@@ -1799,6 +1799,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.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] net/mlx5: store rxq MTU at allocation time
2025-10-30 9:13 ` [PATCH v2] net/mlx5: store rxq MTU at allocation time a.schollmeyer
@ 2025-10-30 10:21 ` Dariusz Sosnowski
2025-10-30 10:40 ` Dariusz Sosnowski
0 siblings, 1 reply; 5+ messages in thread
From: Dariusz Sosnowski @ 2025-10-30 10:21 UTC (permalink / raw)
To: a.schollmeyer
Cc: Viacheslav Ovsiienko, Bing Zhao, Ori Kam, Suanming Mou,
Matan Azrad, Xueming Li, dev, Michael Rossberg, Erez Ferber,
stable
Hi,
Thank you very much for applying the changes from last review.
On Thu, Oct 30, 2025 at 10:13:13AM +0100, a.schollmeyer@syseleven.de wrote:
> From: Adrian Schollmeyer <a.schollmeyer@syseleven.de>
>
> 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")
> Cc: stable@dpdk.org
>
> Signed-off-by: Adrian Schollmeyer <a.schollmeyer@syseleven.de>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Best regards,
Dariusz Sosnowski
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] net/mlx5: store rxq MTU at allocation time
2025-10-30 10:21 ` Dariusz Sosnowski
@ 2025-10-30 10:40 ` Dariusz Sosnowski
2025-10-30 11:21 ` Adrian Schollmeyer
0 siblings, 1 reply; 5+ messages in thread
From: Dariusz Sosnowski @ 2025-10-30 10:40 UTC (permalink / raw)
To: a.schollmeyer
Cc: Viacheslav Ovsiienko, Bing Zhao, Ori Kam, Suanming Mou,
Matan Azrad, Xueming Li, dev, Michael Rossberg, Erez Ferber,
stable
On Thu, Oct 30, 2025 at 11:21:55AM +0100, Dariusz Sosnowski wrote:
> Hi,
>
> Thank you very much for applying the changes from last review.
>
> On Thu, Oct 30, 2025 at 10:13:13AM +0100, a.schollmeyer@syseleven.de wrote:
> > From: Adrian Schollmeyer <a.schollmeyer@syseleven.de>
> >
> > 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")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Adrian Schollmeyer <a.schollmeyer@syseleven.de>
>
> Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
One other thing, unrelated to the patch content.
Could you please change the state of previous versions of this patch
to "Superseded" in Patchwork?
This would be very helpful since it reduces the amount of patches to track.
This requires creating the account on Patchwork - https://patches.dpdk.org/
Best regards,
Dariusz Sosnowski
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] net/mlx5: store rxq MTU at allocation time
2025-10-30 10:40 ` Dariusz Sosnowski
@ 2025-10-30 11:21 ` Adrian Schollmeyer
2025-10-30 12:39 ` Dariusz Sosnowski
0 siblings, 1 reply; 5+ messages in thread
From: Adrian Schollmeyer @ 2025-10-30 11:21 UTC (permalink / raw)
To: Dariusz Sosnowski
Cc: Viacheslav Ovsiienko, Bing Zhao, Ori Kam, Suanming Mou,
Matan Azrad, Xueming Li, dev, Michael Rossberg, Erez Ferber,
stable
[-- Attachment #1: Type: text/plain, Size: 735 bytes --]
Hi,
Am Donnerstag, dem 30.10.2025 um 11:40 +0100 schrieb Dariusz Sosnowski:
> Could you please change the state of previous versions of this patch
> to "Superseded" in Patchwork?
done. I hope everything should be okay now.
Best regards,
Adrian
--
Adrian Schollmeyer
SysEleven GmbH
Boxhagener Straße 80
10245 Berlin
T +49 30 / 23 32 012-0
F +49 30 / 61 67 55 5-0
https:// www.syseleven.de
https://www.linkedin.com/company/syseleven-gmbh
Current system status always at:
https://www.syseleven-status.net/
Company headquarters: Berlin
Registered court: AG Berlin Charlottenburg, HRB 108571 Berlin
Managing directors: Andreas Hermann, Jens Ihlenfeld, Jens Plogsties,
Andreas Rückriegel
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] net/mlx5: store rxq MTU at allocation time
2025-10-30 11:21 ` Adrian Schollmeyer
@ 2025-10-30 12:39 ` Dariusz Sosnowski
0 siblings, 0 replies; 5+ messages in thread
From: Dariusz Sosnowski @ 2025-10-30 12:39 UTC (permalink / raw)
To: Adrian Schollmeyer
Cc: Viacheslav Ovsiienko, Bing Zhao, Ori Kam, Suanming Mou,
Matan Azrad, Xueming Li, dev, Michael Rossberg, Erez Ferber,
stable
On Thu, Oct 30, 2025 at 12:21:51PM +0100, Adrian Schollmeyer wrote:
> Hi,
>
> Am Donnerstag, dem 30.10.2025 um 11:40 +0100 schrieb Dariusz Sosnowski:
> > Could you please change the state of previous versions of this patch
> > to "Superseded" in Patchwork?
>
> done. I hope everything should be okay now.
>
> Best regards,
> Adrian
>
> --
> Adrian Schollmeyer
>
> SysEleven GmbH
> Boxhagener Straße 80
> 10245 Berlin
>
> T +49 30 / 23 32 012-0
> F +49 30 / 61 67 55 5-0
>
> https:// www.syseleven.de
> https://www.linkedin.com/company/syseleven-gmbh
>
> Current system status always at:
> https://www.syseleven-status.net/
>
> Company headquarters: Berlin
> Registered court: AG Berlin Charlottenburg, HRB 108571 Berlin
> Managing directors: Andreas Hermann, Jens Ihlenfeld, Jens Plogsties,
> Andreas Rückriegel
Everything's perfect. Thank you very much and thank you for the contribution.
Best regards,
Dariusz Sosnowski
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-10-30 12:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20251028100144.36284-1-a.schollmeyer@syseleven.de>
2025-10-30 9:13 ` [PATCH v2] net/mlx5: store rxq MTU at allocation time a.schollmeyer
2025-10-30 10:21 ` Dariusz Sosnowski
2025-10-30 10:40 ` Dariusz Sosnowski
2025-10-30 11:21 ` Adrian Schollmeyer
2025-10-30 12:39 ` Dariusz Sosnowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).