From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: Shahaf Shuler <shahafs@mellanox.com>
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 1/2] net/mlx4: fix inadequate default in RSS converter
Date: Mon, 21 May 2018 17:50:09 +0200 [thread overview]
Message-ID: <20180521154829.6297-1-adrien.mazarguil@6wind.com> (raw)
In-Reply-To: <20180515154853.6361-1-adrien.mazarguil@6wind.com>
Below commit documents 0 as a value standing for a default set of RSS hash
types, however the mlx4 PMD doesn't interpret it correctly and still uses
its own internal special value for that (-1).
Also, its function prototype was not updated.
Fixes: ac8d22de2394 ("ethdev: flatten RSS configuration in flow API")
Fixes: 1d173da83ef2 ("net/mlx4: fix default RSS hash fields")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
--
This is a rework of "net/mlx4: fix useless default in RSS converter" [1].
Not a candidate for stable anymore since DPDK 18.02 does not include the
flow API RSS rework.
[1] http://dpdk.org/ml/archives/dev/2018-May/100285.html
---
drivers/net/mlx4/mlx4_flow.c | 6 +++---
drivers/net/mlx4/mlx4_flow.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c
index 202779f7d..ebc9eeb8b 100644
--- a/drivers/net/mlx4/mlx4_flow.c
+++ b/drivers/net/mlx4/mlx4_flow.c
@@ -114,7 +114,7 @@ struct mlx4_drop {
* Convert DPDK RSS hash types to their Verbs equivalent.
*
* This function returns the supported (default) set when @p types has
- * special value (uint64_t)-1.
+ * special value 0.
*
* @param priv
* Pointer to private structure.
@@ -160,7 +160,7 @@ mlx4_conv_rss_types(struct priv *priv, uint64_t types)
uint64_t conv = 0;
unsigned int i;
- if (types == (uint64_t)-1)
+ if (!types)
return priv->hw_rss_sup;
for (i = 0; i != RTE_DIM(in); ++i)
if (types & in[i]) {
@@ -1384,7 +1384,7 @@ mlx4_flow_internal(struct priv *priv, struct rte_flow_error *error)
struct rte_flow_action_rss action_rss = {
.func = RTE_ETH_HASH_FUNCTION_DEFAULT,
.level = 0,
- .types = -1,
+ .types = 0,
.key_len = MLX4_RSS_HASH_KEY_SIZE,
.queue_num = queues,
.key = mlx4_rss_hash_key_default,
diff --git a/drivers/net/mlx4/mlx4_flow.h b/drivers/net/mlx4/mlx4_flow.h
index d1f1611eb..2e82903bd 100644
--- a/drivers/net/mlx4/mlx4_flow.h
+++ b/drivers/net/mlx4/mlx4_flow.h
@@ -48,7 +48,7 @@ struct rte_flow {
/* mlx4_flow.c */
-uint64_t mlx4_conv_rss_types(struct priv *priv, uint64_t rss_hf);
+uint64_t mlx4_conv_rss_types(struct priv *priv, uint64_t types);
uint64_t mlx4_ibv_to_rss_types(uint64_t ibv_rss_types);
int mlx4_flow_sync(struct priv *priv, struct rte_flow_error *error);
void mlx4_flow_clean(struct priv *priv);
--
2.11.0
next prev parent reply other threads:[~2018-05-21 15:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-15 15:51 [dpdk-dev] [PATCH " Adrien Mazarguil
2018-05-15 15:51 ` [dpdk-dev] [PATCH 2/2] net/mlx4: refactor RSS conversion functions Adrien Mazarguil
2018-05-17 17:46 ` Ophir Munk
2018-05-18 9:49 ` Adrien Mazarguil
2018-05-21 10:59 ` Shahaf Shuler
2018-05-21 12:23 ` Adrien Mazarguil
2018-05-21 15:50 ` Adrien Mazarguil [this message]
2018-05-21 15:50 ` [dpdk-dev] [PATCH v2 " Adrien Mazarguil
2018-05-22 9:41 ` Ferruh Yigit
2018-05-22 9:58 ` Adrien Mazarguil
2018-05-22 11:26 ` [dpdk-dev] [PATCH] net/mlx4: fix undefined behavior of RSS conversion Adrien Mazarguil
2018-05-22 13:01 ` Ferruh Yigit
2018-05-22 13:21 ` Adrien Mazarguil
2018-05-22 7:28 ` [dpdk-dev] [PATCH v2 1/2] net/mlx4: fix inadequate default in RSS converter Shahaf Shuler
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=20180521154829.6297-1-adrien.mazarguil@6wind.com \
--to=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=shahafs@mellanox.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).