Skip to contentSkip to conversation

net/mlx5: fix MTU configuration

PATCH In review Dariusz Sosnowski 2 participants 2 messages Jul 8, 2024 – Jul 18, 2024 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix MTU configuration

Apply provided MTU, derived from rte_eth_conf.rxmode.mtu, on port configuration.

Bugzilla ID: 1483

Fixes e60fbd5b24fc ("mlx5: add device configure/start/stop")
---
 drivers/net/mlx5/mlx5_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/net/mlx5/mlx5_ethdev.c +6 -0
index 1b721cda5e..6a678d6dcc 100644
@@ -154,6 +154,12 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
 	ret = mlx5_proc_priv_init(dev);
 	if (ret)
 		return ret;
+	ret = mlx5_dev_set_mtu(dev, dev->data->mtu);
+	if (ret) {
+		DRV_LOG(ERR, "port %u failed to set MTU to %u", dev->data->port_id,
+			dev->data->mtu);
+		return ret;
+	}
 	return 0;
 }
 

--
2.39.2

Acked-by Viacheslav Ovsiienko on v1 1/1
#1 lore raw

Hi,

From: Dariusz Sosnowski <[email protected]>
Sent: Monday, July 8, 2024 1:59 PM
To: Slava Ovsiienko; Bing Zhao; Ori Kam; Suanming Mou; Matan Azrad
Cc: [email protected]; [email protected]
Subject: [PATCH] net/mlx5: fix MTU configuration

Apply provided MTU, derived from rte_eth_conf.rxmode.mtu, on port configuration.

Bugzilla ID: 1483

Fixes e60fbd5b24fc ("mlx5: add device configure/start/stop")

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh