netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: "Arinzon, David" <darinzon@amazon.com>
Cc: David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"Machulsky, Zorik" <zorik@amazon.com>,
	"Matushevsky, Alexander" <matua@amazon.com>,
	"Bshara, Saeed" <saeedb@amazon.com>,
	"Bshara, Nafea" <nafea@amazon.com>,
	"Saidi, Ali" <alisaidi@amazon.com>,
	"Kiyanovski, Arthur" <akiyano@amazon.com>,
	"Dagan, Noam" <ndagan@amazon.com>,
	"Agroskin, Shay" <shayagr@amazon.com>,
	"Itzko, Shahar" <itzko@amazon.com>,
	"Abboud, Osama" <osamaabb@amazon.com>
Subject: Re: [PATCH V1 net-next 0/5] Add devlink support to ena
Date: Tue, 10 Jan 2023 12:44:18 -0800	[thread overview]
Message-ID: <20230110124418.76f4b1f8@kernel.org> (raw)
In-Reply-To: <574f532839dd4e93834dbfc776059245@amazon.com>

On Tue, 10 Jan 2023 20:11:23 +0000 Arinzon, David wrote:
> > On Sun, 8 Jan 2023 10:35:28 +0000 David Arinzon wrote:  
> > > This patchset adds devlink support to the ena driver.  
> > 
> > Wrong place, please take a look at
> > 
> >         struct kernel_ethtool_ringparam::tx_push
> > 
> > and ETHTOOL_A_RINGS_TX_PUSH. I think you just want to configure the
> > max size of the TX push, right?
> 
> We're not configuring the max size of the TX push, but effectively the
> maximal packet header size to be pushed to the device.
> This is noted in the documentation on patch 5/5 in this patchset.
> AFAIK, there's no relevant ethtool parameter for this configuration.

Perhaps I should have complained about the low quality of that
documentation to make it clear that I have in fact read it :/

I read it again - and I still don't know what you're doing.
I sounds like inline header length configuration yet you also use LLQ
all over the place. And LLQ for ENA is documented as basically tx_push:

  - **Low Latency Queue (LLQ) mode or "push-mode":**

Please explain this in a way which assumes zero Amazon-specific
knowledge :(

> > The reload is also an overkill, reload should re-register all driver objects
> > but the devlink instance, IIRC. You're not even unregistering the netdev.
> > You should handle this change the same way you handle any ring size
> > changes.
> 
> The LLQ configuration is different from other configurations set via ethtool
> (like queue size and number of queues). LLQ requires re-negotiation
> with the device and requires a reset, which is not performed in the ethtool
> configurations case.

What do you mean when you say that reset is not required in the ethool
configuration case?

AFAIK ethtool config should not (although sadly very often it does)
cause any loss of unrelated configuration. But you can certainly reset
HW blocks or reneg features with FW or whatever else...

> It may be possible to unregister/register the netdev,
> but it is unnecessary in this case, as most of the changes are reflected in the
> interface and structures between the driver and the device.
> 
> > For future reference - if you ever _actually_ need devlink please use the
> > devl_* APIs and take the instance locks explicitly. There has not been a
> > single devlink reload implementation which would get locking right using
> > the devlink_* APIs 😔️  
> 
> This operation can happen in parallel to a reset of the device from a different
> context which is unrelated to devlink. Our intention is to avoid such cases,
> therefore, holding the devlink lock using devl_lock APIs will not be sufficient.
> The driver holds the RTNL_LOCK in key places, either explicitly or implicitly,
> as in ethtool configuration changes for example.

Yeah, which is why you should not be using devlink for this.

  reply	other threads:[~2023-01-10 20:44 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-08 10:35 [PATCH V1 net-next 0/5] Add devlink support to ena David Arinzon
2023-01-08 10:35 ` [PATCH V1 net-next 1/5] net: ena: Register ena device to devlink David Arinzon
2023-01-09  5:59   ` Kuniyuki Iwashima
2023-01-10 15:17     ` Arinzon, David
2023-01-08 10:35 ` [PATCH V1 net-next 2/5] net: ena: Add devlink reload functionality David Arinzon
2023-01-08 10:35 ` [PATCH V1 net-next 3/5] net: ena: Configure large LLQ using devlink params David Arinzon
2023-01-08 10:35 ` [PATCH V1 net-next 4/5] net: ena: Several changes to support large LLQ configuration David Arinzon
2023-01-08 10:35 ` [PATCH V1 net-next 5/5] net: ena: Add devlink documentation David Arinzon
2023-01-08 20:15   ` kernel test robot
2023-01-09  6:00   ` Kuniyuki Iwashima
2023-01-10 15:20     ` Arinzon, David
2023-01-10  0:45 ` [PATCH V1 net-next 0/5] Add devlink support to ena Jakub Kicinski
2023-01-10 20:11   ` Arinzon, David
2023-01-10 20:44     ` Jakub Kicinski [this message]
2023-01-11  8:58       ` Arinzon, David
2023-01-11 19:00         ` Jakub Kicinski
2023-01-11 19:31           ` Arinzon, David
2023-01-11 20:00             ` Jakub Kicinski
2023-01-11 21:21               ` Arinzon, David
2023-01-12  3:39                 ` Jakub Kicinski
2023-01-12 10:31               ` Gal Pressman
2023-01-12 13:47                 ` Shay Agroskin
2023-01-12 19:56                   ` Jakub Kicinski
2023-01-15 10:05                     ` Gal Pressman
2023-01-17 17:31                       ` Jakub Kicinski
2023-01-16 14:23                     ` Shay Agroskin
2023-01-17 17:36                       ` Jakub Kicinski

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=20230110124418.76f4b1f8@kernel.org \
    --to=kuba@kernel.org \
    --cc=akiyano@amazon.com \
    --cc=alisaidi@amazon.com \
    --cc=darinzon@amazon.com \
    --cc=davem@davemloft.net \
    --cc=itzko@amazon.com \
    --cc=matua@amazon.com \
    --cc=nafea@amazon.com \
    --cc=ndagan@amazon.com \
    --cc=netdev@vger.kernel.org \
    --cc=osamaabb@amazon.com \
    --cc=saeedb@amazon.com \
    --cc=shayagr@amazon.com \
    --cc=zorik@amazon.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).