Hi, On Wed, May 28, 2025 at 02:12:37PM +0200, David Marchand wrote: > Hello, > > On Wed, May 28, 2025 at 11:36 AM Maxime Coquelin > <maxime.coque...@redhat.com> wrote: > > > > 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") > > Cc: sta...@dpdk.org > > > > Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> > > --- > > > > Hi Dariuz, > > > > I set priv->mtu as it is done after the mlx5_set_mtu() call, > > but I'm not sure it is necessary, as is the existing call to > > mlx5_get_mtu() because it seems done in mlx5_dev_spawn().
Correct, this additional update of priv->mtu is not needed here. It can be removed. > > It seems there were some back and forth on this priv->mtu topic > between Nelio and other devs in the past. > > Atm, I don't see the need for keeping such a cached mtu value in priv. > There is only one user of the value, and it is for configuration > operation that can do a query to the kernel. I agree. It's not really needed, especially since the same value is also stored in dev->data->mtu, so the kernel query can easily be replaced with reading dev->data->mtu. I'll prepare a patch later which does that. Thanks for bringing that up. For posperity - this cached value is used only during rte_eth_rx_queue_setup() while validating shared RX queue configuration. Best regards, Dariusz Sosnowski