๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by netdev-bot+sashiko Tue, 24 Nov 2026 10:20
Re: [PATCH net-next v9 04/10] bnge: add RXFH ethtool support
#21692
Author: netdev-bot+sashiko
Date: Tue, 24 Nov 2026 10:20
74 lines
10824 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] This commit sets four RSS-context fields in bnge_ethtool_ops:
  `.rxfh_per_ctx_key = 1`, `.rxfh_max_num_contexts =โ€ฆ

--

bnge: add RXFH ethtool support

This adds the ethtool get/set_rxfh and get/set_rxfh_fields callbacks for
the RSS hash key, the indirection table and the hash fields. Changes are
only accepted while the device is down. The default key now comes from
netdev_rss_key_fill(), and the indirection table is reset or kept when
the RX ring count changes.

> 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

[ ... ]

> @@ -757,6 +1090,18 @@ static const struct ethtool_ops bnge_ethtool_ops = {
>  	.get_eth_ctrl_stats	= bnge_get_eth_ctrl_stats,
>  	.get_pause_stats	= bnge_get_pause_stats,
>  	.get_rmon_stats		= bnge_get_rmon_stats,
> +	/* RXFH */
> +	.rxfh_per_ctx_key	= 1,
> +	.rxfh_max_num_contexts	= BNGE_MAX_ETH_RSS_CTX + 1,
> +	.rxfh_indir_space	= BNGE_MAX_RSS_TABLE_ENTRIES,
> +	.rxfh_priv_size		= sizeof(struct bnge_rss_ctx),

[Severity: Low]
This isn't a bug, but these four fields describe RSS context support.
This patch doesn't add create_rxfh_context, modify_rxfh_context or
remove_rxfh_context to bnge_ethtool_ops, so here they have no effect.

The ethtool core checks for the create callback before it reads any of
them, for example in ethnl_rss_create_validate():

    if (!ops->create_rxfh_context)
        return -EOPNOTSUPP;

As a result, "ethtool -X ethX context new" still returns -EOPNOTSUPP at
this commit, the same as before the patch. The new BNGE_MAX_ETH_RSS_CTX
define in bnge_vnic.h is only used by rxfh_max_num_contexts here.

The next patch in the series, "bnge: add ethtool support to manage RSS
contexts", adds all three callbacks. By the end of the series these
fields line up with the context code.

The commit message doesn't mention these fields. Could they and
BNGE_MAX_ETH_RSS_CTX move to the RSS context patch, where they are first
used? Alternatively, the commit message could note why they are added
here.

> +	.get_rx_ring_count	= bnge_get_rx_ring_count,
> +	.get_rxfh_indir_size	= bnge_get_rxfh_indir_size_eth,
> +	.get_rxfh_key_size	= bnge_get_rxfh_key_size,
> +	.get_rxfh		= bnge_get_rxfh,
> +	.set_rxfh		= bnge_set_rxfh,
> +	.get_rxfh_fields	= bnge_get_rxfh_fields,
> +	.set_rxfh_fields	= bnge_set_rxfh_fields,
>  };

[ ... ]

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261123100746.1975030-1-vikas.gupta%40broadcom.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads