mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Damato <joe@dama.to>
To: "Björn Töpel" <bjorn@kernel.org>
Cc: Alexander Duyck <alexanderduyck@fb.com>,
	Jakub Kicinski <kuba@kernel.org>,
	kernel-team@meta.com, Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Shuah Khan <shuah@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org,
	Daniel Borkmann <daniel@iogearbox.net>,
	"Mike Marciniszyn (Meta)" <mike.marciniszyn@gmail.com>,
	Mohsin Bashir <mohsin.bashr@gmail.com>,
	Stanislav Fomichev <sdf@fomichev.me>,
	Bobby Eshleman <bobbyeshleman@meta.com>,
	Dimitri Daskalakis <daskald@meta.com>,
	Weiming Shi <bestswngs@gmail.com>,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Jacob Keller <jacob.e.keller@intel.com>,
	Breno Leitao <leitao@debian.org>, Tao Cui <cuitao@kylinos.cn>,
	Pavel Begunkov <asml.silence@gmail.com>,
	David Wei <dw@davidwei.uk>
Subject: Re: [PATCH net-next v4 3/5] net: Revalidate queue config for ringparam changes
Date: Wed, 30 Sep 2026 10:22:43 -0700	[thread overview]
Message-ID: <ar1FY5vcgpUMBdWJ@devvm20253.cco0.facebook.com> (raw)
In-Reply-To: <20260925104417.2325213-4-bjorn@kernel.org>

On Fri, Sep 25, 2026 at 12:44:10PM +0200, Björn Töpel wrote:
> Memory-provider queue configuration is validated when the provider is
> bound. A later ethtool ring change may invalidate it because drivers
> can size queue memory from both ring depth and RX page size. The fbnic
> consumer is added in the following patch.
> 
> Keep configured RX ring depths in netdev_config and stage proposed
> values in cfg_pending. Validate every RX queue before calling the
> driver. Each check validates the device defaults, then any queue
> memory-provider override. Commit the values only after the driver
> accepts them.
> 
> Drivers which consume stored ring depths through queue configuration
> must initialize every RX depth before registering the netdev. Stored
> values override callback defaults, including when zero.
> 
> The callback receives a rendered configuration rather than a queue ID.
> Validation should depend on the configuration, not queue identity.
> Checking defaults also covers the case where every queue has a
> memory-provider override.
> 
> Drivers may normalize ring depths when applying them. Require the
> validation callback to use the same normalization. Drivers must report
> the applied depths through the ethtool_ringparam argument so the core
> records the result.
> 
> Use the same transaction for ioctl and netlink. Drivers without
> ndo_validate_qcfg skip the new validation.
> 
> Link: https://lore.kernel.org/all/20250421222827.283737-14-kuba@kernel.org/
> 
> Signed-off-by: Björn Töpel <bjorn@kernel.org>
> ---
>  include/linux/ethtool.h     |  4 ++-
>  include/net/netdev_queues.h | 56 ++++++++++++++++++++++++++++++++-----
>  net/core/dev.h              |  2 ++
>  net/core/netdev_config.c    | 38 +++++++++++++++++++++++--
>  net/ethtool/common.c        |  8 ++++++
>  net/ethtool/common.h        |  2 ++
>  net/ethtool/ioctl.c         | 24 ++++++++++++++--
>  net/ethtool/rings.c         | 13 ++++++++-
>  8 files changed, 133 insertions(+), 14 deletions(-)
>

Reviewed-by: Joe Damato <joe@dama.to>

  reply	other threads:[~2026-09-30 17:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25 10:44 [PATCH net-next v4 0/5] fbnic: Support larger RX pages Björn Töpel
2026-09-25 10:44 ` [PATCH net-next v4 1/5] net: Add netdev_config helpers Björn Töpel
2026-09-30 16:44   ` Joe Damato
2026-09-25 10:44 ` [PATCH net-next v4 2/5] fbnic: Track BDQ device-page geometry per ring Björn Töpel
2026-09-30 17:08   ` Joe Damato
2026-09-25 10:44 ` [PATCH net-next v4 3/5] net: Revalidate queue config for ringparam changes Björn Töpel
2026-09-30 17:22   ` Joe Damato [this message]
2026-09-25 10:44 ` [PATCH net-next v4 4/5] fbnic: Support larger memory-provider RX pages Björn Töpel
2026-09-25 10:44 ` [PATCH net-next v4 5/5] selftests: drv-net: Request larger zcrx buffers Björn Töpel
2026-09-30 11:36 ` [PATCH net-next v4 0/5] fbnic: Support larger RX pages Simon Horman
2026-10-01  0:30 ` patchwork-bot+netdevbpf

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=ar1FY5vcgpUMBdWJ@devvm20253.cco0.facebook.com \
    --to=joe@dama.to \
    --cc=alexanderduyck@fb.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=asml.silence@gmail.com \
    --cc=bestswngs@gmail.com \
    --cc=bjorn@kernel.org \
    --cc=bobbyeshleman@meta.com \
    --cc=cuitao@kylinos.cn \
    --cc=daniel@iogearbox.net \
    --cc=daskald@meta.com \
    --cc=davem@davemloft.net \
    --cc=dw@davidwei.uk \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mike.marciniszyn@gmail.com \
    --cc=mohsin.bashr@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=shuah@kernel.org \
    /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

all inboxes | Powered by JetHome®