[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <IA3PR11MB8986AD639F3395B5BFCC2C38E506A@IA3PR11MB8986.namprd11.prod.outlook.com>
Date: Tue, 2 Sep 2025 13:25:56 +0000
From: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
To: Kohei Enju <enjuk@...zon.com>, "intel-wired-lan@...ts.osuosl.org"
<intel-wired-lan@...ts.osuosl.org>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>
CC: "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>, "Kitszel, Przemyslaw"
<przemyslaw.kitszel@...el.com>, Andrew Lunn <andrew+netdev@...n.ch>, "David
S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, "Jakub
Kicinski" <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
"kohei.enju@...il.com" <kohei.enju@...il.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next v3] ixgbe: preserve RSS
indirection table across admin down/up
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf
> Of Kohei Enju
> Sent: Tuesday, September 2, 2025 2:11 PM
> To: intel-wired-lan@...ts.osuosl.org; netdev@...r.kernel.org
> Cc: Nguyen, Anthony L <anthony.l.nguyen@...el.com>; Kitszel,
> Przemyslaw <przemyslaw.kitszel@...el.com>; Andrew Lunn
> <andrew+netdev@...n.ch>; David S. Miller <davem@...emloft.net>; Eric
> Dumazet <edumazet@...gle.com>; Jakub Kicinski <kuba@...nel.org>; Paolo
> Abeni <pabeni@...hat.com>; kohei.enju@...il.com; Kohei Enju
> <enjuk@...zon.com>
> Subject: [Intel-wired-lan] [PATCH iwl-next v3] ixgbe: preserve RSS
> indirection table across admin down/up
>
> Currently, the RSS indirection table configured by user via ethtool is
> reinitialized to default values during interface resets (e.g., admin
> down/up, MTU change). As for RSS hash key, commit 3dfbfc7ebb95
> ("ixgbe:
> Check for RSS key before setting value") made it persistent across
> interface resets.
>
> Adopt the same approach used in igc and igb drivers which
> reinitializes
> the RSS indirection table only when the queue count changes. Since the
> number of RETA entries can also change in ixgbe, let's make user
> configuration persistent as long as both queue count and the number of
> RETA entries remain unchanged.
>
> Tested on Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network
> Connection.
>
...
> static void ixgbe_setup_reta(struct ixgbe_adapter *adapter)
> {
> - u32 i, j;
> u32 reta_entries = ixgbe_rss_indir_tbl_entries(adapter);
> u16 rss_i = adapter->ring_feature[RING_F_RSS].indices;
> + u32 i;
>
> /* Program table for at least 4 queues w/ SR-IOV so that VFs
> can
> * make full use of any rings they may have. We will use the
> @@ -4323,14 +4323,17 @@ static void ixgbe_setup_reta(struct
> ixgbe_adapter *adapter)
> /* Fill out hash function seeds */
> ixgbe_store_key(adapter);
>
> - /* Fill out redirection table */
> - memset(adapter->rss_indir_tbl, 0, sizeof(adapter-
> >rss_indir_tbl));
> -
> - for (i = 0, j = 0; i < reta_entries; i++, j++) {
> - if (j == rss_i)
> - j = 0;
> + /* Update redirection table in memory on first init, queue
> count change,
> + * or reta entries change, otherwise preserve user
> configurations. Then
> + * always write to hardware.
> + */
> + if (adapter->last_rss_indices != rss_i ||
> + adapter->last_reta_entries != reta_entries) {
> + for (i = 0; i < reta_entries; i++)
> + adapter->rss_indir_tbl[i] = i % rss_i;
Are you sure rss_i never ever can be a 0?
This is the only thing I'm worrying about.
Powered by blists - more mailing lists