Article View: linux.kernel.netdev
Article #27406Re: [PATCH net-next v12 04/10] bnge: add RXFH ethtool support
From: netdev-bot+sashiko
Date: Sat, 05 Dec 2026 14:46
Date: Sat, 05 Dec 2026 14:46
87 lines
10846 bytes
10846 bytes
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
Technical Details
Message-ID:
<179648197600.3146.12202992685876130509@kernel.org>Path:
mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-378020-linux-kernel-netdev=dewy.ruReferences:
<20261201132011.2705569-5-vikas.gupta@broadcom.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-378020-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v12 04/10] bnge: add RXFH ethtool support Date: Sat, 05 Dec 2026 14:46:16 +0000 Organization: Usenet Network Message-ID: <179648197600.3146.12202992685876130509@kernel.org> References: <20261201132011.2705569-5-vikas.gupta@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3049174"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:MeyHilsfp6HXvwT+eddQhEX7uTk= sha256:IBYZvvIGOWAJFFHSC/Z1KKN5WBI1nEP0vFBgJtDfg38= sha1:0xMy/uK1WMoR1k5beK4I3HO0kpE= sha256:SNIIQKIlkeUcq8Ev21yN8GHqddp3u7V+bLW7X5asn+o= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id CB061117E42; Sat, 5 Dec 2026 17:46:44 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.639 X-Spam-Status: No, score=-3.639 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2Zui1zEUwGxh; Sat, 5 Dec 2026 17:46:41 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-378020-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id 092E9117E18; Sat, 5 Dec 2026 17:46:32 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id EE83C6073F0; Sat, 5 Dec 2026 14:46:31 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796481983; b=TNJLOEFPwalRdcauxZnbpEab8ayrFYyp8N5yEuo8XsEOR3stKYgdOjTLUd3EYG8SJMwQ qUph5oWjgX8x0bdgGPMgutbm4F9tangVFBmVksBkz1EQ36BTDM5a7cwbAC6De9jfxpCA4 ZVuuwvBL3S7Ml4yqggQsxjATWEBD4xLwS3ppmareWvHH6y5QmBC4Q3Ef8wSw8Sux4x6tR 6AwqW63IAmyn94y79TjgFxKkw0b0uCxcGEt/tuFyp57SYzFgofMACyabrEy2eJ/W4TK6u 6+GUVlcgvooVYg9wGxUYw8HP640RW+B9aSPmu0i2F1w/NE/xlZg8SgxnOMm9ivvMqZA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796481983; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=1imjgvEMrHrpGrRqA7GIA+rmfJTS+oh/s87TyiebKnw=; b=tF2oJbQMPPjnJGCtJPkrw7bE9/vWBwfph7S1T0P+TY+hHCkxxg+nO70j6vywIRrp3Lde FXQsVlN392FmUHr7uByTXYcBRtKqT8FYNBGqPW0fTIHuRLaF4e+3WXNLF5SJxNYXVrKxw HVWg3x6MrxG4GoJlyjp/uFVOnJIrfRpgmvVksxe/Ai6xlhXBoooA8ApIuQYnKCgpRjl/q GNOZiL0MqnVKn+P6hViW3/irBl2wES7Gs5wFLFngnQtkvPAamDSP/zZNLrNH8hflrtDGI Yc8EYqAr724AJtiBdlnY+c/VFIIRKsX7aoOB8FUjaXf6Djq0lfN6MwUvsr+QDELxAmQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NCfSMoQr; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4AD65606A68E; Sat, 5 Dec 2026 14:46:23 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NCfSMoQr X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796481977; b=nC/akycDupdFKgbPsjfA7cxGn1xQIX0/UX1A8RdJ+Sg44y9DlGIm965hZMsK2gozhbDr 0HRs+gkZkfEGm42dD4uNDk3F5qrdksnlVStPSYizAi3NobGNdf6BmHw+4qmh/uDUmI0Yz 8GhUKkziFHyqpU5E3ueF1Gz1qNcY9LTW0t1Exbi/HkB/OPrZDxdFGqR1ar85dGzSt8ycb tnfDShmK5OxIezgtiJ84iEjpTxdzQr6xch1xhCZKy/dDNLzMFbsRCa7Mk0McoeZJXx2hi LBYlBdZyivCw/B+FFEqWckz3TQd3o0WF69tk1dmCy5XYtJmnAakwyPaeBH2p9Q/vqZQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796481977; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=1imjgvEMrHrpGrRqA7GIA+rmfJTS+oh/s87TyiebKnw=; b=tI+YA11q+1Zjg4hvnqimXd7ciH5MLKs2hpOgUpBFyXc8x6zToFCNTinNZoLLKDB69LNr obo/wPo60EItQyrnJIE53VwWpPH2YFEtMLItsr3BmyfVXKIOR+2yxybjtloUXriXJbEuC tqMSIY/pbYpiCKuo5d4x3Ucs61yzsinrmzYe4D14tlR4x7dmlGWv0u5EBvDtMv1LYeYUs tAkuwbvu6/aHUg8I1cxHDrAL8IMlb9Ud7SnPeEEeSDr8SLB6vuPImYt8k19MAtDF09mzd fu0HT5OuxUZG1p3C+fA+tERlXay2v5yyObM03A0BXzzcFFNNQLMP/e6jgSOGgmpVSpA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NCfSMoQr; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6BB1D606A33D; Sat, 5 Dec 2026 14:46:17 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7354C1F0092B; Sat, 5 Dec 2026 14:46:16 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796481977; bh=1imjgvEMrHrpGrRqA7GIA+rmfJTS+oh/s87TyiebKnw=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=NCfSMoQr+Be9tI+kIMUQgnZI1Mab5zpvP/pLjnavRtbkycsRUiPwJybnaOTOTonpR dUwchVkwZ/sdr+rYzJzCAnyaNsBMuFmQETjFAp8146iZjVOD3ddou6g5EKUKAPXGEZ xsJP+kfZT6SllXnG6b8yIMsBJfl2I1nHSWwezdCeHnItFoF/QTdn2wJIzhkSSrUb03 p7am14OXnc55AGIF0HbKpG/folWpAoxZcR2TD64e6gfsZrhBKc3pKuoPEj4Hlm4kPQ /BURjHkWS33DeEC/Z2blLQZab4O11lUVX12arp7OZCeS3puds/JL3k7K+Cqbpz2FPV pe+67EV6zmkOg== X-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 X-In-Reply-To: <20261201132011.2705569-5-vikas.gupta@broadcom.com> X-sashiko-severity: Low X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list