From: netdev-bot+sashiko@kernel.org
To: vikas.gupta@broadcom.com
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
bhargava.marreddy@broadcom.com, rahul-rg.gupta@broadcom.com,
vsrama-krishna.nemani@broadcom.com,
rajashekar.hudumula@broadcom.com, dharmender.garg@broadcom.com,
ajit.khaparde@broadcom.com
Subject: Re: [PATCH net-next v12 04/10] bnge: add RXFH ethtool support
Date: Sat, 05 Dec 2026 14:46:16 +0000 [thread overview]
Message-ID: <179648197600.3146.12202992685876130509@kernel.org> (raw)
In-Reply-To: <20261201132011.2705569-5-vikas.gupta@broadcom.com>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] bnge_set_rxfh()
(drivers/net/ethernet/broadcom/bnge/bnge_ethtool.c, around lines…
--
bnge: add RXFH ethtool support
This adds the ethtool RXFH operations to bnge: get/set_rxfh for the RSS
hash key and indirection table, and get/set_rxfh_fields for hash field
selection. Both set operations are only allowed while the device is
down. The default RSS key now comes from netdev_rss_key_fill(), and
bnge_reserve_rings() can keep a user-configured indirection table.
> diff --git a/drivers/net/ethernet/broadcom/bnge/bnge_ethtool.c b/drivers/net/ethernet/broadcom/bnge/bnge_ethtool.c
> index 2467e44de291a..878fe4888160f 100644
> --- a/drivers/net/ethernet/broadcom/bnge/bnge_ethtool.c
> +++ b/drivers/net/ethernet/broadcom/bnge/bnge_ethtool.c
[ ... ]
> +static int bnge_set_rxfh(struct net_device *dev,
> + struct ethtool_rxfh_param *rxfh,
> + struct netlink_ext_ack *extack)
> +{
> + struct bnge_net *bn = netdev_priv(dev);
> +
> + if (rxfh->hfunc && rxfh->hfunc != ETH_RSS_HASH_TOP)
> + return -EOPNOTSUPP;
> +
> + if (netif_running(dev)) {
> + NL_SET_ERR_MSG_MOD(extack,
> + "RSS configuration can only be changed while the interface is down");
> + return -EBUSY;
> + }
[Severity: Low]
Should bnge_set_rxfh() return 0 before the netif_running() check when the
request does not change anything?
The ETHTOOL_SRSSH ioctl path in ethtool_set_rxfh() (net/ethtool/ioctl.c)
calls the driver even when only hfunc is set:
net/ethtool/ioctl.c:ethtool_set_rxfh() {
...
if (!rxfh.rss_context) {
ntf = ETHTOOL_MSG_RSS_NTF;
ret = ops->set_rxfh(dev, &rxfh_dev, extack);
...
}
In that case rxfh->indir and rxfh->key are both NULL, and hfunc is
ETH_RSS_HASH_TOP. Toeplitz is the only hash function bnge supports, so
the request is a no-op. Even so, "ethtool -X ethX hfunc toeplitz" over
the ioctl gets -EBUSY on a running interface.
The netlink path does not hit this, because ethnl_rss_set() skips the
driver call when nothing is modified.
bnge_set_rxfh_fields() in the same patch already handles this case.
It compares the config first and only checks netif_running() after that:
if (bd->rss_hash_cfg == rss_hash_cfg)
return 0;
if (netif_running(dev)) {
Would a check such as "if (!rxfh->key && !rxfh->indir) return 0;" before
the netif_running() test make bnge_set_rxfh() consistent with this? The
behaviour is still the same at the end of the series.
> +
> + bnge_modify_rss(bn, NULL, NULL, rxfh);
> +
> + return 0;
> +}
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261201132011.2705569-1-vikas.gupta%40broadcom.com
next prev parent reply other threads:[~2026-12-05 14:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 13:20 [PATCH net-next v12 00/10] add features to bnge Vikas Gupta
2026-12-01 13:20 ` [PATCH net-next v12 01/10] bnge: restructure VNIC and filter code Vikas Gupta
2026-12-01 13:20 ` [PATCH net-next v12 02/10] bnge: add NTUPLE/ARFS VNIC Vikas Gupta
2026-12-01 13:20 ` [PATCH net-next v12 03/10] bnge: add helper functions for multi RSS contexts Vikas Gupta
2026-12-05 14:46 ` netdev-bot+sashiko
2026-12-01 13:20 ` [PATCH net-next v12 04/10] bnge: add RXFH ethtool support Vikas Gupta
2026-12-05 14:46 ` netdev-bot+sashiko [this message]
2026-12-01 13:20 ` [PATCH net-next v12 05/10] bnge: add ethtool support to manage RSS contexts Vikas Gupta
2026-12-05 14:46 ` netdev-bot+sashiko
2026-12-01 13:20 ` [PATCH net-next v12 06/10] bnge: remove refcount from L2 filter Vikas Gupta
2026-12-01 13:20 ` [PATCH net-next v12 07/10] bnge: add NTUPLE filter infrastructure Vikas Gupta
2026-12-05 14:46 ` netdev-bot+sashiko
2026-12-01 13:20 ` [PATCH net-next v12 08/10] bnge: add NTUPLE filter support in ethtool Vikas Gupta
2026-12-05 14:46 ` netdev-bot+sashiko
2026-12-01 13:20 ` [PATCH net-next v12 09/10] bnge: add aRFS flow steering ndo support Vikas Gupta
2026-12-05 14:46 ` netdev-bot+sashiko
2026-12-01 13:20 ` [PATCH net-next v12 10/10] bnge: add cpu_rmap support for IRQ affinity Vikas Gupta
2026-12-05 14:46 ` netdev-bot+sashiko
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=179648197600.3146.12202992685876130509@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=ajit.khaparde@broadcom.com \
--cc=andrew+netdev@lunn.ch \
--cc=bhargava.marreddy@broadcom.com \
--cc=davem@davemloft.net \
--cc=dharmender.garg@broadcom.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rahul-rg.gupta@broadcom.com \
--cc=rajashekar.hudumula@broadcom.com \
--cc=vikas.gupta@broadcom.com \
--cc=vsrama-krishna.nemani@broadcom.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