From: Jakub Kicinski <kuba@kernel.org>
To: "Björn Töpel" <bjorn@kernel.org>
Cc: Michael Chan <michael.chan@broadcom.com>,
Pavan Chebbi <pavan.chebbi@broadcom.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Saeed Mahameed <saeedm@nvidia.com>,
Tariq Toukan <tariqt@nvidia.com>, Mark Bloch <mbloch@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
netdev@vger.kernel.org,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Gal Pressman <gal@nvidia.com>,
Willem de Bruijn <willemb@google.com>,
linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v6 1/4] ethtool: Track user-provided RSS indirection table size
Date: Wed, 18 Mar 2026 19:23:10 -0700 [thread overview]
Message-ID: <20260318192310.278ef325@kernel.org> (raw)
In-Reply-To: <20260318122603.264550-2-bjorn@kernel.org>
On Wed, 18 Mar 2026 13:25:58 +0100 Björn Töpel wrote:
> diff --git a/net/ethtool/common.c b/net/ethtool/common.c
> index e252cf20c22f..ee91f1155830 100644
> --- a/net/ethtool/common.c
> +++ b/net/ethtool/common.c
> @@ -1204,6 +1204,26 @@ void ethtool_rxfh_context_lost(struct net_device *dev, u32 context_id)
> }
> EXPORT_SYMBOL(ethtool_rxfh_context_lost);
>
> +bool netif_is_rxfh_configured(const struct net_device *dev)
> +{
> + return dev->ethtool->rss_indir_user_size;
> +}
> +EXPORT_SYMBOL(netif_is_rxfh_configured);
> +
> +/**
> + * ethtool_rxfh_indir_clear - Clear user indirection table config
> + * @dev: network device
> + *
> + * Mark the default RSS context indirection table as unconfigured and
> + * send an %ETHTOOL_MSG_RSS_NTF notification.
If you're adding kdoc you should very clearly state this is function
should only be called if the driver lost the ability to maintain the
indirection table, usually after HW fault recovery reduced the max
queue count.
> + */
> +void ethtool_rxfh_indir_clear(struct net_device *dev)
ethtool_rxfh_indir_lost() would be a better name, it would align with
ethtool_rxfh_context_lost() right above the code you're adding, right?
> +{
Let's add an error in here like the one we have in
ethtool_rxfh_context_lost(), this should stop arbitrary use.
And you can remove the local warning in bnxt if we do that.
> + dev->ethtool->rss_indir_user_size = 0;
> + ethtool_rss_notify(dev, ETHTOOL_MSG_RSS_NTF, 0);
> +}
> +EXPORT_SYMBOL(ethtool_rxfh_indir_clear);
> +
> enum ethtool_link_medium ethtool_str_to_medium(const char *str)
> {
> int i;
next prev parent reply other threads:[~2026-03-19 2:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 12:25 [PATCH net-next v6 0/4] ethtool: Dynamic RSS context indirection table resizing Björn Töpel
2026-03-18 12:25 ` [PATCH net-next v6 1/4] ethtool: Track user-provided RSS indirection table size Björn Töpel
2026-03-19 2:23 ` Jakub Kicinski [this message]
2026-03-18 12:25 ` [PATCH net-next v6 2/4] ethtool: Add RSS indirection table resize helpers Björn Töpel
2026-03-18 12:26 ` [PATCH net-next v6 3/4] bnxt_en: Resize RSS contexts on channel count change Björn Töpel
2026-03-18 12:26 ` [PATCH net-next v6 4/4] selftests: rss_drv: Add RSS indirection table resize tests Björn Töpel
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=20260318192310.278ef325@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bjorn@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=horms@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=mbloch@nvidia.com \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
--cc=saeedm@nvidia.com \
--cc=shuah@kernel.org \
--cc=tariqt@nvidia.com \
--cc=willemb@google.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