[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260122074916.119851-1-kohei@enjuk.jp>
Date: Thu, 22 Jan 2026 07:49:16 +0000
From: Kohei Enju <kohei@...uk.jp>
To: aleksandr.loktionov@...el.com
Cc: andrew+netdev@...n.ch, anthony.l.nguyen@...el.com, davem@...emloft.net,
edumazet@...gle.com, intel-wired-lan@...ts.osuosl.org,
kohei.enju@...il.com, kohei@...uk.jp, kuba@...nel.org,
netdev@...r.kernel.org, pabeni@...hat.com,
przemyslaw.kitszel@...el.com, takkozu@...zon.com
Subject: Re: [Intel-wired-lan] [PATCH v1 iwl-next] igb: set skb hash type
On Thu, 22 Jan 2026 07:33:23 +0000, "Loktionov, Aleksandr" wrote:
> > -----Original Message-----
> > From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf
> > Of Kohei Enju
> > Sent: Monday, January 19, 2026 6:58 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; Takashi Kozu
> > <takkozu@...zon.com>; Kohei Enju <kohei@...uk.jp>
> > Subject: [Intel-wired-lan] [PATCH v1 iwl-next] igb: set skb hash type
> > from RSS_TYPE
> >=20
> > igb always marks the RX hash as L3 regardless of RSS_TYPE in the
> > advanced descriptor, which may indicate L4 (TCP/UDP) hash. This can
> > trigger unnecessary SW hash recalculation and breaks toeplitz
> > selftests.
> >=20
> > Use RSS_TYPE from pkt_info to set the correct PKT_HASH_TYPE_*
> >=20
> > Tested by toeplitz.py with the igb RSS key get/set patches applied as
> > they are required for toeplitz.py (see Link below).
> > # ethtool -N $DEV rx-flow-hash udp4 sdfn # ethtool -N $DEV rx-flow-
> > hash udp6 sdfn # python toeplitz.py | grep -E "^# Totals"
> >=20
> > Without patch:
> > # Totals: pass:0 fail:12 xfail:0 xpass:0 skip:0 error:0
> >=20
> > With patch:
> > # Totals: pass:12 fail:0 xfail:0 xpass:0 skip:0 error:0
> >=20
> > Link: https://lore.kernel.org/intel-wired-lan/20260119084511.95287-5-
> > takkozu@...zon.com/
> > Signed-off-by: Kohei Enju <kohei@...uk.jp>
> > ---
> > If a Fixes tag is needed, it would be Fixes: 42bdf083fe70 ("net: igb
> > calls skb_set_hash").
> >=20
> > I'm not sure this qualifies as a fix, since the RX hash marking has
> > been wrong for a long time without reported issues. So I'm leaning
> > toward omitting Fixes.
> > ---
> > drivers/net/ethernet/intel/igb/e1000_82575.h | 21
> > ++++++++++++++++++++
> > drivers/net/ethernet/intel/igb/igb_main.c | 18 +++++++++++++----
> > 2 files changed, 35 insertions(+), 4 deletions(-)
> >=20
> > diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.h
> > b/drivers/net/ethernet/intel/igb/e1000_82575.h
> > index 63ec253ac788..a855bc10f5d4 100644
> > --- a/drivers/net/ethernet/intel/igb/e1000_82575.h
> > +++ b/drivers/net/ethernet/intel/igb/e1000_82575.h
> > @@ -87,6 +87,27 @@ union e1000_adv_rx_desc {
> > } wb; /* writeback */
> > };
> >=20
> > +#define E1000_RSS_TYPE_NO_HASH 0
> > +#define E1000_RSS_TYPE_HASH_TCP_IPV4 1
> > +#define E1000_RSS_TYPE_HASH_IPV4 2
> > +#define E1000_RSS_TYPE_HASH_TCP_IPV6 3
> > +#define E1000_RSS_TYPE_HASH_IPV6_EX 4
> > +#define E1000_RSS_TYPE_HASH_IPV6 5
> > +#define E1000_RSS_TYPE_HASH_TCP_IPV6_EX 6
> > +#define E1000_RSS_TYPE_HASH_UDP_IPV4 7
> > +#define E1000_RSS_TYPE_HASH_UDP_IPV6 8
> > +#define E1000_RSS_TYPE_HASH_UDP_IPV6_EX 9
> > +
> > +#define E1000_RSS_TYPE_MASK GENMASK(3, 0) /* 4-bits (3:0)
> > =3D mask 0x0F */
> 80columns violation, it's not critical, but I'd suggest just remove redunda=
> nt comment
> Otherwise, it smells like AI generated...
> #define E1000_RSS_TYPE_MASK GENMASK(3, 0)
Ugh, somehow I missed the warning in checkpatch.pl. Thank you for
poiting out. TBH I copied that line from igc/igc.h with the comment, but
the comment is not necessary :)
I'll fix it in v2.
>
> Everything else looks fine.
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>
>
Powered by blists - more mailing lists