From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Sreedevi Joshi <sreedevi.joshi@intel.com>,
<intel-wired-lan@lists.osuosl.org>
Cc: <netdev@vger.kernel.org>,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
Sridhar Samudrala <sridhar.samudrala@intel.com>,
Emil Tantilov <emil.s.tantilov@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-net 2/3] idpf: Fix RSS LUT configuration on down interfaces
Date: Fri, 21 Nov 2025 13:27:27 -0800 [thread overview]
Message-ID: <f5ec8890-c2e2-482e-a913-8cf943f5966f@intel.com> (raw)
In-Reply-To: <20251118042228.381667-3-sreedevi.joshi@intel.com>
On 11/17/2025 8:22 PM, Sreedevi Joshi wrote:
> RSS LUT provisioning and queries on a down interface currently return
> silently without effect. Users should be able to configure RSS settings
> even when the interface is down.
>
> Fix by maintaining RSS configuration changes in the driver's soft copy and
> deferring HW programming until the interface comes up.
>
> Fixes: 02cbfba1add5 ("idpf: add ethtool callbacks")
> Signed-off-by: Sreedevi Joshi <sreedevi.joshi@intel.com>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
> Reviewed-by: Emil Tantilov <emil.s.tantilov@intel.com>
> ---
> drivers/net/ethernet/intel/idpf/idpf_ethtool.c | 17 +++++++++++------
> 1 file changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_ethtool.c b/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
> index 4c6e52253ae4..d9903a21972a 100644
> --- a/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
> +++ b/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
> @@ -393,7 +393,10 @@ static u32 idpf_get_rxfh_indir_size(struct net_device *netdev)
> * @netdev: network interface device structure
> * @rxfh: pointer to param struct (indir, key, hfunc)
> *
> - * Reads the indirection table directly from the hardware. Always returns 0.
> + * RSS LUT and Key information are read from driver's cached
> + * copy. When rxhash is off, rss lut will be displayed as zeros.
> + *
> + * Returns 0 on success.
Can you make this Return: to make kdoc happy?
> */
> static int idpf_get_rxfh(struct net_device *netdev,
> struct ethtool_rxfh_param *rxfh)
> @@ -401,10 +404,13 @@ static int idpf_get_rxfh(struct net_device *netdev,
> struct idpf_netdev_priv *np = netdev_priv(netdev);
> struct idpf_rss_data *rss_data;
> struct idpf_adapter *adapter;
> + struct idpf_vport *vport;
> + bool rxhash_ena;
> int err = 0;
> u16 i;
>
> idpf_vport_ctrl_lock(netdev);
> + vport = idpf_netdev_to_vport(netdev);
>
> adapter = np->adapter;
>
> @@ -414,9 +420,8 @@ static int idpf_get_rxfh(struct net_device *netdev,
> }
>
> rss_data = &adapter->vport_config[np->vport_idx]->user_config.rss_data;
> - if (np->state != __IDPF_VPORT_UP)
> - goto unlock_mutex;
>
> + rxhash_ena = idpf_is_feature_ena(vport, NETIF_F_RXHASH);
> rxfh->hfunc = ETH_RSS_HASH_TOP;
>
> if (rxfh->key)
> @@ -424,7 +429,7 @@ static int idpf_get_rxfh(struct net_device *netdev,
>
> if (rxfh->indir) {
> for (i = 0; i < rss_data->rss_lut_size; i++)
> - rxfh->indir[i] = rss_data->rss_lut[i];
> + rxfh->indir[i] = (rxhash_ena) ? rss_data->rss_lut[i] : 0;
Parens not needed
> }
>
> unlock_mutex:
> @@ -464,8 +469,6 @@ static int idpf_set_rxfh(struct net_device *netdev,
> }
>
> rss_data = &adapter->vport_config[vport->idx]->user_config.rss_data;
> - if (np->state != __IDPF_VPORT_UP)
> - goto unlock_mutex;
>
> if (rxfh->hfunc != ETH_RSS_HASH_NO_CHANGE &&
> rxfh->hfunc != ETH_RSS_HASH_TOP) {
> @@ -481,6 +484,8 @@ static int idpf_set_rxfh(struct net_device *netdev,
> rss_data->rss_lut[lut] = rxfh->indir[lut];
> }
>
> + if (np->state != __IDPF_VPORT_UP)
> + goto unlock_mutex;
> err = idpf_config_rss(vport);
>
> unlock_mutex:
next prev parent reply other threads:[~2025-11-21 21:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-18 4:22 [Intel-wired-lan] [PATCH iwl-net 0/3] idpf: Fix issues in rxhash and rss lut logic Sreedevi Joshi
2025-11-18 4:22 ` [Intel-wired-lan] [PATCH iwl-net 1/3] idpf: Fix RSS LUT NULL pointer crash on early ethtool operations Sreedevi Joshi
2025-11-18 7:22 ` Paul Menzel
2025-11-18 19:20 ` Joshi, Sreedevi
2025-11-21 21:22 ` Tony Nguyen
2025-11-22 5:03 ` Joshi, Sreedevi
2025-11-18 4:22 ` [Intel-wired-lan] [PATCH iwl-net 2/3] idpf: Fix RSS LUT configuration on down interfaces Sreedevi Joshi
2025-11-21 21:27 ` Tony Nguyen [this message]
2025-11-21 21:53 ` Joshi, Sreedevi
2025-11-21 22:36 ` Tony Nguyen
2025-11-18 4:22 ` [Intel-wired-lan] [PATCH iwl-net 3/3] idpf: Fix RSS LUT NULL ptr issue after soft reset Sreedevi Joshi
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=f5ec8890-c2e2-482e-a913-8cf943f5966f@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=emil.s.tantilov@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
--cc=sreedevi.joshi@intel.com \
--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