All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>,
	Willem de Bruijn <willemb@google.com>,
	Simon Horman <horms@kernel.org>,
	netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH net-next 3/5] net: ethtool: add KUnit tests for the generated RSS key
Date: Mon, 21 Sep 2026 13:03:37 -0700	[thread overview]
Message-ID: <20260921130337.57d93c2f@kernel.org> (raw)
In-Reply-To: <20260921183758.1812310-4-edumazet@google.com>

On Mon, 21 Sep 2026 18:37:56 +0000 Eric Dumazet wrote:
> Check the property from the definition of the Toeplitz hash, independently
> of the way netdev_rss_key_init() achieves it: an aligned block of 2^q
> consecutive values of one field has to land on the 2^q queues exactly once
> each.
> 
> Four checks and a control. rss_key_property_test() does the algebra for
> the named fields of the usual hash inputs, rss_key_grid_test() sweeps every
> 16-bit aligned position of the key, since the generator does not get to
> know the layout the hardware uses, and rss_key_spread_test() hashes the
> inputs of an actual burst and looks at where they land. The control,
> rss_key_checker_test(), feeds degenerate keys to the rank check so that a
> check accepting everything cannot make the others pass.
> 
> rss_key_alias_test() covers the other half of what the generator promises,
> that no two input bits read the same 32-bit key window and are therefore
> indistinguishable to the hash. It sorts the windows instead of comparing
> them pairwise, so unlike netdev_rss_key_init() it looks at every distance
> rather than at the multiples of 16 alone.
> 
> The field table includes a PSP over UDP over IPv6 layout, whose inner TCP
> ports sit far past the plain 4-tuple, because that is the case the offsets
> of the standard layouts do not cover.
> 
> Commenting out the fixup makes three of the five cases fail and leaves the
> control passing. Keeping the fixup but skipping the redraw fails
> rss_key_alias_test alone.

Is this AI generated or do you think there's some genuine value here?
I don't want kunits which can be trivially re-generated during
development to be merged. But perhaps there's some genuine value in
this one?

  reply	other threads:[~2026-09-21 20:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21 18:37 [PATCH net-next 0/5] net: ethtool: make netdev_rss_key_fill() spread flows over all queues Eric Dumazet
2026-09-21 18:37 ` [PATCH net-next 1/5] net: synchronize proc_do_rss_key() with netdev_rss_key_fill() Eric Dumazet
2026-09-21 19:51   ` Jakub Kicinski
2026-09-21 19:53     ` Jakub Kicinski
2026-09-21 20:03     ` Eric Dumazet
2026-09-21 18:37 ` [PATCH net-next 2/5] net: ethtool: generate RSS keys that spread flows over all queues Eric Dumazet
2026-09-21 19:59   ` Jakub Kicinski
2026-09-21 18:37 ` [PATCH net-next 3/5] net: ethtool: add KUnit tests for the generated RSS key Eric Dumazet
2026-09-21 20:03   ` Jakub Kicinski [this message]
2026-09-21 20:10     ` Eric Dumazet
2026-09-21 20:35       ` Eric Dumazet
2026-09-21 18:37 ` [PATCH net-next 4/5] selftests: net: check the quality of the host " Eric Dumazet
2026-09-21 18:37 ` [PATCH net-next 5/5] selftests: drivers: net: check the RSS key a device uses Eric Dumazet
2026-09-21 20:09   ` Jakub Kicinski
2026-09-21 20:47     ` Eric Dumazet

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=20260921130337.57d93c2f@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=horms@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemb@google.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.