* [PATCH v2 0/1] fix incorrect MTU stored in rxmode
@ 2026-09-29 3:52 Dimon Zhao
2026-09-29 3:52 ` [PATCH v2 1/1] net/nbl: " Dimon Zhao
0 siblings, 1 reply; 2+ messages in thread
From: Dimon Zhao @ 2026-09-29 3:52 UTC (permalink / raw)
To: dev; +Cc: Dimon Zhao
The ethdev layer already updates dev->data->mtu on success.
After rte_eth_dev_configure(), dev_conf.rxmode.mtu becomes stale
and should not be modified by mtu_set.
Additionally, the original code assigned frame_size (MTU + overhead)
instead of MTU, confusing frame length with MTU.
Dimon Zhao (1):
net/nbl: fix incorrect MTU stored in rxmode
drivers/net/nbl/nbl_dev/nbl_dev.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v2 1/1] net/nbl: fix incorrect MTU stored in rxmode
2026-09-29 3:52 [PATCH v2 0/1] fix incorrect MTU stored in rxmode Dimon Zhao
@ 2026-09-29 3:52 ` Dimon Zhao
0 siblings, 0 replies; 2+ messages in thread
From: Dimon Zhao @ 2026-09-29 3:52 UTC (permalink / raw)
To: dev; +Cc: Dimon Zhao, stable, Leon Yu, Sam Chen
The ethdev layer already updates dev->data->mtu on success.
After rte_eth_dev_configure(), dev_conf.rxmode.mtu becomes stale
and should not be modified by mtu_set.
Additionally, the original code assigned frame_size (MTU + overhead)
instead of MTU, confusing frame length with MTU.
Fixes: 75cdda36a4c5 ("net/nbl: support MTU update")
Cc: stable@dpdk.org
Signed-off-by: Dimon Zhao <dimon.zhao@nebula-matrix.com>
---
drivers/net/nbl/nbl_dev/nbl_dev.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/nbl/nbl_dev/nbl_dev.c b/drivers/net/nbl/nbl_dev/nbl_dev.c
index 320f26619f..e41732ccd3 100644
--- a/drivers/net/nbl/nbl_dev/nbl_dev.c
+++ b/drivers/net/nbl/nbl_dev/nbl_dev.c
@@ -757,16 +757,14 @@ int nbl_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
struct nbl_adapter *adapter = ETH_DEV_TO_NBL_DEV_PF_PRIV(eth_dev);
struct nbl_dev_mgt *dev_mgt = NBL_ADAPTER_TO_DEV_MGT(adapter);
struct nbl_dispatch_ops *disp_ops = NBL_DEV_MGT_TO_DISP_OPS(dev_mgt);
- uint32_t frame_size = mtu + NBL_ETH_OVERHEAD;
int ret;
- /* mtu setting is forbidden if port is start */
+ /* mtu setting is forbidden if port is started */
if (dev_data->dev_started) {
NBL_LOG(ERR, "port %d must be stopped before configuration", dev_data->port_id);
return -EBUSY;
}
- dev_data->dev_conf.rxmode.mtu = frame_size;
ret = disp_ops->set_mtu(NBL_DEV_MGT_TO_DISP_PRIV(dev_mgt), dev_mgt->net_dev->vsi_id, mtu);
if (ret)
return ret;
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-29 3:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-29 3:52 [PATCH v2 0/1] fix incorrect MTU stored in rxmode Dimon Zhao
2026-09-29 3:52 ` [PATCH v2 1/1] net/nbl: " Dimon Zhao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox