patch 'net/mlx5: fix MTU initialization' has been queued to stable release 23.11.6
Shani Peretz
shperetz at nvidia.com
Sun Dec 21 15:56:59 CET 2025
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/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/shanipr/dpdk-stable
This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/dc0a79d38533a4b7d3795beb8eec86f93e1f182c
Thanks.
Shani
---
>From dc0a79d38533a4b7d3795beb8eec86f93e1f182c 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 3aa500e6a4..722a7e2691 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1560,6 +1560,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 4cb9df1d5f..67a8c94f5f 100644
--- a/drivers/net/mlx5/windows/mlx5_os.c
+++ b/drivers/net/mlx5/windows/mlx5_os.c
@@ -507,6 +507,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.43.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-12-21 16:54:20.752183913 +0200
+++ 0071-net-mlx5-fix-MTU-initialization.patch 2025-12-21 16:54:17.276048000 +0200
@@ -1 +1 @@
-From ee6aa2cb66512cd57b69ffe07efbd7f09789c9b2 Mon Sep 17 00:00:00 2001
+From dc0a79d38533a4b7d3795beb8eec86f93e1f182c 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 3aa500e6a4..722a7e2691 100644
@@ -29 +30 @@
-@@ -1601,6 +1601,7 @@ err_secondary:
+@@ -1560,6 +1560,7 @@ err_secondary:
@@ -38 +39 @@
-index c4e3430bdc..4eadc872a5 100644
+index 4cb9df1d5f..67a8c94f5f 100644
@@ -41 +42 @@
-@@ -509,6 +509,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
+@@ -507,6 +507,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
More information about the stable
mailing list