From: "Xueming(Steven) Li" <xuemingl@nvidia.com>
To: Dariusz Sosnowski <dsosnowski@nvidia.com>,
Matan Azrad <matan@nvidia.com>,
Slava Ovsiienko <viacheslavo@nvidia.com>
Cc: "stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [PATCH 20.11] net/mlx5: fix RSS hash types adjustment
Date: Tue, 21 Jun 2022 07:34:15 +0000 [thread overview]
Message-ID: <DM4PR12MB5373315DDBDEB4FDABBAAE7AA1B39@DM4PR12MB5373.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20220620103728.1219189-1-dsosnowski@nvidia.com>
Applied, thanks!
> -----Original Message-----
> From: Dariusz Sosnowski <dsosnowski@nvidia.com>
> Sent: Monday, June 20, 2022 6:37 PM
> To: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>
> Cc: stable@dpdk.org
> Subject: [PATCH 20.11] net/mlx5: fix RSS hash types adjustment
>
> [ upstream commit d2fa2632a4a17b491f9a15834d9e13c6a6e5a1b9 ]
>
> When an indirect action was created with an RSS action configured to hash on both source and destination L3 addresses (or L4 ports), it
> caused shared hrxq to be configured to hash only on destination address (or port).
>
> This patch fixes this behavior by refining RSS types specified in configuration before calculating hash types used for hrxq. Refining RSS types
> removes *_SRC_ONLY and *_DST_ONLY flags if they are both set.
>
> Fixes: 212d17b6a650 ("net/mlx5: fix missing shared RSS hash types")
> Cc: stable@dpdk.org
>
> Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> ---
> drivers/net/mlx5/mlx5_flow_dv.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index aa22e85f6a..c1505b69e6 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -11567,8 +11567,8 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev,
> * MLX5_RSS_HASH_IPV4_DST_ONLY are mutually exclusive so they can share
> * same slot in mlx5_rss_hash_fields.
> *
> - * @param[in] rss
> - * Pointer to the shared action RSS conf.
> + * @param[in] orig_rss_types
> + * RSS type as provided in shared RSS action.
> * @param[in, out] hash_field
> * hash_field variable needed to be adjusted.
> *
> @@ -11576,10 +11576,10 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev,
> * void
> */
> static void
> -__flow_dv_action_rss_l34_hash_adjust(struct mlx5_shared_action_rss *rss,
> +__flow_dv_action_rss_l34_hash_adjust(uint64_t orig_rss_types,
> uint64_t *hash_field)
> {
> - uint64_t rss_types = rss->origin.types;
> + uint64_t rss_types = rte_eth_rss_hf_refine(orig_rss_types);
>
> switch (*hash_field & ~IBV_RX_HASH_INNER) {
> case MLX5_RSS_HASH_IPV4:
> @@ -11680,7 +11680,8 @@ __flow_dv_action_rss_setup(struct rte_eth_dev *dev,
> uint64_t hash_fields = mlx5_rss_hash_fields[i];
> int tunnel = 0;
>
> - __flow_dv_action_rss_l34_hash_adjust(shared_rss, &hash_fields);
> + __flow_dv_action_rss_l34_hash_adjust(shared_rss->origin.types,
> + &hash_fields);
> if (shared_rss->origin.level > 1) {
> hash_fields |= IBV_RX_HASH_INNER;
> tunnel = 1;
> --
> 2.25.1
prev parent reply other threads:[~2022-06-21 7:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-20 10:37 Dariusz Sosnowski
2022-06-21 7:34 ` Xueming(Steven) Li [this message]
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=DM4PR12MB5373315DDBDEB4FDABBAAE7AA1B39@DM4PR12MB5373.namprd12.prod.outlook.com \
--to=xuemingl@nvidia.com \
--cc=dsosnowski@nvidia.com \
--cc=matan@nvidia.com \
--cc=stable@dpdk.org \
--cc=viacheslavo@nvidia.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).