From: Vladimir Medvedkin <medvedkinv@gmail.com>
To: Michal Krawczyk <mk@semihalf.com>
Cc: dev@dpdk.org, ndagan@amazon.com, shaibran@amazon.com,
upstream@semihalf.com, Shay Agroskin <shayagr@amazon.com>,
Amit Bernstein <amitbern@amazon.com>
Subject: Re: [dpdk-dev] [PATCH 5/6] net/ena: rework RSS configuration
Date: Wed, 14 Jul 2021 11:04:27 +0300 [thread overview]
Message-ID: <CANDrEHkyU7GxzrFVhBmh-s2wvJF=AwtAVzsK8QrdaQAq4JJfKg@mail.gmail.com> (raw)
In-Reply-To: <20210713154118.32111-6-mk@semihalf.com>
Hi Michal,
вт, 13 июл. 2021 г. в 18:42, Michal Krawczyk <mk@semihalf.com>:
> Allow user to specify his own hash key and hash ctrl if the
> device is supporting that. HW interprets the key in reverse byte order,
> so the PMD reorders the key before passing it to the ena_com layer.
>
> Default key is being set in random matter each time the device is being
> initialized.
>
> Moreover, make minor adjustments for reta size setting in terms
> of returning error values.
>
> RSS code was moved to ena_rss.c file to improve readability.
>
> Signed-off-by: Michal Krawczyk <mk@semihalf.com>
> Reviewed-by: Shai Brandes <shaibran@amazon.com>
> Reviewed-by: Shay Agroskin <shayagr@amazon.com>
> Reviewed-by: Amit Bernstein <amitbern@amazon.com>
> ---
> doc/guides/nics/features/ena.ini | 1 +
> doc/guides/rel_notes/release_21_08.rst | 1 +
> drivers/net/ena/ena_ethdev.c | 230 ++--------
> drivers/net/ena/ena_ethdev.h | 34 ++
> drivers/net/ena/ena_rss.c | 592 +++++++++++++++++++++++++
> drivers/net/ena/meson.build | 1 +
> 6 files changed, 664 insertions(+), 195 deletions(-)
> create mode 100644 drivers/net/ena/ena_rss.c
>
<snip>
+
> +/* ENA HW interprets the RSS key in reverse order and as in a big endian
> + * notation (uint32_t values instead of bytes). Because of that, the key
> must be
> + * processed upon interaction with ena_com layer.
> + */
> +static void ena_reorder_rss_hash_key(uint8_t *reordered_key,
> + uint8_t *key,
> + size_t key_size)
> +{
> + size_t i, rev_i;
> +
> + for (i = 0, rev_i = key_size - 1; i < key_size; ++i, --rev_i)
> + reordered_key[i] = key[rev_i];
> +}
> +
>
>
If I understand the description correctly, you need to byteswap every
4-byte chunk of the key, but instead here it swaps all ENA_HASH_KEY_SIZE
bytes (i.e. key[0] = key[39] and so on). Consider doing something like
rte_convert_rss_key() from hash/rte_thash.h.
--
> 2.25.1
>
>
--
Regards,
Vladimir
next prev parent reply other threads:[~2021-07-14 8:04 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-13 15:41 [dpdk-dev] [PATCH 0/6] net/ena: v2.4.0 driver update Michal Krawczyk
2021-07-13 15:41 ` [dpdk-dev] [PATCH 1/6] net/ena: adjust driver logs Michal Krawczyk
2021-07-13 15:41 ` [dpdk-dev] [PATCH 2/6] net/ena: make use of the IO debug build option Michal Krawczyk
2021-07-13 15:41 ` [dpdk-dev] [PATCH 3/6] net/ena: trigger reset when Tx prepare fails Michal Krawczyk
2021-07-13 15:41 ` [dpdk-dev] [PATCH 4/6] net/ena: add support for Rx interrupts Michal Krawczyk
2021-07-13 15:41 ` [dpdk-dev] [PATCH 5/6] net/ena: rework RSS configuration Michal Krawczyk
2021-07-14 8:04 ` Vladimir Medvedkin [this message]
2021-07-14 8:20 ` Michał Krawczyk
2021-07-14 11:43 ` Vladimir Medvedkin
2021-07-14 12:07 ` Michał Krawczyk
2021-07-13 15:41 ` [dpdk-dev] [PATCH 6/6] net/ena: update version to v2.4.0 Michal Krawczyk
2021-07-14 10:34 ` [dpdk-dev] [PATCH v2 0/6] net/ena: v2.4.0 driver update Michal Krawczyk
2021-07-14 10:34 ` [dpdk-dev] [PATCH v2 1/6] net/ena: adjust driver logs Michal Krawczyk
2021-07-14 10:34 ` [dpdk-dev] [PATCH v2 2/6] net/ena: make use of the IO debug build option Michal Krawczyk
2021-07-14 10:34 ` [dpdk-dev] [PATCH v2 3/6] net/ena: trigger reset when Tx prepare fails Michal Krawczyk
2021-07-14 10:34 ` [dpdk-dev] [PATCH v2 4/6] net/ena: add support for Rx interrupts Michal Krawczyk
2021-07-14 10:34 ` [dpdk-dev] [PATCH v2 5/6] net/ena: rework RSS configuration Michal Krawczyk
2021-07-14 10:34 ` [dpdk-dev] [PATCH v2 6/6] net/ena: update version to v2.4.0 Michal Krawczyk
2021-07-14 10:43 ` [dpdk-dev] [PATCH v3 0/6] net/ena: v2.4.0 driver update Michal Krawczyk
2021-07-14 10:43 ` [dpdk-dev] [PATCH v3 1/6] net/ena: adjust driver logs Michal Krawczyk
2021-07-14 10:43 ` [dpdk-dev] [PATCH v3 2/6] net/ena: make use of the IO debug build option Michal Krawczyk
2021-07-14 10:43 ` [dpdk-dev] [PATCH v3 3/6] net/ena: trigger reset when Tx prepare fails Michal Krawczyk
2021-07-14 10:43 ` [dpdk-dev] [PATCH v3 4/6] net/ena: add support for Rx interrupts Michal Krawczyk
2021-07-14 10:43 ` [dpdk-dev] [PATCH v3 5/6] net/ena: rework RSS configuration Michal Krawczyk
2021-07-23 9:23 ` Thomas Monjalon
2021-07-23 9:39 ` Michał Krawczyk
2021-07-23 9:44 ` Thomas Monjalon
2021-07-23 9:49 ` Michał Krawczyk
2021-07-23 11:52 ` Thomas Monjalon
2021-07-23 13:19 ` Thomas Monjalon
2021-07-14 10:43 ` [dpdk-dev] [PATCH v3 6/6] net/ena: update version to v2.4.0 Michal Krawczyk
2021-07-23 10:24 ` [dpdk-dev] [PATCH v4 0/6] net/ena: v2.4.0 driver update Michal Krawczyk
2021-07-23 10:24 ` [dpdk-dev] [PATCH v4 1/6] net/ena: adjust driver logs Michal Krawczyk
2021-07-23 10:24 ` [dpdk-dev] [PATCH v4 2/6] net/ena: make use of the IO debug build option Michal Krawczyk
2021-07-23 10:24 ` [dpdk-dev] [PATCH v4 3/6] net/ena: trigger reset when Tx prepare fails Michal Krawczyk
2021-07-23 10:24 ` [dpdk-dev] [PATCH v4 4/6] net/ena: add support for Rx interrupts Michal Krawczyk
2021-07-23 10:24 ` [dpdk-dev] [PATCH v4 5/6] net/ena: rework RSS configuration Michal Krawczyk
2021-07-23 10:24 ` [dpdk-dev] [PATCH v4 6/6] net/ena: update version to v2.4.0 Michal Krawczyk
2021-07-23 15:46 ` [dpdk-dev] [PATCH v4 0/6] net/ena: v2.4.0 driver update Thomas Monjalon
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='CANDrEHkyU7GxzrFVhBmh-s2wvJF=AwtAVzsK8QrdaQAq4JJfKg@mail.gmail.com' \
--to=medvedkinv@gmail.com \
--cc=amitbern@amazon.com \
--cc=dev@dpdk.org \
--cc=mk@semihalf.com \
--cc=ndagan@amazon.com \
--cc=shaibran@amazon.com \
--cc=shayagr@amazon.com \
--cc=upstream@semihalf.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).