DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: <dev@dpdk.org>, <viacheslavo@nvidia.com>, <stable@dpdk.org>,
	"David Marchand" <david.marchand@redhat.com>
Subject: Re: [PATCH] net/mlx5: avoid setting kernel MTU if not needed
Date: Wed, 4 Jun 2025 09:49:18 +0200	[thread overview]
Message-ID: <20250604074918.ca6qmcl5js3wowec@ds-vm-debian.local> (raw)
In-Reply-To: <20250603175611.igdc3m74l5x6bheo@ds-vm-debian.local>

Hi Maxime,

On Tue, Jun 03, 2025 at 07:56:11PM +0200, Dariusz Sosnowski wrote:
> On Tue, Jun 03, 2025 at 07:53:45PM +0200, Dariusz Sosnowski wrote:
> > 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.coquelin@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: stable@dpdk.org
> > > >
> > > > Signed-off-by: Maxime Coquelin <maxime.coquelin@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.

As a matter of fact, the setting of priv->mtu can stay as is in the
patch and the current version of the patch can be applied in my opinion.
The "future" patch which removes mtu field from mlx5_priv
would take care of that.

Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

> > 
> > > 
> > > 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.
> 
> Correction - "so the use of cached value can easily be replaced with
> reading dev->data->mtu".

Best regards,
Dariusz Sosnowski

  reply	other threads:[~2025-06-04  7:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-28  9:36 Maxime Coquelin
2025-05-28 12:12 ` David Marchand
2025-06-03 17:53   ` Dariusz Sosnowski
2025-06-03 17:56     ` Dariusz Sosnowski
2025-06-04  7:49       ` Dariusz Sosnowski [this message]
2025-06-04  9:52     ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250604074918.ca6qmcl5js3wowec@ds-vm-debian.local \
    --to=dsosnowski@nvidia.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.org \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).