All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Kohei Enju <enjuk@amazon.com>
Cc: <aleksander.lobakin@intel.com>, <andrew+netdev@lunn.ch>,
	<anthony.l.nguyen@intel.com>, <corbet@lwn.net>,
	<davem@davemloft.net>, <edumazet@google.com>, <horms@kernel.org>,
	<jacob.e.keller@intel.com>, <jiri@resnulli.us>,
	<linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<netdev@vger.kernel.org>, <pabeni@redhat.com>,
	<przemyslaw.kitszel@intel.com>, <sx.rinitha@intel.com>
Subject: Re: [PATCH net-next v2 13/14] ixgbe: preserve RSS indirection table across admin down/up
Date: Wed, 22 Oct 2025 17:26:49 -0700	[thread overview]
Message-ID: <20251022172649.0faa0548@kernel.org> (raw)
In-Reply-To: <20251022034051.28052-2-enjuk@amazon.com>

On Wed, 22 Oct 2025 12:40:45 +0900 Kohei Enju wrote:
> On Tue, 21 Oct 2025 16:10:06 -0700, Jakub Kicinski wrote:
> >On Tue, 21 Oct 2025 12:59:34 +0900 Kohei Enju wrote:  
> >> For example, consider a scenario where the queue count is 8 with user
> >> configuration containing values from 0 to 7. When queue count changes
> >> from 8 to 4 and we skip the reinitialization in this scenario, entries
> >> pointing to queues 4-7 become invalid. The same issue applies when the
> >> RETA table size changes.  
> >
> >Core should reject this. See ethtool_check_max_channel()  
> 
> Indeed, you're right that the situation above will be rejected. I missed
> it.
> 
> BTW, I think reinitializing the RETA table when queue count changes or
> RETA table size changes is reasonable for predictability and safety.
> Does this approach make sense to you?

Yes, if !netif_is_rxfh_configured() re-initializing is expected.

> >> Furthermore, IIUC, adding netif_is_rxfh_configured() to the current
> >> condition wouldn't provide additional benefit. When parameters remain
> >> unchanged, regardless of netif_is_rxfh_configured(), we already preserve
> >> the RETA entries which might be user-configured or default values,   
> >
> >User may decide to "isolate" (take out of RSS) a lower queue,
> >to configure it for AF_XDP or other form of zero-copy. Install
> >explicit rules to direct traffic to that queue. If you reset
> >the RSS table random traffic will get stranded in the ZC queue
> >(== dropped).
> 
> You're correct about the ZC queue scenario. The original implementation
> (before this patch) would indeed cause this problem by unconditionally
> reinitializing.
> 
> I believe this patch addresses that issue - it preserves the user
> configuration since neither queue count nor RETA table size changes in
> that case. If I'm misunderstanding your scenario, please let me know.
> 
> I could update the logic to explicitly check netif_is_rxfh_configured()
> as in [1], though the actual behavior would be the same as [2] since
> the default RETA table is a deterministic function of (rss_indices,
> reta_entries):
> 
> [1] Check user configuration explicitly:
>     if (!netif_is_rxfh_configured(adapter->netdev) ||
>         adapter->last_rss_indices != rss_i ||
>         adapter->last_reta_entries != reta_entries) {
>         // reinitialize
>     }
> 
> [2] Current patch:
>     if (adapter->last_rss_indices != rss_i ||
>         adapter->last_reta_entries != reta_entries) {
>         // reinitialize
>     }
> 
> Do you have any preference between these approaches, or would you
> recommend a different solution?

I was expecting something like:

if (netif_is_rxfh_configured(adapter->netdev)) {
	if (!check_that_rss_is_okay()) {
		/* This should never happen, barring FW errors etc */
		warn("user configuration lost due to XYZ");
		reinit();
	}
} else if (...rss_ind != rss_id ||
           ...reta_entries != reta_entries) {
	reinit();
}

  reply	other threads:[~2025-10-23  0:26 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17  6:08 [PATCH net-next v2 00/14] Intel Wired LAN Driver Updates 2025-10-15 (ice, iavf, ixgbe, i40e, e1000e) Jacob Keller
2025-10-17  6:08 ` [PATCH net-next v2 01/14] devlink: Add new "max_mac_per_vf" generic device param Jacob Keller
2025-10-17  6:08 ` [PATCH net-next v2 02/14] i40e: support generic devlink param "max_mac_per_vf" Jacob Keller
2025-10-21  1:25   ` Jakub Kicinski
2025-10-21 20:39     ` Jacob Keller
2025-10-21 23:07       ` Jakub Kicinski
2025-10-22  9:39         ` mohammad heib
2025-10-22 22:11         ` Jacob Keller
2025-10-24  8:07           ` mohammad heib
2025-10-17  6:08 ` [PATCH net-next v2 03/14] ice: add flow parsing for GTP and new protocol field support Jacob Keller
2025-10-17  6:08 ` [PATCH net-next v2 04/14] ice: add virtchnl and VF context support for GTP RSS Jacob Keller
2025-10-21  1:22   ` Jakub Kicinski
2025-10-22  9:58     ` Loktionov, Aleksandr
2025-10-17  6:08 ` [PATCH net-next v2 05/14] ice: improve TCAM priority handling for RSS profiles Jacob Keller
2025-10-21  1:16   ` Jakub Kicinski
2025-10-21 20:41     ` Jacob Keller
2025-10-17  6:08 ` [PATCH net-next v2 06/14] ice: Extend PTYPE bitmap coverage for GTP encapsulated flows Jacob Keller
2025-10-17  6:08 ` [PATCH net-next v2 07/14] iavf: add RSS support for GTP protocol via ethtool Jacob Keller
2025-10-17  6:08 ` [PATCH net-next v2 08/14] net: docs: add missing features that can have stats Jacob Keller
2025-10-17  6:08 ` [PATCH net-next v2 09/14] ice: implement ethtool standard stats Jacob Keller
2025-10-17  6:08 ` [PATCH net-next v2 10/14] ice: add tracking of good transmit timestamps Jacob Keller
2025-10-17  6:08 ` [PATCH net-next v2 11/14] ice: implement transmit hardware timestamp statistics Jacob Keller
2025-10-17  6:08 ` [PATCH net-next v2 12/14] ice: refactor to use helpers Jacob Keller
2025-10-17  6:08 ` [PATCH net-next v2 13/14] ixgbe: preserve RSS indirection table across admin down/up Jacob Keller
2025-10-21  1:32   ` Jakub Kicinski
2025-10-21  3:59     ` Kohei Enju
2025-10-21 23:10       ` Jakub Kicinski
2025-10-22  3:40         ` Kohei Enju
2025-10-23  0:26           ` Jakub Kicinski [this message]
2025-10-23 16:26             ` Kohei Enju
2025-10-17  6:08 ` [PATCH net-next v2 14/14] e1000e: Introduce private flag to disable K1 Jacob Keller
2025-10-21  1:33 ` [PATCH net-next v2 00/14] Intel Wired LAN Driver Updates 2025-10-15 (ice, iavf, ixgbe, i40e, e1000e) Jakub Kicinski
2025-10-21  1:40 ` patchwork-bot+netdevbpf

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=20251022172649.0faa0548@kernel.org \
    --to=kuba@kernel.org \
    --cc=aleksander.lobakin@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=enjuk@amazon.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jiri@resnulli.us \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=sx.rinitha@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.