netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Damato <joe@dama.to>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
	ecree.xilinx@gmail.com, andrew@lunn.ch
Subject: Re: [PATCH net-next 4/9] net: ethtool: add dedicated callbacks for getting and setting rxfh fields
Date: Fri, 13 Jun 2025 08:36:15 +0300	[thread overview]
Message-ID: <aEu4zx_dsc2FCdpu@MacBook-Air.local> (raw)
In-Reply-To: <20250611145949.2674086-5-kuba@kernel.org>

On Wed, Jun 11, 2025 at 07:59:44AM -0700, Jakub Kicinski wrote:
> We mux multiple calls to the drivers via the .get_nfc and .set_nfc
> callbacks. This is slightly inconvenient to the drivers as they
> have to de-mux them back. It will also be awkward for netlink code
> to construct struct ethtool_rxnfc when it wants to get info about
> RX Flow Hash, from the RSS module.
> 
> Add dedicated driver callbacks. Create struct ethtool_rxfh_fields
> which contains only data relevant to RXFH. Maintain the names of
> the fields to avoid having to heavily modify the drivers.
> 
> For now support both callbacks, once all drivers are converted
> ethtool_*et_rxfh_fields() will stop using the rxnfc callbacks.
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: andrew@lunn.ch
> CC: ecree.xilinx@gmail.com
> ---

[...]

> diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
> index bd9fd95bb82f..f4d4d60275f8 100644
> --- a/net/ethtool/ioctl.c
> +++ b/net/ethtool/ioctl.c

[...]

> @@ -1492,7 +1527,7 @@ static noinline_for_stack int ethtool_set_rxfh(struct net_device *dev,
>  	u8 *rss_config;
>  	int ret;
>  
> -	if (!ops->get_rxnfc || !ops->set_rxfh)
> +	if ((!ops->get_rxnfc && !ops->get_rxfh_fields) || !ops->set_rxfh)
>  		return -EOPNOTSUPP;

I realize I am late to the thread, but is this part above correct? It seems
like ethtool_set_rxfh calls ops->get_rxnfc but not ops->get_rxfh_fields,
unless I missed something in an earlier patch?

  reply	other threads:[~2025-06-13  5:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-11 14:59 [PATCH net-next 0/9] net: ethtool: add dedicated RXFH driver callbacks Jakub Kicinski
2025-06-11 14:59 ` [PATCH net-next 1/9] net: ethtool: copy the rxfh flow handling Jakub Kicinski
2025-06-12 21:02   ` Joe Damato
2025-06-11 14:59 ` [PATCH net-next 2/9] net: ethtool: remove the duplicated handling from rxfh and rxnfc Jakub Kicinski
2025-06-12 21:34   ` Joe Damato
2025-06-11 14:59 ` [PATCH net-next 3/9] net: ethtool: require drivers to opt into the per-RSS ctx RXFH Jakub Kicinski
2025-06-12 21:09   ` Joe Damato
2025-06-11 14:59 ` [PATCH net-next 4/9] net: ethtool: add dedicated callbacks for getting and setting rxfh fields Jakub Kicinski
2025-06-13  5:36   ` Joe Damato [this message]
2025-06-13 14:39     ` Jakub Kicinski
2025-06-11 14:59 ` [PATCH net-next 5/9] eth: remove empty RXFH handling from drivers Jakub Kicinski
2025-06-12  3:21   ` Ziwei Xiao
2025-06-11 14:59 ` [PATCH net-next 6/9] eth: fbnic: migrate to new RXFH callbacks Jakub Kicinski
2025-06-11 14:59 ` [PATCH net-next 7/9] net: drv: vmxnet3: " Jakub Kicinski
2025-06-11 14:59 ` [PATCH net-next 8/9] net: drv: virtio: " Jakub Kicinski
2025-06-13  0:42   ` Jason Wang
2025-06-11 14:59 ` [PATCH net-next 9/9] net: drv: hyperv: " Jakub Kicinski
2025-06-13  0:50 ` [PATCH net-next 0/9] net: ethtool: add dedicated RXFH driver callbacks patchwork-bot+netdevbpf
2025-06-25  6:44 ` Gal Pressman
2025-06-25 20:17   ` Jakub Kicinski

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=aEu4zx_dsc2FCdpu@MacBook-Air.local \
    --to=joe@dama.to \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).