public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcin Szycik <marcin.szycik@linux.intel.com>
To: Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com
Cc: netdev@vger.kernel.org
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v2] ice: implement symmetric RSS hash configuration
Date: Thu, 19 Feb 2026 13:53:26 +0100	[thread overview]
Message-ID: <650853a0-6fdb-42cb-9feb-c9166439bcaa@linux.intel.com> (raw)
In-Reply-To: <20260217130039.1802805-1-aleksandr.loktionov@intel.com>



On 17.02.2026 14:00, Aleksandr Loktionov wrote:
> The driver advertises symmetric RSS support via supported_input_xfrm
> but ice_set_rxfh() ignored the input_xfrm parameter, making it

s/ignored/ignores/

> impossible to configure symmetric hashing.
> 
> Fix ice_set_rxfh() to check rxfh->input_xfrm and call
> ice_set_rss_hfunc() with ICE_AQ_VSI_Q_OPT_RSS_HASH_SYM_TPLZ when
> RXH_XFRM_SYM_XOR is requested.
> 
> Modify ice_set_rss_vsi_ctx() to use vsi->rss_hfunc instead of
> hardcoding ICE_AQ_VSI_Q_OPT_RSS_HASH_TPLZ, and export it for
> use by ice_set_rxfh().
> 
> The kernel requires get_rxfh_fields() to report symmetric hash
> configurations when symmetric transforms are supported. Update
> ice_get_rxfh_fields() to return symmetric field configuration
> (src+dst IP and ports) for all flow types.
> 
> Tested with tools/testing/selftests/drivers/net/hw/rss_input_xfrm.py
> 
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> ---
> v1 -> v2 preserve valid symmetric RSS fields.
> ---
>  drivers/net/ethernet/intel/ice/ice_ethtool.c | 45 ++++++++++++++++----
>  drivers/net/ethernet/intel/ice/ice_lib.c     |  7 +--
>  drivers/net/ethernet/intel/ice/ice_lib.h     |  1 +
>  3 files changed, 41 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> index c6bc29c..27c97ca 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> @@ -3008,14 +3008,18 @@ ice_set_rxfh_fields(struct net_device *netdev,
>  	return 0;
>  }
>  
> +#define ICE_RSS_ALLOWED_FIELDS	(RXH_IP_SRC | RXH_IP_DST | RXH_L4_B_0_1 | RXH_L4_B_2_3)
> +#define ICE_RSS_L3_PAIR		(RXH_IP_SRC | RXH_IP_DST)
> +#define ICE_RSS_L4_PAIR		(RXH_L4_B_0_1 | RXH_L4_B_2_3)
> +
>  static int
>  ice_get_rxfh_fields(struct net_device *netdev, struct ethtool_rxfh_fields *nfc)
>  {
>  	struct ice_netdev_priv *np = netdev_priv(netdev);
>  	struct ice_vsi *vsi = np->vsi;
>  	struct ice_pf *pf = vsi->back;
> +	u64 l3, l4, hash_flds;
>  	struct device *dev;
> -	u64 hash_flds;
>  	bool symm;
>  	u32 hdrs;
>  
> @@ -3037,8 +3041,10 @@ ice_get_rxfh_fields(struct net_device *netdev, struct ethtool_rxfh_fields *nfc)
>  
>  	hash_flds = ice_get_rss_cfg(&pf->hw, vsi->idx, hdrs, &symm);
>  	if (hash_flds == ICE_HASH_INVALID) {
> -		dev_dbg(dev, "No hash fields found for the given header type, vsi num = %d\n",
> +		/* Provide default symmetric hash fields when no config exists */
> +		dev_dbg(dev, "No RSS config for this flow, using symmetric defaults, vsi num = %d\n",
>  			vsi->vsi_num);
> +		nfc->data = RXH_IP_SRC | RXH_IP_DST | RXH_L4_B_0_1 | RXH_L4_B_2_3;

This is the same as ICE_RSS_ALLOWED_FIELDS, use it or:
#define ICE_RSS_DEFAULT_FIELDS ICE_RSS_ALLOWED_FIELDS

>  		return 0;
>  	}

Thanks,
Marcin

---8<---

      parent reply	other threads:[~2026-02-19 12:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-17 13:00 [PATCH iwl-next v2] ice: implement symmetric RSS hash configuration Aleksandr Loktionov
2026-02-18  9:26 ` Simon Horman
2026-02-19 12:53 ` Marcin Szycik [this message]

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=650853a0-6fdb-42cb-9feb-c9166439bcaa@linux.intel.com \
    --to=marcin.szycik@linux.intel.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=netdev@vger.kernel.org \
    /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