* [dpdk-dev] [PATCH 0/2] add symmetric toeplitz hash support
@ 2019-07-25 4:57 simei
2019-07-25 4:57 ` [dpdk-dev] [PATCH 1/2] ethdev: " simei
` (3 more replies)
0 siblings, 4 replies; 24+ messages in thread
From: simei @ 2019-07-25 4:57 UTC (permalink / raw)
To: qi.z.zhang, jingjing.wu, adrien.mazarguil; +Cc: dev, simei.su
From: Simei Su <simei.su@intel.com>
[PATCH 1/2] ethdev: add new hash function "Symmetric Toeplitz" supported by hardware.
[PATCH 2/2] app/testpmd: add command line support for symmetric toeplitz hash configuration.
Simei Su (2):
ethdev: add symmetric toeplitz hash support
app/testpmd: add symmetric toeplitz hash support
app/test-pmd/cmdline.c | 12 +++++++++---
app/test-pmd/cmdline_flow.c | 12 +++++++++++-
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
lib/librte_ethdev/rte_flow.h | 1 +
4 files changed, 22 insertions(+), 5 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz hash support
2019-07-25 4:57 [dpdk-dev] [PATCH 0/2] add symmetric toeplitz hash support simei
@ 2019-07-25 4:57 ` simei
2019-07-31 12:08 ` Andrew Rybchenko
2019-07-25 4:57 ` [dpdk-dev] [PATCH 2/2] app/testpmd: " simei
` (2 subsequent siblings)
3 siblings, 1 reply; 24+ messages in thread
From: simei @ 2019-07-25 4:57 UTC (permalink / raw)
To: qi.z.zhang, jingjing.wu, adrien.mazarguil; +Cc: dev, simei.su
From: Simei Su <simei.su@intel.com>
Currently, there are DEFAULT,TOEPLITZ and SIMPLE_XOR hash funtion.
To support symmetric hash by rte_flow RSS action, this patch adds
new hash function "Symmetric Toeplitz" which is supported by some hardware.
Signed-off-by: Simei Su <simei.su@intel.com>
---
lib/librte_ethdev/rte_flow.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
index f3a8fb1..2a0e6d5 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -1744,6 +1744,7 @@ enum rte_eth_hash_function {
RTE_ETH_HASH_FUNCTION_DEFAULT = 0,
RTE_ETH_HASH_FUNCTION_TOEPLITZ, /**< Toeplitz */
RTE_ETH_HASH_FUNCTION_SIMPLE_XOR, /**< Simple XOR */
+ RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ, /**< Symmetric Toeplitz */
RTE_ETH_HASH_FUNCTION_MAX,
};
--
1.8.3.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH 2/2] app/testpmd: add symmetric toeplitz hash support
2019-07-25 4:57 [dpdk-dev] [PATCH 0/2] add symmetric toeplitz hash support simei
2019-07-25 4:57 ` [dpdk-dev] [PATCH 1/2] ethdev: " simei
@ 2019-07-25 4:57 ` simei
2019-07-26 0:55 ` [dpdk-dev] [PATCH v2 0/2] " simei
2019-09-23 23:11 ` [dpdk-dev] [PATCH " Zhang, Qi Z
3 siblings, 0 replies; 24+ messages in thread
From: simei @ 2019-07-25 4:57 UTC (permalink / raw)
To: qi.z.zhang, jingjing.wu, adrien.mazarguil; +Cc: dev, simei.su
From: Simei Su <simei.su@intel.com>
This patch adds command line support for Symmetric Toeplitz
hash configuration.
Signed-off-by: Simei Su <simei.su@intel.com>
---
app/test-pmd/cmdline.c | 12 +++++++++---
app/test-pmd/cmdline_flow.c | 12 +++++++++++-
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
3 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index e7c4bee..29babe1 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1078,7 +1078,7 @@ static void cmd_help_long_parsed(void *parsed_result,
"get_hash_global_config (port_id)\n"
" Get the global configurations of hash filters.\n\n"
- "set_hash_global_config (port_id) (toeplitz|simple_xor|default)"
+ "set_hash_global_config (port_id) (toeplitz|simple_xor|symmetric_toeplitz|default)"
" (ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|ipv6|"
"ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|l2_payload)"
" (enable|disable)\n"
@@ -12131,6 +12131,9 @@ struct cmd_get_hash_global_config_result {
case RTE_ETH_HASH_FUNCTION_SIMPLE_XOR:
printf("Hash function is Simple XOR\n");
break;
+ case RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ:
+ printf("Hash function is Symmetric Toeplitz\n");
+ break;
default:
printf("Unknown hash function\n");
break;
@@ -12204,6 +12207,9 @@ struct cmd_set_hash_global_config_result {
else if (!strcmp(res->hash_func, "simple_xor"))
info.info.global_conf.hash_func =
RTE_ETH_HASH_FUNCTION_SIMPLE_XOR;
+ else if (!strcmp(res->hash_func, "symmetric_toeplitz"))
+ info.info.global_conf.hash_func =
+ RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ;
else if (!strcmp(res->hash_func, "default"))
info.info.global_conf.hash_func =
RTE_ETH_HASH_FUNCTION_DEFAULT;
@@ -12233,7 +12239,7 @@ struct cmd_set_hash_global_config_result {
port_id, UINT16);
cmdline_parse_token_string_t cmd_set_hash_global_config_hash_func =
TOKEN_STRING_INITIALIZER(struct cmd_set_hash_global_config_result,
- hash_func, "toeplitz#simple_xor#default");
+ hash_func, "toeplitz#simple_xor#symmetric_toeplitz#default");
cmdline_parse_token_string_t cmd_set_hash_global_config_flow_type =
TOKEN_STRING_INITIALIZER(struct cmd_set_hash_global_config_result,
flow_type,
@@ -12247,7 +12253,7 @@ struct cmd_set_hash_global_config_result {
.f = cmd_set_hash_global_config_parsed,
.data = NULL,
.help_str = "set_hash_global_config <port_id> "
- "toeplitz|simple_xor|default "
+ "toeplitz|simple_xor|symmetric_toeplitz|default "
"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|"
"ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|"
"l2_payload enable|disable",
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 201bd9d..9f1dc46 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -205,6 +205,7 @@ enum index {
ACTION_RSS_FUNC_DEFAULT,
ACTION_RSS_FUNC_TOEPLITZ,
ACTION_RSS_FUNC_SIMPLE_XOR,
+ ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ,
ACTION_RSS_TYPES,
ACTION_RSS_TYPE,
ACTION_RSS_KEY,
@@ -2276,7 +2277,8 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
.next = NEXT(action_rss,
NEXT_ENTRY(ACTION_RSS_FUNC_DEFAULT,
ACTION_RSS_FUNC_TOEPLITZ,
- ACTION_RSS_FUNC_SIMPLE_XOR)),
+ ACTION_RSS_FUNC_SIMPLE_XOR,
+ ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ)),
},
[ACTION_RSS_FUNC_DEFAULT] = {
.name = "default",
@@ -2293,6 +2295,11 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
.help = "simple XOR hash function",
.call = parse_vc_action_rss_func,
},
+ [ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ] = {
+ .name = "symmetric_toeplitz",
+ .help = "Symmetric Toeplitz hash function",
+ .call = parse_vc_action_rss_func,
+ },
[ACTION_RSS_LEVEL] = {
.name = "level",
.help = "encapsulation level for \"types\"",
@@ -3312,6 +3319,9 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
case ACTION_RSS_FUNC_SIMPLE_XOR:
func = RTE_ETH_HASH_FUNCTION_SIMPLE_XOR;
break;
+ case ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ:
+ func = RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ;
+ break;
default:
return -1;
}
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index cb83a3c..c608ada 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -3383,7 +3383,7 @@ set_hash_global_config
Set the global configurations of hash filters::
- set_hash_global_config (port_id) (toeplitz|simple_xor|default) \
+ set_hash_global_config (port_id) (toeplitz|simple_xor|symmetric_toeplitz|default) \
(ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|ipv6|ipv6-frag| \
ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|l2_payload|<flow_id>) \
(enable|disable)
--
1.8.3.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v2 0/2] add symmetric toeplitz hash support
2019-07-25 4:57 [dpdk-dev] [PATCH 0/2] add symmetric toeplitz hash support simei
2019-07-25 4:57 ` [dpdk-dev] [PATCH 1/2] ethdev: " simei
2019-07-25 4:57 ` [dpdk-dev] [PATCH 2/2] app/testpmd: " simei
@ 2019-07-26 0:55 ` simei
2019-07-26 0:55 ` [dpdk-dev] [PATCH v2 1/2] ethdev: " simei
` (3 more replies)
2019-09-23 23:11 ` [dpdk-dev] [PATCH " Zhang, Qi Z
3 siblings, 4 replies; 24+ messages in thread
From: simei @ 2019-07-26 0:55 UTC (permalink / raw)
To: qi.z.zhang, jingjing.wu, adrien.mazarguil; +Cc: dev, simei.su
From: Simei Su <simei.su@intel.com>
This v2 patch rebase to 19.08-rc2.
[PATCH v2 1/2] ethdev: add new hash function "Symmetric Toeplitz" supported by hardware.
[PATCH v2 2/2] app/testpmd: add command line support for symmetric toeplitz hash configuration.
Simei Su (2):
ethdev: add symmetric toeplitz hash support
app/testpmd: add symmetric toeplitz hash support
app/test-pmd/cmdline.c | 12 +++++++++---
app/test-pmd/cmdline_flow.c | 12 +++++++++++-
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
lib/librte_ethdev/rte_flow.h | 1 +
4 files changed, 22 insertions(+), 5 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v2 1/2] ethdev: add symmetric toeplitz hash support
2019-07-26 0:55 ` [dpdk-dev] [PATCH v2 0/2] " simei
@ 2019-07-26 0:55 ` simei
2019-09-28 18:32 ` Ori Kam
2019-07-26 0:55 ` [dpdk-dev] [PATCH v2 2/2] app/testpmd: " simei
` (2 subsequent siblings)
3 siblings, 1 reply; 24+ messages in thread
From: simei @ 2019-07-26 0:55 UTC (permalink / raw)
To: qi.z.zhang, jingjing.wu, adrien.mazarguil; +Cc: dev, simei.su
From: Simei Su <simei.su@intel.com>
Currently, there are DEFAULT,TOEPLITZ and SIMPLE_XOR hash function.
To support symmetric hash by rte_flow RSS action, this patch adds
new hash function "Symmetric Toeplitz" which is supported by some hardware.
Signed-off-by: Simei Su <simei.su@intel.com>
---
lib/librte_ethdev/rte_flow.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
index b66bf14..77a0c52 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -1814,6 +1814,7 @@ enum rte_eth_hash_function {
RTE_ETH_HASH_FUNCTION_DEFAULT = 0,
RTE_ETH_HASH_FUNCTION_TOEPLITZ, /**< Toeplitz */
RTE_ETH_HASH_FUNCTION_SIMPLE_XOR, /**< Simple XOR */
+ RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ, /**< Symmetric Toeplitz */
RTE_ETH_HASH_FUNCTION_MAX,
};
--
1.8.3.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v2 2/2] app/testpmd: add symmetric toeplitz hash support
2019-07-26 0:55 ` [dpdk-dev] [PATCH v2 0/2] " simei
2019-07-26 0:55 ` [dpdk-dev] [PATCH v2 1/2] ethdev: " simei
@ 2019-07-26 0:55 ` simei
2019-09-28 18:39 ` Ori Kam
2019-09-24 5:30 ` [dpdk-dev] [PATCH v2 0/2] " Zhang, Qi Z
2019-10-01 9:22 ` [dpdk-dev] [PATCH v3 " Simei Su
3 siblings, 1 reply; 24+ messages in thread
From: simei @ 2019-07-26 0:55 UTC (permalink / raw)
To: qi.z.zhang, jingjing.wu, adrien.mazarguil; +Cc: dev, simei.su
From: Simei Su <simei.su@intel.com>
This patch adds command line support for Symmetric Toeplitz
hash configuration.
Signed-off-by: Simei Su <simei.su@intel.com>
---
app/test-pmd/cmdline.c | 12 +++++++++---
app/test-pmd/cmdline_flow.c | 12 +++++++++++-
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
3 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index a28362d..60c159f 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1055,7 +1055,7 @@ static void cmd_help_long_parsed(void *parsed_result,
"get_hash_global_config (port_id)\n"
" Get the global configurations of hash filters.\n\n"
- "set_hash_global_config (port_id) (toeplitz|simple_xor|default)"
+ "set_hash_global_config (port_id) (toeplitz|simple_xor|symmetric_toeplitz|default)"
" (ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|ipv6|"
"ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|l2_payload)"
" (enable|disable)\n"
@@ -12258,6 +12258,9 @@ struct cmd_get_hash_global_config_result {
case RTE_ETH_HASH_FUNCTION_SIMPLE_XOR:
printf("Hash function is Simple XOR\n");
break;
+ case RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ:
+ printf("Hash function is Symmetric Toeplitz\n");
+ break;
default:
printf("Unknown hash function\n");
break;
@@ -12331,6 +12334,9 @@ struct cmd_set_hash_global_config_result {
else if (!strcmp(res->hash_func, "simple_xor"))
info.info.global_conf.hash_func =
RTE_ETH_HASH_FUNCTION_SIMPLE_XOR;
+ else if (!strcmp(res->hash_func, "symmetric_toeplitz"))
+ info.info.global_conf.hash_func =
+ RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ;
else if (!strcmp(res->hash_func, "default"))
info.info.global_conf.hash_func =
RTE_ETH_HASH_FUNCTION_DEFAULT;
@@ -12360,7 +12366,7 @@ struct cmd_set_hash_global_config_result {
port_id, UINT16);
cmdline_parse_token_string_t cmd_set_hash_global_config_hash_func =
TOKEN_STRING_INITIALIZER(struct cmd_set_hash_global_config_result,
- hash_func, "toeplitz#simple_xor#default");
+ hash_func, "toeplitz#simple_xor#symmetric_toeplitz#default");
cmdline_parse_token_string_t cmd_set_hash_global_config_flow_type =
TOKEN_STRING_INITIALIZER(struct cmd_set_hash_global_config_result,
flow_type,
@@ -12374,7 +12380,7 @@ struct cmd_set_hash_global_config_result {
.f = cmd_set_hash_global_config_parsed,
.data = NULL,
.help_str = "set_hash_global_config <port_id> "
- "toeplitz|simple_xor|default "
+ "toeplitz|simple_xor|symmetric_toeplitz|default "
"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|"
"ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|"
"l2_payload enable|disable",
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 4958713..4968df9 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -220,6 +220,7 @@ enum index {
ACTION_RSS_FUNC_DEFAULT,
ACTION_RSS_FUNC_TOEPLITZ,
ACTION_RSS_FUNC_SIMPLE_XOR,
+ ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ,
ACTION_RSS_TYPES,
ACTION_RSS_TYPE,
ACTION_RSS_KEY,
@@ -2457,7 +2458,8 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
.next = NEXT(action_rss,
NEXT_ENTRY(ACTION_RSS_FUNC_DEFAULT,
ACTION_RSS_FUNC_TOEPLITZ,
- ACTION_RSS_FUNC_SIMPLE_XOR)),
+ ACTION_RSS_FUNC_SIMPLE_XOR,
+ ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ)),
},
[ACTION_RSS_FUNC_DEFAULT] = {
.name = "default",
@@ -2474,6 +2476,11 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
.help = "simple XOR hash function",
.call = parse_vc_action_rss_func,
},
+ [ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ] = {
+ .name = "symmetric_toeplitz",
+ .help = "Symmetric Toeplitz hash function",
+ .call = parse_vc_action_rss_func,
+ },
[ACTION_RSS_LEVEL] = {
.name = "level",
.help = "encapsulation level for \"types\"",
@@ -3588,6 +3595,9 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
case ACTION_RSS_FUNC_SIMPLE_XOR:
func = RTE_ETH_HASH_FUNCTION_SIMPLE_XOR;
break;
+ case ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ:
+ func = RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ;
+ break;
default:
return -1;
}
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 313e070..6343638 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -3471,7 +3471,7 @@ set_hash_global_config
Set the global configurations of hash filters::
- set_hash_global_config (port_id) (toeplitz|simple_xor|default) \
+ set_hash_global_config (port_id) (toeplitz|simple_xor|symmetric_toeplitz|default) \
(ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|ipv6|ipv6-frag| \
ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|l2_payload|<flow_id>) \
(enable|disable)
--
1.8.3.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz hash support
2019-07-25 4:57 ` [dpdk-dev] [PATCH 1/2] ethdev: " simei
@ 2019-07-31 12:08 ` Andrew Rybchenko
2019-07-31 12:30 ` Adrien Mazarguil
0 siblings, 1 reply; 24+ messages in thread
From: Andrew Rybchenko @ 2019-07-31 12:08 UTC (permalink / raw)
To: simei, qi.z.zhang, jingjing.wu, adrien.mazarguil; +Cc: dev
On 7/25/19 7:57 AM, simei wrote:
> From: Simei Su <simei.su@intel.com>
>
> Currently, there are DEFAULT,TOEPLITZ and SIMPLE_XOR hash funtion.
> To support symmetric hash by rte_flow RSS action, this patch adds
> new hash function "Symmetric Toeplitz" which is supported by some hardware.
Isn't it a question of key to achieve symmetry?
I.e. hash algorithm (function) is still the same - Toeplitz, but
hash key makes the result symmetric (i.e. equal for flows in both
directions - swap transport ports and IPv4/6 addresses).
> Signed-off-by: Simei Su <simei.su@intel.com>
> ---
> lib/librte_ethdev/rte_flow.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
> index f3a8fb1..2a0e6d5 100644
> --- a/lib/librte_ethdev/rte_flow.h
> +++ b/lib/librte_ethdev/rte_flow.h
> @@ -1744,6 +1744,7 @@ enum rte_eth_hash_function {
> RTE_ETH_HASH_FUNCTION_DEFAULT = 0,
> RTE_ETH_HASH_FUNCTION_TOEPLITZ, /**< Toeplitz */
> RTE_ETH_HASH_FUNCTION_SIMPLE_XOR, /**< Simple XOR */
> + RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ, /**< Symmetric Toeplitz */
> RTE_ETH_HASH_FUNCTION_MAX,
> };
>
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz hash support
2019-07-31 12:08 ` Andrew Rybchenko
@ 2019-07-31 12:30 ` Adrien Mazarguil
2019-07-31 13:03 ` Andrew Rybchenko
2019-07-31 13:43 ` Shahaf Shuler
0 siblings, 2 replies; 24+ messages in thread
From: Adrien Mazarguil @ 2019-07-31 12:30 UTC (permalink / raw)
To: Andrew Rybchenko; +Cc: simei, qi.z.zhang, jingjing.wu, dev
On Wed, Jul 31, 2019 at 03:08:19PM +0300, Andrew Rybchenko wrote:
> On 7/25/19 7:57 AM, simei wrote:
> > From: Simei Su <simei.su@intel.com>
> >
> > Currently, there are DEFAULT,TOEPLITZ and SIMPLE_XOR hash funtion.
> > To support symmetric hash by rte_flow RSS action, this patch adds
> > new hash function "Symmetric Toeplitz" which is supported by some hardware.
>
> Isn't it a question of key to achieve symmetry?
> I.e. hash algorithm (function) is still the same - Toeplitz, but
> hash key makes the result symmetric (i.e. equal for flows in both
> directions - swap transport ports and IPv4/6 addresses).
This is only an option when src/dst are known in advance.
When doing RSS, HW implementations (such as Mellanox's) implement a modified
Toeplitz XOR'ing src with dst resulting in the same hash both ways
regardless of the key.
--
Adrien Mazarguil
6WIND
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz hash support
2019-07-31 12:30 ` Adrien Mazarguil
@ 2019-07-31 13:03 ` Andrew Rybchenko
2019-07-31 13:43 ` Shahaf Shuler
1 sibling, 0 replies; 24+ messages in thread
From: Andrew Rybchenko @ 2019-07-31 13:03 UTC (permalink / raw)
To: Adrien Mazarguil; +Cc: simei, qi.z.zhang, jingjing.wu, dev
On 7/31/19 3:30 PM, Adrien Mazarguil wrote:
> On Wed, Jul 31, 2019 at 03:08:19PM +0300, Andrew Rybchenko wrote:
>> On 7/25/19 7:57 AM, simei wrote:
>>> From: Simei Su <simei.su@intel.com>
>>>
>>> Currently, there are DEFAULT,TOEPLITZ and SIMPLE_XOR hash funtion.
>>> To support symmetric hash by rte_flow RSS action, this patch adds
>>> new hash function "Symmetric Toeplitz" which is supported by some hardware.
>> Isn't it a question of key to achieve symmetry?
>> I.e. hash algorithm (function) is still the same - Toeplitz, but
>> hash key makes the result symmetric (i.e. equal for flows in both
>> directions - swap transport ports and IPv4/6 addresses).
> This is only an option when src/dst are known in advance.
>
> When doing RSS, HW implementations (such as Mellanox's) implement a modified
> Toeplitz XOR'ing src with dst resulting in the same hash both ways
> regardless of the key.
OK, I see. But generic symmetric Toeplitz is introduced by the patch.
What is criteria for other vendor to say that it is supported?
What should application expect?
The algorithm should be defined.
Also interesting question is how does it co-exists with the other
patch in the mailing list which introduces way to use source or
destination IP/port only.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz hash support
2019-07-31 12:30 ` Adrien Mazarguil
2019-07-31 13:03 ` Andrew Rybchenko
@ 2019-07-31 13:43 ` Shahaf Shuler
2019-09-29 11:51 ` Andrew Rybchenko
1 sibling, 1 reply; 24+ messages in thread
From: Shahaf Shuler @ 2019-07-31 13:43 UTC (permalink / raw)
To: Adrien Mazarguil, Andrew Rybchenko; +Cc: simei, qi.z.zhang, jingjing.wu, dev
Wednesday, July 31, 2019 3:31 PM, Adrien Mazarguil:
> Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz hash
> support
>
> On Wed, Jul 31, 2019 at 03:08:19PM +0300, Andrew Rybchenko wrote:
> > On 7/25/19 7:57 AM, simei wrote:
> > > From: Simei Su <simei.su@intel.com>
> > >
> > > Currently, there are DEFAULT,TOEPLITZ and SIMPLE_XOR hash funtion.
> > > To support symmetric hash by rte_flow RSS action, this patch adds
> > > new hash function "Symmetric Toeplitz" which is supported by some
> hardware.
> >
> > Isn't it a question of key to achieve symmetry?
> > I.e. hash algorithm (function) is still the same - Toeplitz, but hash
> > key makes the result symmetric (i.e. equal for flows in both
> > directions - swap transport ports and IPv4/6 addresses).
>
> This is only an option when src/dst are known in advance.
>
> When doing RSS, HW implementations (such as Mellanox's) implement a
> modified Toeplitz XOR'ing src with dst resulting in the same hash both ways
> regardless of the key.
Just to stand correct it was a bug on Mellanox kernel driver that was fixed. Now the RSS is spec complaint (non-symmetric).
Andrew is correct one can have a special key that will make the RSS symmetric, however it is good to have this option for the user to explicitly request symmetric function (w/o any restriction on the key).
>
> --
> Adrien Mazarguil
> 6WIND
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH 0/2] add symmetric toeplitz hash support
2019-07-25 4:57 [dpdk-dev] [PATCH 0/2] add symmetric toeplitz hash support simei
` (2 preceding siblings ...)
2019-07-26 0:55 ` [dpdk-dev] [PATCH v2 0/2] " simei
@ 2019-09-23 23:11 ` Zhang, Qi Z
3 siblings, 0 replies; 24+ messages in thread
From: Zhang, Qi Z @ 2019-09-23 23:11 UTC (permalink / raw)
To: Su, Simei, Wu, Jingjing, adrien.mazarguil; +Cc: dev
> -----Original Message-----
> From: Su, Simei
> Sent: Thursday, July 25, 2019 12:57 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; adrien.mazarguil@6wind.com
> Cc: dev@dpdk.org; Su, Simei <simei.su@intel.com>
> Subject: [PATCH 0/2] add symmetric toeplitz hash support
>
> From: Simei Su <simei.su@intel.com>
>
> [PATCH 1/2] ethdev: add new hash function "Symmetric Toeplitz" supported
> by hardware.
> [PATCH 2/2] app/testpmd: add command line support for symmetric toeplitz
> hash configuration.
>
> Simei Su (2):
> ethdev: add symmetric toeplitz hash support
> app/testpmd: add symmetric toeplitz hash support
>
> app/test-pmd/cmdline.c | 12 +++++++++---
> app/test-pmd/cmdline_flow.c | 12 +++++++++++-
> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
> lib/librte_ethdev/rte_flow.h | 1 +
> 4 files changed, 22 insertions(+), 5 deletions(-)
>
> --
> 1.8.3.1
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/2] add symmetric toeplitz hash support
2019-07-26 0:55 ` [dpdk-dev] [PATCH v2 0/2] " simei
2019-07-26 0:55 ` [dpdk-dev] [PATCH v2 1/2] ethdev: " simei
2019-07-26 0:55 ` [dpdk-dev] [PATCH v2 2/2] app/testpmd: " simei
@ 2019-09-24 5:30 ` Zhang, Qi Z
2019-10-01 9:22 ` [dpdk-dev] [PATCH v3 " Simei Su
3 siblings, 0 replies; 24+ messages in thread
From: Zhang, Qi Z @ 2019-09-24 5:30 UTC (permalink / raw)
To: Su, Simei, Wu, Jingjing, adrien.mazarguil; +Cc: dev
> -----Original Message-----
> From: Su, Simei
> Sent: Friday, July 26, 2019 8:55 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; adrien.mazarguil@6wind.com
> Cc: dev@dpdk.org; Su, Simei <simei.su@intel.com>
> Subject: [PATCH v2 0/2] add symmetric toeplitz hash support
>
> From: Simei Su <simei.su@intel.com>
>
> This v2 patch rebase to 19.08-rc2.
> [PATCH v2 1/2] ethdev: add new hash function "Symmetric Toeplitz"
> supported by hardware.
> [PATCH v2 2/2] app/testpmd: add command line support for symmetric
> toeplitz hash configuration.
>
> Simei Su (2):
> ethdev: add symmetric toeplitz hash support
> app/testpmd: add symmetric toeplitz hash support
>
> app/test-pmd/cmdline.c | 12 +++++++++---
> app/test-pmd/cmdline_flow.c | 12 +++++++++++-
> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
> lib/librte_ethdev/rte_flow.h | 1 +
> 4 files changed, 22 insertions(+), 5 deletions(-)
>
> --
> 1.8.3.1
Reviewed by: Qi Zhang <qi.z.zhang@intel.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/2] ethdev: add symmetric toeplitz hash support
2019-07-26 0:55 ` [dpdk-dev] [PATCH v2 1/2] ethdev: " simei
@ 2019-09-28 18:32 ` Ori Kam
0 siblings, 0 replies; 24+ messages in thread
From: Ori Kam @ 2019-09-28 18:32 UTC (permalink / raw)
To: simei, qi.z.zhang, jingjing.wu, Adrien Mazarguil; +Cc: dev
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of simei
> Sent: Friday, July 26, 2019 3:55 AM
> To: qi.z.zhang@intel.com; jingjing.wu@intel.com; Adrien Mazarguil
> <adrien.mazarguil@6wind.com>
> Cc: dev@dpdk.org; simei.su@intel.com
> Subject: [dpdk-dev] [PATCH v2 1/2] ethdev: add symmetric toeplitz hash support
>
> From: Simei Su <simei.su@intel.com>
>
> Currently, there are DEFAULT,TOEPLITZ and SIMPLE_XOR hash function.
> To support symmetric hash by rte_flow RSS action, this patch adds
> new hash function "Symmetric Toeplitz" which is supported by some hardware.
>
> Signed-off-by: Simei Su <simei.su@intel.com>
> ---
Acked-by: Ori Kam <orika@mellanox.com>
Thanks,
Ori Kam
> lib/librte_ethdev/rte_flow.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
> index b66bf14..77a0c52 100644
> --- a/lib/librte_ethdev/rte_flow.h
> +++ b/lib/librte_ethdev/rte_flow.h
> @@ -1814,6 +1814,7 @@ enum rte_eth_hash_function {
> RTE_ETH_HASH_FUNCTION_DEFAULT = 0,
> RTE_ETH_HASH_FUNCTION_TOEPLITZ, /**< Toeplitz */
> RTE_ETH_HASH_FUNCTION_SIMPLE_XOR, /**< Simple XOR */
> + RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ, /**< Symmetric
> Toeplitz */
> RTE_ETH_HASH_FUNCTION_MAX,
> };
>
> --
> 1.8.3.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH v2 2/2] app/testpmd: add symmetric toeplitz hash support
2019-07-26 0:55 ` [dpdk-dev] [PATCH v2 2/2] app/testpmd: " simei
@ 2019-09-28 18:39 ` Ori Kam
0 siblings, 0 replies; 24+ messages in thread
From: Ori Kam @ 2019-09-28 18:39 UTC (permalink / raw)
To: simei, qi.z.zhang, jingjing.wu, Adrien Mazarguil; +Cc: dev
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of simei
> Sent: Friday, July 26, 2019 3:55 AM
> To: qi.z.zhang@intel.com; jingjing.wu@intel.com; Adrien Mazarguil
> <adrien.mazarguil@6wind.com>
> Cc: dev@dpdk.org; simei.su@intel.com
> Subject: [dpdk-dev] [PATCH v2 2/2] app/testpmd: add symmetric toeplitz hash
> support
>
> From: Simei Su <simei.su@intel.com>
>
> This patch adds command line support for Symmetric Toeplitz
> hash configuration.
>
> Signed-off-by: Simei Su <simei.su@intel.com>
> ---
Acked-by: Ori Kam <orika@mellanox.com>
Thanks,
Ori Kam
> app/test-pmd/cmdline.c | 12 +++++++++---
> app/test-pmd/cmdline_flow.c | 12 +++++++++++-
> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
> 3 files changed, 21 insertions(+), 5 deletions(-)
>
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index a28362d..60c159f 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -1055,7 +1055,7 @@ static void cmd_help_long_parsed(void
> *parsed_result,
> "get_hash_global_config (port_id)\n"
> " Get the global configurations of hash filters.\n\n"
>
> - "set_hash_global_config (port_id)
> (toeplitz|simple_xor|default)"
> + "set_hash_global_config (port_id)
> (toeplitz|simple_xor|symmetric_toeplitz|default)"
> " (ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-
> other|ipv6|"
> "ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-
> other|l2_payload)"
> " (enable|disable)\n"
> @@ -12258,6 +12258,9 @@ struct cmd_get_hash_global_config_result {
> case RTE_ETH_HASH_FUNCTION_SIMPLE_XOR:
> printf("Hash function is Simple XOR\n");
> break;
> + case RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ:
> + printf("Hash function is Symmetric Toeplitz\n");
> + break;
> default:
> printf("Unknown hash function\n");
> break;
> @@ -12331,6 +12334,9 @@ struct cmd_set_hash_global_config_result {
> else if (!strcmp(res->hash_func, "simple_xor"))
> info.info.global_conf.hash_func =
> RTE_ETH_HASH_FUNCTION_SIMPLE_XOR;
> + else if (!strcmp(res->hash_func, "symmetric_toeplitz"))
> + info.info.global_conf.hash_func =
> + RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ;
> else if (!strcmp(res->hash_func, "default"))
> info.info.global_conf.hash_func =
> RTE_ETH_HASH_FUNCTION_DEFAULT;
> @@ -12360,7 +12366,7 @@ struct cmd_set_hash_global_config_result {
> port_id, UINT16);
> cmdline_parse_token_string_t cmd_set_hash_global_config_hash_func =
> TOKEN_STRING_INITIALIZER(struct
> cmd_set_hash_global_config_result,
> - hash_func, "toeplitz#simple_xor#default");
> + hash_func, "toeplitz#simple_xor#symmetric_toeplitz#default");
> cmdline_parse_token_string_t cmd_set_hash_global_config_flow_type =
> TOKEN_STRING_INITIALIZER(struct
> cmd_set_hash_global_config_result,
> flow_type,
> @@ -12374,7 +12380,7 @@ struct cmd_set_hash_global_config_result {
> .f = cmd_set_hash_global_config_parsed,
> .data = NULL,
> .help_str = "set_hash_global_config <port_id> "
> - "toeplitz|simple_xor|default "
> + "toeplitz|simple_xor|symmetric_toeplitz|default "
> "ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|"
> "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|"
> "l2_payload enable|disable",
> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> index 4958713..4968df9 100644
> --- a/app/test-pmd/cmdline_flow.c
> +++ b/app/test-pmd/cmdline_flow.c
> @@ -220,6 +220,7 @@ enum index {
> ACTION_RSS_FUNC_DEFAULT,
> ACTION_RSS_FUNC_TOEPLITZ,
> ACTION_RSS_FUNC_SIMPLE_XOR,
> + ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ,
> ACTION_RSS_TYPES,
> ACTION_RSS_TYPE,
> ACTION_RSS_KEY,
> @@ -2457,7 +2458,8 @@ static int comp_vc_action_rss_queue(struct context
> *, const struct token *,
> .next = NEXT(action_rss,
> NEXT_ENTRY(ACTION_RSS_FUNC_DEFAULT,
> ACTION_RSS_FUNC_TOEPLITZ,
> - ACTION_RSS_FUNC_SIMPLE_XOR)),
> + ACTION_RSS_FUNC_SIMPLE_XOR,
> +
> ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ)),
> },
> [ACTION_RSS_FUNC_DEFAULT] = {
> .name = "default",
> @@ -2474,6 +2476,11 @@ static int comp_vc_action_rss_queue(struct context
> *, const struct token *,
> .help = "simple XOR hash function",
> .call = parse_vc_action_rss_func,
> },
> + [ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ] = {
> + .name = "symmetric_toeplitz",
> + .help = "Symmetric Toeplitz hash function",
> + .call = parse_vc_action_rss_func,
> + },
> [ACTION_RSS_LEVEL] = {
> .name = "level",
> .help = "encapsulation level for \"types\"",
> @@ -3588,6 +3595,9 @@ static int comp_vc_action_rss_queue(struct context
> *, const struct token *,
> case ACTION_RSS_FUNC_SIMPLE_XOR:
> func = RTE_ETH_HASH_FUNCTION_SIMPLE_XOR;
> break;
> + case ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ:
> + func = RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ;
> + break;
> default:
> return -1;
> }
> diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> index 313e070..6343638 100644
> --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> @@ -3471,7 +3471,7 @@ set_hash_global_config
>
> Set the global configurations of hash filters::
>
> - set_hash_global_config (port_id) (toeplitz|simple_xor|default) \
> + set_hash_global_config (port_id)
> (toeplitz|simple_xor|symmetric_toeplitz|default) \
> (ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|ipv6|ipv6-frag| \
> ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|l2_payload|<flow_id>) \
> (enable|disable)
> --
> 1.8.3.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz hash support
2019-07-31 13:43 ` Shahaf Shuler
@ 2019-09-29 11:51 ` Andrew Rybchenko
2019-09-30 3:12 ` Su, Simei
0 siblings, 1 reply; 24+ messages in thread
From: Andrew Rybchenko @ 2019-09-29 11:51 UTC (permalink / raw)
To: Shahaf Shuler, Adrien Mazarguil; +Cc: simei, qi.z.zhang, jingjing.wu, dev
On 7/31/19 4:43 PM, Shahaf Shuler wrote:
> Wednesday, July 31, 2019 3:31 PM, Adrien Mazarguil:
>> Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz hash
>> support
>>
>> On Wed, Jul 31, 2019 at 03:08:19PM +0300, Andrew Rybchenko wrote:
>>> On 7/25/19 7:57 AM, simei wrote:
>>>> From: Simei Su <simei.su@intel.com>
>>>>
>>>> Currently, there are DEFAULT,TOEPLITZ and SIMPLE_XOR hash funtion.
>>>> To support symmetric hash by rte_flow RSS action, this patch adds
>>>> new hash function "Symmetric Toeplitz" which is supported by some
>> hardware.
>>> Isn't it a question of key to achieve symmetry?
>>> I.e. hash algorithm (function) is still the same - Toeplitz, but hash
>>> key makes the result symmetric (i.e. equal for flows in both
>>> directions - swap transport ports and IPv4/6 addresses).
>> This is only an option when src/dst are known in advance.
>>
>> When doing RSS, HW implementations (such as Mellanox's) implement a
>> modified Toeplitz XOR'ing src with dst resulting in the same hash both ways
>> regardless of the key.
> Just to stand correct it was a bug on Mellanox kernel driver that was fixed. Now the RSS is spec complaint (non-symmetric).
> Andrew is correct one can have a special key that will make the RSS symmetric, however it is good to have this option for the user to explicitly request symmetric function (w/o any restriction on the key).
I think we need a definition what is behind SYMMETRIC_TOEPLITZ here.
If I'd like to test it and check, I need to know an algorithm in order
to know what to expect.
Also it is important to make it the same for all NIC vendors: what
should algorithm be in order to say that it is symmetric Toeplitz?
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz hash support
2019-09-29 11:51 ` Andrew Rybchenko
@ 2019-09-30 3:12 ` Su, Simei
2019-09-30 6:14 ` Andrew Rybchenko
0 siblings, 1 reply; 24+ messages in thread
From: Su, Simei @ 2019-09-30 3:12 UTC (permalink / raw)
To: Andrew Rybchenko, Shahaf Shuler, Adrien Mazarguil
Cc: Zhang, Qi Z, Wu, Jingjing, dev
Hi, Andrew
> -----Original Message-----
> From: Andrew Rybchenko [mailto:arybchenko@solarflare.com]
> Sent: Sunday, September 29, 2019 7:51 PM
> To: Shahaf Shuler <shahafs@mellanox.com>; Adrien Mazarguil
> <adrien.mazarguil@6wind.com>
> Cc: Su, Simei <simei.su@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Wu,
> Jingjing <jingjing.wu@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz hash
> support
>
> On 7/31/19 4:43 PM, Shahaf Shuler wrote:
> > Wednesday, July 31, 2019 3:31 PM, Adrien Mazarguil:
> >> Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz
> >> hash support
> >>
> >> On Wed, Jul 31, 2019 at 03:08:19PM +0300, Andrew Rybchenko wrote:
> >>> On 7/25/19 7:57 AM, simei wrote:
> >>>> From: Simei Su <simei.su@intel.com>
> >>>>
> >>>> Currently, there are DEFAULT,TOEPLITZ and SIMPLE_XOR hash funtion.
> >>>> To support symmetric hash by rte_flow RSS action, this patch adds
> >>>> new hash function "Symmetric Toeplitz" which is supported by some
> >> hardware.
> >>> Isn't it a question of key to achieve symmetry?
> >>> I.e. hash algorithm (function) is still the same - Toeplitz, but
> >>> hash key makes the result symmetric (i.e. equal for flows in both
> >>> directions - swap transport ports and IPv4/6 addresses).
> >> This is only an option when src/dst are known in advance.
> >>
> >> When doing RSS, HW implementations (such as Mellanox's) implement a
> >> modified Toeplitz XOR'ing src with dst resulting in the same hash
> >> both ways regardless of the key.
> > Just to stand correct it was a bug on Mellanox kernel driver that was fixed. Now
> the RSS is spec complaint (non-symmetric).
> > Andrew is correct one can have a special key that will make the RSS symmetric,
> however it is good to have this option for the user to explicitly request symmetric
> function (w/o any restriction on the key).
>
> I think we need a definition what is behind SYMMETRIC_TOEPLITZ here.
> If I'd like to test it and check, I need to know an algorithm in order to know what
> to expect.
> Also it is important to make it the same for all NIC vendors: what should
> algorithm be in order to say that it is symmetric Toeplitz?
The symmetric toeplitz is: src, dst will be replaced by xor(src, dst).
It is expected to get the same hash value when swapping src/dst ip or port.
Br
Simei
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz hash support
2019-09-30 3:12 ` Su, Simei
@ 2019-09-30 6:14 ` Andrew Rybchenko
2019-09-30 6:34 ` Su, Simei
0 siblings, 1 reply; 24+ messages in thread
From: Andrew Rybchenko @ 2019-09-30 6:14 UTC (permalink / raw)
To: Su, Simei, Shahaf Shuler, Adrien Mazarguil; +Cc: Zhang, Qi Z, Wu, Jingjing, dev
Hi Simei,
On 9/30/19 6:12 AM, Su, Simei wrote:
> Hi, Andrew
>
>> -----Original Message-----
>> From: Andrew Rybchenko [mailto:arybchenko@solarflare.com]
>> Sent: Sunday, September 29, 2019 7:51 PM
>> To: Shahaf Shuler <shahafs@mellanox.com>; Adrien Mazarguil
>> <adrien.mazarguil@6wind.com>
>> Cc: Su, Simei <simei.su@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Wu,
>> Jingjing <jingjing.wu@intel.com>; dev@dpdk.org
>> Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz hash
>> support
>>
>> On 7/31/19 4:43 PM, Shahaf Shuler wrote:
>>> Wednesday, July 31, 2019 3:31 PM, Adrien Mazarguil:
>>>> Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz
>>>> hash support
>>>>
>>>> On Wed, Jul 31, 2019 at 03:08:19PM +0300, Andrew Rybchenko wrote:
>>>>> On 7/25/19 7:57 AM, simei wrote:
>>>>>> From: Simei Su <simei.su@intel.com>
>>>>>>
>>>>>> Currently, there are DEFAULT,TOEPLITZ and SIMPLE_XOR hash funtion.
>>>>>> To support symmetric hash by rte_flow RSS action, this patch adds
>>>>>> new hash function "Symmetric Toeplitz" which is supported by some
>>>> hardware.
>>>>> Isn't it a question of key to achieve symmetry?
>>>>> I.e. hash algorithm (function) is still the same - Toeplitz, but
>>>>> hash key makes the result symmetric (i.e. equal for flows in both
>>>>> directions - swap transport ports and IPv4/6 addresses).
>>>> This is only an option when src/dst are known in advance.
>>>>
>>>> When doing RSS, HW implementations (such as Mellanox's) implement a
>>>> modified Toeplitz XOR'ing src with dst resulting in the same hash
>>>> both ways regardless of the key.
>>> Just to stand correct it was a bug on Mellanox kernel driver that was fixed. Now
>> the RSS is spec complaint (non-symmetric).
>>> Andrew is correct one can have a special key that will make the RSS symmetric,
>> however it is good to have this option for the user to explicitly request symmetric
>> function (w/o any restriction on the key).
>>
>> I think we need a definition what is behind SYMMETRIC_TOEPLITZ here.
>> If I'd like to test it and check, I need to know an algorithm in order to know what
>> to expect.
>> Also it is important to make it the same for all NIC vendors: what should
>> algorithm be in order to say that it is symmetric Toeplitz?
> The symmetric toeplitz is: src, dst will be replaced by xor(src, dst).
> It is expected to get the same hash value when swapping src/dst ip or port.
Are both replaced by XOR or just one is replaced by XOR and another one
removed from Toeplitz input? If later, how does it coexist with src/dst only
flags?
Anyway, please, add it to the patch in Doxygen comments.
Thanks,
Andrew.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz hash support
2019-09-30 6:14 ` Andrew Rybchenko
@ 2019-09-30 6:34 ` Su, Simei
2019-09-30 7:49 ` Zhang, Qi Z
0 siblings, 1 reply; 24+ messages in thread
From: Su, Simei @ 2019-09-30 6:34 UTC (permalink / raw)
To: Andrew Rybchenko, Shahaf Shuler, Adrien Mazarguil
Cc: Zhang, Qi Z, Wu, Jingjing, dev
Hi, Andrew
> -----Original Message-----
> From: Andrew Rybchenko [mailto:arybchenko@solarflare.com]
> Sent: Monday, September 30, 2019 2:15 PM
> To: Su, Simei <simei.su@intel.com>; Shahaf Shuler <shahafs@mellanox.com>;
> Adrien Mazarguil <adrien.mazarguil@6wind.com>
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz hash
> support
>
> Hi Simei,
>
> On 9/30/19 6:12 AM, Su, Simei wrote:
> > Hi, Andrew
> >
> >> -----Original Message-----
> >> From: Andrew Rybchenko [mailto:arybchenko@solarflare.com]
> >> Sent: Sunday, September 29, 2019 7:51 PM
> >> To: Shahaf Shuler <shahafs@mellanox.com>; Adrien Mazarguil
> >> <adrien.mazarguil@6wind.com>
> >> Cc: Su, Simei <simei.su@intel.com>; Zhang, Qi Z
> >> <qi.z.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> >> dev@dpdk.org
> >> Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz
> >> hash support
> >>
> >> On 7/31/19 4:43 PM, Shahaf Shuler wrote:
> >>> Wednesday, July 31, 2019 3:31 PM, Adrien Mazarguil:
> >>>> Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz
> >>>> hash support
> >>>>
> >>>> On Wed, Jul 31, 2019 at 03:08:19PM +0300, Andrew Rybchenko wrote:
> >>>>> On 7/25/19 7:57 AM, simei wrote:
> >>>>>> From: Simei Su <simei.su@intel.com>
> >>>>>>
> >>>>>> Currently, there are DEFAULT,TOEPLITZ and SIMPLE_XOR hash funtion.
> >>>>>> To support symmetric hash by rte_flow RSS action, this patch adds
> >>>>>> new hash function "Symmetric Toeplitz" which is supported by some
> >>>> hardware.
> >>>>> Isn't it a question of key to achieve symmetry?
> >>>>> I.e. hash algorithm (function) is still the same - Toeplitz, but
> >>>>> hash key makes the result symmetric (i.e. equal for flows in both
> >>>>> directions - swap transport ports and IPv4/6 addresses).
> >>>> This is only an option when src/dst are known in advance.
> >>>>
> >>>> When doing RSS, HW implementations (such as Mellanox's) implement a
> >>>> modified Toeplitz XOR'ing src with dst resulting in the same hash
> >>>> both ways regardless of the key.
> >>> Just to stand correct it was a bug on Mellanox kernel driver that
> >>> was fixed. Now
> >> the RSS is spec complaint (non-symmetric).
> >>> Andrew is correct one can have a special key that will make the RSS
> >>> symmetric,
> >> however it is good to have this option for the user to explicitly
> >> request symmetric function (w/o any restriction on the key).
> >>
> >> I think we need a definition what is behind SYMMETRIC_TOEPLITZ here.
> >> If I'd like to test it and check, I need to know an algorithm in
> >> order to know what to expect.
> >> Also it is important to make it the same for all NIC vendors: what
> >> should algorithm be in order to say that it is symmetric Toeplitz?
> > The symmetric toeplitz is: src, dst will be replaced by xor(src, dst).
> > It is expected to get the same hash value when swapping src/dst ip or port.
>
> Are both replaced by XOR or just one is replaced by XOR and another one
> removed from Toeplitz input? If later, how does it coexist with src/dst only flags?
>
> Anyway, please, add it to the patch in Doxygen comments.
>
In our case, src and dst are both replaced by XOR. For example, src ip and dst ip or src port and dst port are swapped, the hash value is the same.
SRC/DST only flags is another thing, it covers input set change.
Br
Simei
> Thanks,
> Andrew.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz hash support
2019-09-30 6:34 ` Su, Simei
@ 2019-09-30 7:49 ` Zhang, Qi Z
0 siblings, 0 replies; 24+ messages in thread
From: Zhang, Qi Z @ 2019-09-30 7:49 UTC (permalink / raw)
To: Su, Simei, Andrew Rybchenko, Shahaf Shuler, Adrien Mazarguil
Cc: Wu, Jingjing, dev
> -----Original Message-----
> From: Su, Simei
> Sent: Monday, September 30, 2019 2:34 PM
> To: Andrew Rybchenko <arybchenko@solarflare.com>; Shahaf Shuler
> <shahafs@mellanox.com>; Adrien Mazarguil <adrien.mazarguil@6wind.com>
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> dev@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz hash
> support
>
> Hi, Andrew
>
> > -----Original Message-----
> > From: Andrew Rybchenko [mailto:arybchenko@solarflare.com]
> > Sent: Monday, September 30, 2019 2:15 PM
> > To: Su, Simei <simei.su@intel.com>; Shahaf Shuler
> > <shahafs@mellanox.com>; Adrien Mazarguil <adrien.mazarguil@6wind.com>
> > Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing
> > <jingjing.wu@intel.com>; dev@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz
> > hash support
> >
> > Hi Simei,
> >
> > On 9/30/19 6:12 AM, Su, Simei wrote:
> > > Hi, Andrew
> > >
> > >> -----Original Message-----
> > >> From: Andrew Rybchenko [mailto:arybchenko@solarflare.com]
> > >> Sent: Sunday, September 29, 2019 7:51 PM
> > >> To: Shahaf Shuler <shahafs@mellanox.com>; Adrien Mazarguil
> > >> <adrien.mazarguil@6wind.com>
> > >> Cc: Su, Simei <simei.su@intel.com>; Zhang, Qi Z
> > >> <qi.z.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> > >> dev@dpdk.org
> > >> Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz
> > >> hash support
> > >>
> > >> On 7/31/19 4:43 PM, Shahaf Shuler wrote:
> > >>> Wednesday, July 31, 2019 3:31 PM, Adrien Mazarguil:
> > >>>> Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric
> > >>>> toeplitz hash support
> > >>>>
> > >>>> On Wed, Jul 31, 2019 at 03:08:19PM +0300, Andrew Rybchenko wrote:
> > >>>>> On 7/25/19 7:57 AM, simei wrote:
> > >>>>>> From: Simei Su <simei.su@intel.com>
> > >>>>>>
> > >>>>>> Currently, there are DEFAULT,TOEPLITZ and SIMPLE_XOR hash
> funtion.
> > >>>>>> To support symmetric hash by rte_flow RSS action, this patch
> > >>>>>> adds new hash function "Symmetric Toeplitz" which is supported
> > >>>>>> by some
> > >>>> hardware.
> > >>>>> Isn't it a question of key to achieve symmetry?
> > >>>>> I.e. hash algorithm (function) is still the same - Toeplitz, but
> > >>>>> hash key makes the result symmetric (i.e. equal for flows in
> > >>>>> both directions - swap transport ports and IPv4/6 addresses).
> > >>>> This is only an option when src/dst are known in advance.
> > >>>>
> > >>>> When doing RSS, HW implementations (such as Mellanox's) implement
> > >>>> a modified Toeplitz XOR'ing src with dst resulting in the same
> > >>>> hash both ways regardless of the key.
> > >>> Just to stand correct it was a bug on Mellanox kernel driver that
> > >>> was fixed. Now
> > >> the RSS is spec complaint (non-symmetric).
> > >>> Andrew is correct one can have a special key that will make the
> > >>> RSS symmetric,
> > >> however it is good to have this option for the user to explicitly
> > >> request symmetric function (w/o any restriction on the key).
> > >>
> > >> I think we need a definition what is behind SYMMETRIC_TOEPLITZ here.
> > >> If I'd like to test it and check, I need to know an algorithm in
> > >> order to know what to expect.
> > >> Also it is important to make it the same for all NIC vendors: what
> > >> should algorithm be in order to say that it is symmetric Toeplitz?
> > > The symmetric toeplitz is: src, dst will be replaced by xor(src, dst).
> > > It is expected to get the same hash value when swapping src/dst ip or port.
> >
> > Are both replaced by XOR or just one is replaced by XOR and another
> > one removed from Toeplitz input? If later, how does it coexist with src/dst
> only flags?
> >
> > Anyway, please, add it to the patch in Doxygen comments.
> >
> In our case, src and dst are both replaced by XOR. For example, src ip and
> dst ip or src port and dst port are swapped, the hash value is the same.
> SRC/DST only flags is another thing, it covers input set change.
For the case with dst / src only, src or dst address will XOR with zero pair, so it result same value as simple Toeplitz
>
> Br
> Simei
>
> > Thanks,
> > Andrew.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v3 0/2] add symmetric toeplitz hash support
2019-07-26 0:55 ` [dpdk-dev] [PATCH v2 0/2] " simei
` (2 preceding siblings ...)
2019-09-24 5:30 ` [dpdk-dev] [PATCH v2 0/2] " Zhang, Qi Z
@ 2019-10-01 9:22 ` Simei Su
2019-10-01 9:22 ` [dpdk-dev] [PATCH v3 1/2] ethdev: " Simei Su
` (2 more replies)
3 siblings, 3 replies; 24+ messages in thread
From: Simei Su @ 2019-10-01 9:22 UTC (permalink / raw)
To: qi.z.zhang, jingjing.wu, xiaolong.ye, ferruh.yigit; +Cc: dev, simei.su
[PATCH v3 1/2] ethdev: add new hash function "Symmetric Toeplitz" supported by hardware.
[PATCH v3 2/2] app/testpmd: add command line support for symmetric toeplitz hash configuration.
v3:
* Add a definition for Symmetric Toeplitz function.
v2:
* Rebase to 19.08-rc2.
Simei Su (2):
ethdev: add symmetric toeplitz hash support
app/testpmd: add symmetric toeplitz hash support
app/test-pmd/cmdline.c | 12 +++++++++---
app/test-pmd/cmdline_flow.c | 12 +++++++++++-
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
lib/librte_ethdev/rte_flow.h | 6 ++++++
4 files changed, 27 insertions(+), 5 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v3 1/2] ethdev: add symmetric toeplitz hash support
2019-10-01 9:22 ` [dpdk-dev] [PATCH v3 " Simei Su
@ 2019-10-01 9:22 ` Simei Su
2019-10-01 13:36 ` Andrew Rybchenko
2019-10-01 9:22 ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: " Simei Su
2019-10-01 15:06 ` [dpdk-dev] [PATCH v3 0/2] " Ferruh Yigit
2 siblings, 1 reply; 24+ messages in thread
From: Simei Su @ 2019-10-01 9:22 UTC (permalink / raw)
To: qi.z.zhang, jingjing.wu, xiaolong.ye, ferruh.yigit; +Cc: dev, simei.su
Currently, there are DEFAULT,TOEPLITZ and SIMPLE_XOR hash function.
To support symmetric hash by rte_flow RSS action, this patch adds
new hash function "Symmetric Toeplitz" which is supported by some hardware.
Signed-off-by: Simei Su <simei.su@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
lib/librte_ethdev/rte_flow.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
index 354cb1d..ca4e868 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -1814,6 +1814,12 @@ enum rte_eth_hash_function {
RTE_ETH_HASH_FUNCTION_DEFAULT = 0,
RTE_ETH_HASH_FUNCTION_TOEPLITZ, /**< Toeplitz */
RTE_ETH_HASH_FUNCTION_SIMPLE_XOR, /**< Simple XOR */
+ /**
+ * Symmetric Toeplitz: src, dst will be replaced by
+ * xor(src, dst). For the case with src/dst only,
+ * src or dst address will xor with zero pair.
+ */
+ RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ,
RTE_ETH_HASH_FUNCTION_MAX,
};
--
1.8.3.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* [dpdk-dev] [PATCH v3 2/2] app/testpmd: add symmetric toeplitz hash support
2019-10-01 9:22 ` [dpdk-dev] [PATCH v3 " Simei Su
2019-10-01 9:22 ` [dpdk-dev] [PATCH v3 1/2] ethdev: " Simei Su
@ 2019-10-01 9:22 ` Simei Su
2019-10-01 15:06 ` [dpdk-dev] [PATCH v3 0/2] " Ferruh Yigit
2 siblings, 0 replies; 24+ messages in thread
From: Simei Su @ 2019-10-01 9:22 UTC (permalink / raw)
To: qi.z.zhang, jingjing.wu, xiaolong.ye, ferruh.yigit; +Cc: dev, simei.su
This patch adds command line support for Symmetric Toeplitz
hash configuration.
Signed-off-by: Simei Su <simei.su@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
app/test-pmd/cmdline.c | 12 +++++++++---
app/test-pmd/cmdline_flow.c | 12 +++++++++++-
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
3 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index def471d..ded56bf 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1056,7 +1056,7 @@ static void cmd_help_long_parsed(void *parsed_result,
"get_hash_global_config (port_id)\n"
" Get the global configurations of hash filters.\n\n"
- "set_hash_global_config (port_id) (toeplitz|simple_xor|default)"
+ "set_hash_global_config (port_id) (toeplitz|simple_xor|symmetric_toeplitz|default)"
" (ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|ipv6|"
"ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|l2_payload)"
" (enable|disable)\n"
@@ -12196,6 +12196,9 @@ struct cmd_get_hash_global_config_result {
case RTE_ETH_HASH_FUNCTION_SIMPLE_XOR:
printf("Hash function is Simple XOR\n");
break;
+ case RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ:
+ printf("Hash function is Symmetric Toeplitz\n");
+ break;
default:
printf("Unknown hash function\n");
break;
@@ -12269,6 +12272,9 @@ struct cmd_set_hash_global_config_result {
else if (!strcmp(res->hash_func, "simple_xor"))
info.info.global_conf.hash_func =
RTE_ETH_HASH_FUNCTION_SIMPLE_XOR;
+ else if (!strcmp(res->hash_func, "symmetric_toeplitz"))
+ info.info.global_conf.hash_func =
+ RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ;
else if (!strcmp(res->hash_func, "default"))
info.info.global_conf.hash_func =
RTE_ETH_HASH_FUNCTION_DEFAULT;
@@ -12298,7 +12304,7 @@ struct cmd_set_hash_global_config_result {
port_id, UINT16);
cmdline_parse_token_string_t cmd_set_hash_global_config_hash_func =
TOKEN_STRING_INITIALIZER(struct cmd_set_hash_global_config_result,
- hash_func, "toeplitz#simple_xor#default");
+ hash_func, "toeplitz#simple_xor#symmetric_toeplitz#default");
cmdline_parse_token_string_t cmd_set_hash_global_config_flow_type =
TOKEN_STRING_INITIALIZER(struct cmd_set_hash_global_config_result,
flow_type,
@@ -12312,7 +12318,7 @@ struct cmd_set_hash_global_config_result {
.f = cmd_set_hash_global_config_parsed,
.data = NULL,
.help_str = "set_hash_global_config <port_id> "
- "toeplitz|simple_xor|default "
+ "toeplitz|simple_xor|symmetric_toeplitz|default "
"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|"
"ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|"
"l2_payload enable|disable",
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 369426c..2e5f237 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -220,6 +220,7 @@ enum index {
ACTION_RSS_FUNC_DEFAULT,
ACTION_RSS_FUNC_TOEPLITZ,
ACTION_RSS_FUNC_SIMPLE_XOR,
+ ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ,
ACTION_RSS_TYPES,
ACTION_RSS_TYPE,
ACTION_RSS_KEY,
@@ -2457,7 +2458,8 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
.next = NEXT(action_rss,
NEXT_ENTRY(ACTION_RSS_FUNC_DEFAULT,
ACTION_RSS_FUNC_TOEPLITZ,
- ACTION_RSS_FUNC_SIMPLE_XOR)),
+ ACTION_RSS_FUNC_SIMPLE_XOR,
+ ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ)),
},
[ACTION_RSS_FUNC_DEFAULT] = {
.name = "default",
@@ -2474,6 +2476,11 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
.help = "simple XOR hash function",
.call = parse_vc_action_rss_func,
},
+ [ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ] = {
+ .name = "symmetric_toeplitz",
+ .help = "Symmetric Toeplitz hash function",
+ .call = parse_vc_action_rss_func,
+ },
[ACTION_RSS_LEVEL] = {
.name = "level",
.help = "encapsulation level for \"types\"",
@@ -3591,6 +3598,9 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
case ACTION_RSS_FUNC_SIMPLE_XOR:
func = RTE_ETH_HASH_FUNCTION_SIMPLE_XOR;
break;
+ case ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ:
+ func = RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ;
+ break;
default:
return -1;
}
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index cba5ba1..e68b8f5 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -3403,7 +3403,7 @@ set_hash_global_config
Set the global configurations of hash filters::
- set_hash_global_config (port_id) (toeplitz|simple_xor|default) \
+ set_hash_global_config (port_id) (toeplitz|simple_xor|symmetric_toeplitz|default) \
(ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|ipv6|ipv6-frag| \
ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|l2_payload|<flow_id>) \
(enable|disable)
--
1.8.3.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH v3 1/2] ethdev: add symmetric toeplitz hash support
2019-10-01 9:22 ` [dpdk-dev] [PATCH v3 1/2] ethdev: " Simei Su
@ 2019-10-01 13:36 ` Andrew Rybchenko
0 siblings, 0 replies; 24+ messages in thread
From: Andrew Rybchenko @ 2019-10-01 13:36 UTC (permalink / raw)
To: Simei Su, qi.z.zhang, jingjing.wu, xiaolong.ye, ferruh.yigit; +Cc: dev
On 10/1/19 12:22 PM, Simei Su wrote:
> Currently, there are DEFAULT,TOEPLITZ and SIMPLE_XOR hash function.
> To support symmetric hash by rte_flow RSS action, this patch adds
> new hash function "Symmetric Toeplitz" which is supported by some hardware.
>
> Signed-off-by: Simei Su <simei.su@intel.com>
> Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
> Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> ---
> lib/librte_ethdev/rte_flow.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
> index 354cb1d..ca4e868 100644
> --- a/lib/librte_ethdev/rte_flow.h
> +++ b/lib/librte_ethdev/rte_flow.h
> @@ -1814,6 +1814,12 @@ enum rte_eth_hash_function {
> RTE_ETH_HASH_FUNCTION_DEFAULT = 0,
> RTE_ETH_HASH_FUNCTION_TOEPLITZ, /**< Toeplitz */
> RTE_ETH_HASH_FUNCTION_SIMPLE_XOR, /**< Simple XOR */
> + /**
> + * Symmetric Toeplitz: src, dst will be replaced by
> + * xor(src, dst). For the case with src/dst only,
> + * src or dst address will xor with zero pair.
> + */
> + RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ,
> RTE_ETH_HASH_FUNCTION_MAX,
> };
It looks like symmetric does not make sense in the case of src/dst only.
The goal of symmetric function is to make it the same for both directions.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/2] add symmetric toeplitz hash support
2019-10-01 9:22 ` [dpdk-dev] [PATCH v3 " Simei Su
2019-10-01 9:22 ` [dpdk-dev] [PATCH v3 1/2] ethdev: " Simei Su
2019-10-01 9:22 ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: " Simei Su
@ 2019-10-01 15:06 ` Ferruh Yigit
2 siblings, 0 replies; 24+ messages in thread
From: Ferruh Yigit @ 2019-10-01 15:06 UTC (permalink / raw)
To: Simei Su, qi.z.zhang, jingjing.wu, xiaolong.ye; +Cc: dev
On 10/1/2019 10:22 AM, Simei Su wrote:
> [PATCH v3 1/2] ethdev: add new hash function "Symmetric Toeplitz" supported by hardware.
> [PATCH v3 2/2] app/testpmd: add command line support for symmetric toeplitz hash configuration.
>
> v3:
> * Add a definition for Symmetric Toeplitz function.
>
> v2:
> * Rebase to 19.08-rc2.
>
> Simei Su (2):
> ethdev: add symmetric toeplitz hash support
> app/testpmd: add symmetric toeplitz hash support
Series applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2019-10-01 15:06 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25 4:57 [dpdk-dev] [PATCH 0/2] add symmetric toeplitz hash support simei
2019-07-25 4:57 ` [dpdk-dev] [PATCH 1/2] ethdev: " simei
2019-07-31 12:08 ` Andrew Rybchenko
2019-07-31 12:30 ` Adrien Mazarguil
2019-07-31 13:03 ` Andrew Rybchenko
2019-07-31 13:43 ` Shahaf Shuler
2019-09-29 11:51 ` Andrew Rybchenko
2019-09-30 3:12 ` Su, Simei
2019-09-30 6:14 ` Andrew Rybchenko
2019-09-30 6:34 ` Su, Simei
2019-09-30 7:49 ` Zhang, Qi Z
2019-07-25 4:57 ` [dpdk-dev] [PATCH 2/2] app/testpmd: " simei
2019-07-26 0:55 ` [dpdk-dev] [PATCH v2 0/2] " simei
2019-07-26 0:55 ` [dpdk-dev] [PATCH v2 1/2] ethdev: " simei
2019-09-28 18:32 ` Ori Kam
2019-07-26 0:55 ` [dpdk-dev] [PATCH v2 2/2] app/testpmd: " simei
2019-09-28 18:39 ` Ori Kam
2019-09-24 5:30 ` [dpdk-dev] [PATCH v2 0/2] " Zhang, Qi Z
2019-10-01 9:22 ` [dpdk-dev] [PATCH v3 " Simei Su
2019-10-01 9:22 ` [dpdk-dev] [PATCH v3 1/2] ethdev: " Simei Su
2019-10-01 13:36 ` Andrew Rybchenko
2019-10-01 9:22 ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: " Simei Su
2019-10-01 15:06 ` [dpdk-dev] [PATCH v3 0/2] " Ferruh Yigit
2019-09-23 23:11 ` [dpdk-dev] [PATCH " Zhang, Qi Z
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).