From: Petr Machata <petrm@nvidia•com>
To: Jakub Kicinski <kuba@kernel•org>
Cc: <davem@davemloft•net>, <netdev@vger•kernel.org>,
<edumazet@google•com>, <pabeni@redhat•com>,
<michael.chan@broadcom•com>, <shuah@kernel•org>,
<ecree.xilinx@gmail•com>, <przemyslaw.kitszel@intel•com>,
<ahmed.zaki@intel•com>, <andrew@lunn•ch>, <willemb@google•com>,
<pavan.chebbi@broadcom•com>, <petrm@nvidia•com>
Subject: Re: [PATCH net 5/5] selftests: drv-net: rss_ctx: check for all-zero keys
Date: Fri, 26 Jul 2024 13:25:06 +0200 [thread overview]
Message-ID: <87ttgc75ol.fsf@nvidia.com> (raw)
In-Reply-To: <20240725222353.2993687-6-kuba@kernel.org>
Jakub Kicinski <kuba@kernel•org> writes:
> We had a handful of bugs relating to key being either all 0
> or just reported incorrectly as all 0. Check for this in
> the tests.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel•org>
Reviewed-by: Petr Machata <petrm@nvidia•com>
> +def _rss_key_check(cfg, data=None, context=0):
> + if data is None:
> + data = get_rss(cfg, context=context)
> + if 'rss-hash-key' not in data:
> + return
> + non_zero = [x for x in data['rss-hash-key'] if x != 0]
> + ksft_eq(bool(non_zero), True, comment=f"RSS key is all zero {data['rss-hash-key']}")
If there's a v2, consider changing this to len(non_zero) > 0, or
non_zero != [].
next prev parent reply other threads:[~2024-07-26 11:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-25 22:23 [PATCH net 0/5] ethtool: more RSS fixes Jakub Kicinski
2024-07-25 22:23 ` [PATCH net 1/5] eth: bnxt: reject unsupported hash functions Jakub Kicinski
2024-07-26 6:16 ` Pavan Chebbi
2024-07-25 22:23 ` [PATCH net 2/5] eth: bnxt: populate defaults in the RSS context struct Jakub Kicinski
2024-07-26 6:15 ` Pavan Chebbi
2024-07-25 22:23 ` [PATCH net 3/5] ethtool: fix setting key and resetting indir at once Jakub Kicinski
2024-07-25 22:23 ` [PATCH net 4/5] ethtool: fix the state of additional contexts with old API Jakub Kicinski
2024-07-26 5:06 ` Edward Cree
2024-07-25 22:23 ` [PATCH net 5/5] selftests: drv-net: rss_ctx: check for all-zero keys Jakub Kicinski
2024-07-26 11:25 ` Petr Machata [this message]
2024-07-29 10:08 ` [PATCH net 0/5] ethtool: more RSS fixes 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=87ttgc75ol.fsf@nvidia.com \
--to=petrm@nvidia$(echo .)com \
--cc=ahmed.zaki@intel$(echo .)com \
--cc=andrew@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=ecree.xilinx@gmail$(echo .)com \
--cc=edumazet@google$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=michael.chan@broadcom$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=pavan.chebbi@broadcom$(echo .)com \
--cc=przemyslaw.kitszel@intel$(echo .)com \
--cc=shuah@kernel$(echo .)org \
--cc=willemb@google$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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