From: Joe Damato <jdamato@fastly.com>
To: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, jesse.brandeburg@intel.com,
anthony.l.nguyen@intel.com, kuba@kernel.org,
sridhar.samudrala@intel.com
Subject: Re: [PATCH net v2 1/2] ixgbe: Allow flow hash to be set via ethtool
Date: Sun, 16 Apr 2023 21:57:34 -0700 [thread overview]
Message-ID: <20230417045734.GA43796@fastly.com> (raw)
In-Reply-To: <20230416191223.394805-2-jdamato@fastly.com>
On Sun, Apr 16, 2023 at 07:12:22PM +0000, Joe Damato wrote:
> ixgbe currently returns `EINVAL` whenever the flowhash it set by ethtool
> because the ethtool code in the kernel passes a non-zero value for hfunc
> that ixgbe should allow.
>
> When ethtool is called with `ETHTOOL_SRXFHINDIR`,
> `ethtool_set_rxfh_indir` will call ixgbe's set_rxfh function
> with `ETH_RSS_HASH_NO_CHANGE`. This value should be accepted.
>
> When ethtool is called with `ETHTOOL_SRSSH`, `ethtool_set_rxfh` will
> call ixgbe's set_rxfh function with `rxfh.hfunc`, which appears to be
> hardcoded in ixgbe to always be `ETH_RSS_HASH_TOP`. This value should
> also be accepted.
>
> Before this patch:
>
> $ sudo ethtool -L eth1 combined 10
> $ sudo ethtool -X eth1 default
> Cannot set RX flow hash configuration: Invalid argument
>
> After this patch:
>
> $ sudo ethtool -L eth1 combined 10
> $ sudo ethtool -X eth1 default
> $ sudo ethtool -x eth1
> RX flow hash indirection table for eth1 with 10 RX ring(s):
> 0: 0 1 2 3 4 5 6 7
> 8: 8 9 0 1 2 3 4 5
> 16: 6 7 8 9 0 1 2 3
> 24: 4 5 6 7 8 9 0 1
> ...
>
Sorry for the noise, forgot the fixes tag.
Fixes: 1c7cf0784e4d ("ixgbe: support for ethtool set_rxfh")
> Signed-off-by: Joe Damato <jdamato@fastly.com>
> Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
> index 6cfc9dc16537..821dfd323fa9 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
> @@ -3131,8 +3131,8 @@ static int ixgbe_set_rxfh(struct net_device *netdev, const u32 *indir,
> int i;
> u32 reta_entries = ixgbe_rss_indir_tbl_entries(adapter);
>
> - if (hfunc)
> - return -EINVAL;
> + if (hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc != ETH_RSS_HASH_TOP)
> + return -EOPNOTSUPP;
>
> /* Fill out the redirection table */
> if (indir) {
> --
> 2.25.1
>
next prev parent reply other threads:[~2023-04-17 4:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-16 19:12 [PATCH net v2 0/2] ixgbe: Multiple RSS bugfixes Joe Damato
2023-04-16 19:12 ` [PATCH net v2 1/2] ixgbe: Allow flow hash to be set via ethtool Joe Damato
2023-04-17 4:57 ` Joe Damato [this message]
2023-04-20 16:35 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2023-04-16 19:12 ` [PATCH net v2 2/2] ixgbe: Enable setting RSS table to default values Joe Damato
2023-04-17 4:58 ` Joe Damato
2023-04-20 16:39 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
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=20230417045734.GA43796@fastly.com \
--to=jdamato@fastly.com \
--cc=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sridhar.samudrala@intel.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).