patch 'net/mlx5: avoid setting kernel MTU if not needed' has been queued to stable release 22.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Jun 12 23:07:25 CEST 2025
Hi,
FYI, your patch has been queued to stable release 22.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/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/0ccb9e319ea392ae075e5ab646264c28eeeed16c
Thanks.
Luca Boccassi
---
>From 0ccb9e319ea392ae075e5ab646264c28eeeed16c Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin at redhat.com>
Date: Wed, 28 May 2025 11:36:44 +0200
Subject: [PATCH] net/mlx5: avoid setting kernel MTU if not needed
[ upstream commit f1f9113a08b202d302ba9448d351c04da48ff46d ]
This patch checks whether the Kernel MTU has the same value
as the requested one at port configuration time, and skip
setting it if it is the same.
Doing this, we can avoid the application to require
NET_ADMIN capability, as in v23.11.
Fixes: 10859ecf09c4 ("net/mlx5: fix MTU configuration")
Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
drivers/net/mlx5/mlx5_ethdev.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 169612ca44..f998e2ace9 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -634,6 +634,14 @@ mlx5_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
ret = mlx5_get_mtu(dev, &kern_mtu);
if (ret)
return ret;
+
+ if (kern_mtu == mtu) {
+ priv->mtu = mtu;
+ DRV_LOG(DEBUG, "port %u adapter MTU was already set to %u",
+ dev->data->port_id, mtu);
+ return 0;
+ }
+
/* Set kernel interface MTU first. */
ret = mlx5_set_mtu(dev, mtu);
if (ret)
--
2.47.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-12 22:06:26.319542047 +0100
+++ 0068-net-mlx5-avoid-setting-kernel-MTU-if-not-needed.patch 2025-06-12 22:06:23.894045145 +0100
@@ -1 +1 @@
-From f1f9113a08b202d302ba9448d351c04da48ff46d Mon Sep 17 00:00:00 2001
+From 0ccb9e319ea392ae075e5ab646264c28eeeed16c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f1f9113a08b202d302ba9448d351c04da48ff46d ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index a50320075c..b7df39ace9 100644
+index 169612ca44..f998e2ace9 100644
@@ -26 +27 @@
-@@ -678,6 +678,14 @@ mlx5_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -634,6 +634,14 @@ mlx5_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
More information about the stable
mailing list