net/mlx5: fix MTU configuration

Message ID 20240708105931.1842134-1-dsosnowski@nvidia.com (mailing list archive)
State Awaiting Upstream
Delegated to: Raslan Darawsheh
Headers
Series net/mlx5: fix MTU configuration |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-amd64-testing pending Testing pending
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing pending Testing pending
ci/iol-sample-apps-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-unit-arm64-testing pending Testing pending
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS

Commit Message

Dariusz Sosnowski July 8, 2024, 10:59 a.m. UTC
  Apply provided MTU, derived from rte_eth_conf.rxmode.mtu,
on port configuration.

Bugzilla ID: 1483
Fixes: e60fbd5b24fc ("mlx5: add device configure/start/stop")
Cc: stable@dpdk.org

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

--
2.39.2
  

Comments

Raslan Darawsheh July 18, 2024, 7:25 a.m. UTC | #1
Hi,

From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Sent: Monday, July 8, 2024 1:59 PM
To: Slava Ovsiienko; Bing Zhao; Ori Kam; Suanming Mou; Matan Azrad
Cc: dev@dpdk.org; stable@dpdk.org
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")
Cc: stable@dpdk.org

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh
  

Patch

diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 1b721cda5e..6a678d6dcc 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -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;
 }