From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: Shahaf Shuler <shahafs@mellanox.com>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>,
dev@dpdk.org, stable@dpdk.org,
Neil Horman <nhorman@tuxdriver.com>
Subject: [dpdk-dev] [PATCH v2 3/5] net/mlx4: use function to get default RSS fields
Date: Thu, 23 Nov 2017 18:38:00 +0100 [thread overview]
Message-ID: <20171123172640.28827-4-adrien.mazarguil@6wind.com> (raw)
In-Reply-To: <20171123172640.28827-1-adrien.mazarguil@6wind.com>
Supported RSS hash fields are listed in function mlx4_conv_rss_hf() and
duplicated in mlx4_flow_prepare(); the latter are used when RSS is
requested without specifying any parameters.
This commit standardizes on mlx4_conv_rss_hf().
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
---
drivers/net/mlx4/mlx4_flow.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c
index 8b87b2989..7397dde26 100644
--- a/drivers/net/mlx4/mlx4_flow.c
+++ b/drivers/net/mlx4/mlx4_flow.c
@@ -105,6 +105,9 @@ struct mlx4_drop {
/**
* Convert DPDK RSS hash fields to their Verbs equivalent.
*
+ * This function returns the supported (default) set when @p rss_hf has
+ * special value (uint64_t)-1.
+ *
* @param rss_hf
* Hash fields in DPDK format (see struct rte_eth_rss_conf).
*
@@ -154,6 +157,8 @@ mlx4_conv_rss_hf(uint64_t rss_hf)
seen |= rss_hf & in[i];
conv |= out[i];
}
+ if (rss_hf == (uint64_t)-1)
+ return conv;
if (!(rss_hf & ~seen))
return conv;
rte_errno = ENOTSUP;
@@ -759,10 +764,7 @@ mlx4_flow_prepare(struct priv *priv,
&(struct rte_eth_rss_conf){
.rss_key = mlx4_rss_hash_key_default,
.rss_key_len = MLX4_RSS_HASH_KEY_SIZE,
- .rss_hf = (ETH_RSS_IPV4 |
- ETH_RSS_NONFRAG_IPV4_TCP |
- ETH_RSS_IPV6 |
- ETH_RSS_NONFRAG_IPV6_TCP),
+ .rss_hf = -1,
};
/* Sanity checks. */
for (i = 0; i < rss->num; ++i)
--
2.11.0
next prev parent reply other threads:[~2017-11-23 17:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-21 14:27 [dpdk-dev] [PATCH v1 0/5] net/mlx4: restore inner VXLAN & UDP RSS support Adrien Mazarguil
2017-11-21 14:27 ` [dpdk-dev] [PATCH v1 1/5] net/mlx4: fix unnecessary include Adrien Mazarguil
2017-11-21 14:27 ` [dpdk-dev] [PATCH v1 2/5] net/mlx4: fix documentation in private structure Adrien Mazarguil
2017-11-21 14:27 ` [dpdk-dev] [PATCH v1 3/5] net/mlx4: use function to get default RSS fields Adrien Mazarguil
2017-11-21 14:27 ` [dpdk-dev] [PATCH v1 4/5] net/mlx4: restore UDP RSS by probing capabilities Adrien Mazarguil
2017-11-21 14:27 ` [dpdk-dev] [PATCH v1 5/5] net/mlx4: restore inner VXLAN RSS support Adrien Mazarguil
2017-11-21 14:41 ` [dpdk-dev] [PATCH v1 0/5] net/mlx4: restore inner VXLAN & UDP " Neil Horman
2017-11-23 17:37 ` [dpdk-dev] [PATCH v2 " Adrien Mazarguil
2017-11-23 17:37 ` [dpdk-dev] [PATCH v2 1/5] net/mlx4: fix unnecessary include Adrien Mazarguil
2017-11-23 17:37 ` [dpdk-dev] [PATCH v2 2/5] net/mlx4: fix documentation in private structure Adrien Mazarguil
2017-11-23 17:38 ` Adrien Mazarguil [this message]
2017-11-23 17:38 ` [dpdk-dev] [PATCH v2 4/5] net/mlx4: restore UDP RSS by probing capabilities Adrien Mazarguil
2017-11-23 17:38 ` [dpdk-dev] [PATCH v2 5/5] net/mlx4: restore inner VXLAN RSS support Adrien Mazarguil
2017-12-04 12:07 ` [dpdk-dev] [PATCH v2 0/5] net/mlx4: restore inner VXLAN & UDP " 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=20171123172640.28827-4-adrien.mazarguil@6wind.com \
--to=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=nhorman@tuxdriver.com \
--cc=shahafs@mellanox.com \
--cc=stable@dpdk.org \
/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).