On 11/1/21 12:39 PM, Jiang, YuX wrote:
-----Original Message-----
From: Yigit, Ferruh <[email protected]>
Sent: Friday, October 29, 2021 5:22 PM
To: Andrew Rybchenko <[email protected]>; Jiang, YuX
<[email protected]>; Thomas Monjalon <[email protected]>; Ajit
Khaparde <[email protected]>; Huisong Li
<[email protected]>; Ananyev, Konstantin
<[email protected]>; Xu, Rosen <[email protected]>
Cc: [email protected]; Ivan Ilchenko <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] ethdev: forbid MTU set before device
configure
On 10/29/2021 7:19 AM, Andrew Rybchenko wrote:
On 10/29/21 8:58 AM, Jiang, YuX wrote:
-----Original Message-----
From: dev <[email protected]> On Behalf Of Andrew Rybchenko
Sent: Friday, October 22, 2021 6:18 PM
To: Thomas Monjalon <[email protected]>; Yigit, Ferruh
<[email protected]>; Ajit Khaparde
<[email protected]>; Huisong Li <[email protected]>;
Ananyev, Konstantin <[email protected]>; Xu, Rosen
<[email protected]>
Cc: [email protected]; Ivan Ilchenko <[email protected]>
Subject: [dpdk-dev] [PATCH] ethdev: forbid MTU set before device
configure
From: Ivan Ilchenko <[email protected]>
rte_eth_dev_configure() always sets MTU to either
dev_conf.rxmode.mtu or RTE_ETHER_MTU if application doesn't provide
the value.
So, there is no point to allow rte_eth_dev_set_mtu() before since
set value will be overwritten on configure anyway.
Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
Signed-off-by: Ivan Ilchenko <[email protected]>
Signed-off-by: Andrew Rybchenko <[email protected]>
---
lib/ethdev/rte_ethdev.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index
4ea5a657e0..0d7dd68dc1 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -3728,6 +3728,13 @@ rte_eth_dev_set_mtu(uint16_t port_id,
uint16_t
mtu)
return ret;
}
+ if (dev->data->dev_configured == 0) {
+ RTE_ETHDEV_LOG(ERR,
+ "Port %u must be configured before MTU set\n",
+ port_id);
+ return -EINVAL;
+ }
+
ret = (*dev->dev_ops->mtu_set)(dev, mtu);
if (ret == 0)
dev->data->mtu = mtu;
--
2.30.2
Hi Ivan,
We meet an issue based on this patch when test dpdk21.11-rc1.
BugID: https://bugs.dpdk.org/show_bug.cgi?id=864, could you pls have a
look?
Hi, I think the problem is fixed by [1].
[1]
https://patches.dpdk.org/project/dpdk/patch/20211024164237.2116166-1-
a
[email protected]/
That patch is merged to next-net, Yu can you please verify the issue with
latest next-net?
Hi Ferruh,
We verify patch
https://patches.dpdk.org/project/dpdk/patch/[email protected]/
on baseline dpdk main branch 6cc51b1293ceac4a77d4bf7ac91a8bbd59e1f78c
Test failed on nic XXV710 for 25GbE SFP28 158b/os Red Hat Enterprise Linux 8.4.
Need we verify it on next-net?
What exactly goes wrong in the test if the patch is applied?
Andrew.