patch 'net/mlx5: fix MTU initialization' has been queued to stable release 22.11.11
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Oct 27 17:19:29 CET 2025
Hi,
FYI, your patch has been queued to stable release 22.11.11
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/29/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8b6d77fdad418b637c16dc346e4b774d89f1b60b
Thanks.
Luca Boccassi
---
>From 8b6d77fdad418b637c16dc346e4b774d89f1b60b Mon Sep 17 00:00:00 2001
From: Shani Peretz <shperetz at nvidia.com>
Date: Thu, 18 Sep 2025 08:43:25 +0300
Subject: [PATCH] net/mlx5: fix MTU initialization
[ upstream commit ee6aa2cb66512cd57b69ffe07efbd7f09789c9b2 ]
Currently with mlx5 PMD, rte_eth_dev_get_mtu() doesn't return
the MTU the device was set with, but the default one.
It happens because mlx5_dev_spawn() is not setting the eth_dev->data->mtu
field after getting the actual MTU from the driver,
so the default value is kept.
This patch fixes the issue by retrieving setting the value of priv->mtu
to eth_dev->data->mtu.
Bugzilla ID: 1768
Fixes: 2eb4d0107acc ("net/mlx5: refactor PCI probing on Linux")
Signed-off-by: Shani Peretz <shperetz at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 1 +
drivers/net/mlx5/windows/mlx5_os.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 23093b404a..fc7d5f68e7 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1516,6 +1516,7 @@ err_secondary:
err = rte_errno;
goto error;
}
+ eth_dev->data->mtu = priv->mtu;
DRV_LOG(DEBUG, "port %u MTU is %u", eth_dev->data->port_id,
priv->mtu);
/* Initialize burst functions to prevent crashes before link-up. */
diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c
index a2c2b37773..0da1f15f78 100644
--- a/drivers/net/mlx5/windows/mlx5_os.c
+++ b/drivers/net/mlx5/windows/mlx5_os.c
@@ -463,6 +463,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
err = rte_errno;
goto error;
}
+ eth_dev->data->mtu = priv->mtu;
DRV_LOG(DEBUG, "port %u MTU is %u.", eth_dev->data->port_id,
priv->mtu);
/* Initialize burst functions to prevent crashes before link-up. */
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-10-27 15:54:36.681032536 +0000
+++ 0051-net-mlx5-fix-MTU-initialization.patch 2025-10-27 15:54:34.823950251 +0000
@@ -1 +1 @@
-From ee6aa2cb66512cd57b69ffe07efbd7f09789c9b2 Mon Sep 17 00:00:00 2001
+From 8b6d77fdad418b637c16dc346e4b774d89f1b60b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ee6aa2cb66512cd57b69ffe07efbd7f09789c9b2 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index 8c37c047bb..8d11b1ac3a 100644
+index 23093b404a..fc7d5f68e7 100644
@@ -29 +30 @@
-@@ -1601,6 +1601,7 @@ err_secondary:
+@@ -1516,6 +1516,7 @@ err_secondary:
@@ -38 +39 @@
-index c4e3430bdc..4eadc872a5 100644
+index a2c2b37773..0da1f15f78 100644
@@ -41 +42 @@
-@@ -509,6 +509,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
+@@ -463,6 +463,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
More information about the stable
mailing list