[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aEu4zx_dsc2FCdpu@MacBook-Air.local>
Date: Fri, 13 Jun 2025 08:36:15 +0300
From: Joe Damato <joe@...a.to>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
ecree.xilinx@...il.com, andrew@...n.ch
Subject: Re: [PATCH net-next 4/9] net: ethtool: add dedicated callbacks for
getting and setting rxfh fields
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@...nel.org>
> ---
> CC: andrew@...n.ch
> CC: ecree.xilinx@...il.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?
Powered by blists - more mailing lists