net/i40e: fix set rss hash function invalid
PATCH 1/1 net/i40e: fix set rss hash function invalid
i40e can support following rss hash function types: default (toeplitz), symmetric toeplitz, and simple_xor. However, when filter engine parses pattern action, it only supports symmetric toeplitz & default (toeplitz).
Delete the hash function limitation when parsing pattern action.
--- drivers/net/i40e/i40e_hash.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/net/i40e/i40e_hash.c +0 -5
@@ -1107,11 +1107,6 @@ i40e_hash_parse_pattern_act(const struct rte_eth_dev *dev,if (rss_act->func ==RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ) rss_conf->symmetric_enable = true; -else if (rss_act->func !=RTE_ETH_HASH_FUNCTION_DEFAULT ) -return rte_flow_error_set (error, -EINVAL , -RTE_FLOW_ERROR_TYPE_ACTION_CONF , -NULL , -"Only symmetric TOEPLITZ supported when pattern specified" );if (!i40e_hash_validate_rss_types (rss_act->types)) return rte_flow_error_set(error, EINVAL,
Signature · 1 line
2.27.0
Quoted 10 lines
-----Original Message-----
From: Yang, SteveX <[email protected]>
Sent: Friday, June 11, 2021 9:35 AM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Yang, SteveX <[email protected]>
Subject: [PATCH v1] net/i40e: fix set rss hash function invalid
Quoted 5 lines
i40e can support following rss hash function types: default (toeplitz), symmetric toeplitz, and
simple_xor. However, when filter engine parses pattern action, it only supports symmetric toeplitz & default (toeplitz).Delete the hash function limitation when parsing pattern action.
Missed fix line.
Quoted 22 lines
Signed-off-by Steve Yang <[email protected]>--- drivers/net/i40e/i40e_hash.c | 5 ----- 1 file changed, 5 deletions(-)drivers/net/i40e/i40e_hash.c +0
-5@@ -1107,11 +1107,6 @@ i40e_hash_parse_pattern_act(const struct rte_eth_dev *dev, if (rss_act->func ==RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ) rss_conf->symmetric_enable = true; - else if (rss_act->func != RTE_ETH_HASH_FUNCTION_DEFAULT) - return rte_flow_error_set(error, -EINVAL, - RTE_FLOW_ERROR_TYPE_ACTION_CONF, - NULL, - "Only symmetric TOEPLITZ
Quoted 1 line
supported when pattern specified");
Do we any other error info if rss_act->func != default or rss_act->func != simple_xor?
Quoted 5 lines
drivers/net/i40e/i40e_hash.c +0
-1if (!i40e_hash_validate_rss_types (rss_act->types)) return rte_flow_error_set(error, EINVAL, --2.27.0
PATCH v2 1/1 net/i40e: fix set rss hash function invalid
In reply to Steve Yangi40e can support following rss hash function types: default/toeplitz, symmetric toeplitz, and simple_xor. However, when filter engine parses pattern action, it only supports symmetric toeplitz & default.
Add simple_xor and toeplitz hash functions support when parsing pattern action.
---
v2:
- add the fix line.
- support simple_xor and toeplitz hash functions explicitly.
drivers/net/i40e/i40e_hash.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
drivers/net/i40e/i40e_hash.c +14 -6
@@ -1105,13 +1105,21 @@ i40e_hash_parse_pattern_act(const struct rte_eth_dev *dev,NULL , "RSS Queues not supported when pattern specified"); -if (rss_act->func ==RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ) +switch (rss_act->func) { +case RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ : rss_conf->symmetric_enable = true; -else if (rss_act->func !=RTE_ETH_HASH_FUNCTION_DEFAULT ) -return rte_flow_error_set (error, -EINVAL , -RTE_FLOW_ERROR_TYPE_ACTION_CONF , -NULL , -"Only symmetric TOEPLITZ supported when pattern specified" ); +break ; +case RTE_ETH_HASH_FUNCTION_DEFAULT : +case RTE_ETH_HASH_FUNCTION_TOEPLITZ : +case RTE_ETH_HASH_FUNCTION_SIMPLE_XOR : +break ; +default : +return rte_flow_error_set (error,EINVAL , +RTE_FLOW_ERROR_TYPE_ACTION_CONF , +NULL , +"RSS hash function not supported " +"when pattern specified" ); + }if (!i40e_hash_validate_rss_types (rss_act->types)) return rte_flow_error_set(error, EINVAL,
Signature · 1 line
2.27.0
Quoted 10 lines
-----Original Message-----
From: Yang, SteveX <[email protected]>
Sent: Friday, June 11, 2021 2:55 PM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Yang, SteveX <[email protected]>
Subject: [PATCH v2] net/i40e: fix set rss hash function invalid
Quoted 8 lines
i40e can support following rss hash function types: default/toeplitz, symmetric toeplitz, and
simple_xor. However, when filter engine parses pattern action, it only supports symmetric toeplitz & default.Add
simple_xorand toeplitz hash functions support when parsing pattern action.Fixes ef4c16fd9148 ("net/i40e: refactor RSS flow")
Why didn't CC stable?
Quoted 49 lines
Signed-off-by Steve Yang <[email protected]>---
v2:
- add the fix line.
- supportsimple_xorand toeplitz hash functions explicitly.drivers/net/i40e/i40e_hash.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)drivers/net/i40e/i40e_hash.c +2
-6@@ -1105,13 +1105,21 @@ i40e_hash_parse_pattern_act(const structrte_eth_dev *dev,NULL , "RSS Queues not supported when pattern specified"); -if (rss_act->func == RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) +switch (rss_act->func) { +case RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ : rss_conf->symmetric_enable = true; -else if (rss_act->func !=RTE_ETH_HASH_FUNCTION_DEFAULT ) - return rte_flow_error_set(error, -EINVAL, - RTE_FLOW_ERROR_TYPE_ACTION_CONF, - NULL, - "Only symmetric TOEPLITZsupported when pattern specified");
drivers/net/i40e/i40e_hash.c +12
-1+break ; +case RTE_ETH_HASH_FUNCTION_DEFAULT : +case RTE_ETH_HASH_FUNCTION_TOEPLITZ : +case RTE_ETH_HASH_FUNCTION_SIMPLE_XOR : +break ; +default : +return rte_flow_error_set (error,EINVAL , +RTE_FLOW_ERROR_TYPE_ACTION_CONF , +NULL , +"RSS hash function not supported " +"when pattern specified" ); + }if (!i40e_hash_validate_rss_types (rss_act->types)) return rte_flow_error_set(error, EINVAL, --2.27.0
PATCH v3 1/1 net/i40e: fix set rss hash function invalid
In reply to Steve Yangi40e can support following rss hash function types: default/toeplitz, symmetric toeplitz, and simple_xor. However, when filter engine parses pattern action, it only supports symmetric toeplitz & default.
Add simple_xor and toeplitz hash functions support when parsing pattern action.
---
v3:
- add Cc stable line.
v2:
- add the fix line.
- support simple_xor and toeplitz hash functions explicitly.
drivers/net/i40e/i40e_hash.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
drivers/net/i40e/i40e_hash.c +14 -6
@@ -1105,13 +1105,21 @@ i40e_hash_parse_pattern_act(const struct rte_eth_dev *dev,NULL , "RSS Queues not supported when pattern specified"); -if (rss_act->func ==RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ) +switch (rss_act->func) { +case RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ : rss_conf->symmetric_enable = true; -else if (rss_act->func !=RTE_ETH_HASH_FUNCTION_DEFAULT ) -return rte_flow_error_set (error, -EINVAL , -RTE_FLOW_ERROR_TYPE_ACTION_CONF , -NULL , -"Only symmetric TOEPLITZ supported when pattern specified" ); +break ; +case RTE_ETH_HASH_FUNCTION_DEFAULT : +case RTE_ETH_HASH_FUNCTION_TOEPLITZ : +case RTE_ETH_HASH_FUNCTION_SIMPLE_XOR : +break ; +default : +return rte_flow_error_set (error,EINVAL , +RTE_FLOW_ERROR_TYPE_ACTION_CONF , +NULL , +"RSS hash function not supported " +"when pattern specified" ); + }if (!i40e_hash_validate_rss_types (rss_act->types)) return rte_flow_error_set(error, EINVAL,
Signature · 1 line
2.27.0
Quoted 69 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Steve Yang
Sent: Monday, June 21, 2021 4:04 PM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Yang, SteveX <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH v3] net/i40e: fix set rss hash function invalidi40e can support following rss hash function types: default/toeplitz, symmetric toeplitz, and
simple_xor. However, when filter engine parses pattern action, it only supports symmetric toeplitz & default.Add
simple_xorand toeplitz hash functions support when parsing pattern action.Fixes ef4c16fd9148 ("net/i40e: refactor RSS flow")Signed-off-by Steve Yang <[email protected]>---
v3:
- add Cc stable line.
v2:
- add the fix line.
- supportsimple_xorand toeplitz hash functions explicitly.drivers/net/i40e/i40e_hash.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)drivers/net/i40e/i40e_hash.c +2
-6@@ -1105,13 +1105,21 @@ i40e_hash_parse_pattern_act(const structrte_eth_dev *dev,NULL , "RSS Queues not supported when pattern specified"); -if (rss_act->func == RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) +switch (rss_act->func) { +case RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ : rss_conf->symmetric_enable = true; -else if (rss_act->func !=RTE_ETH_HASH_FUNCTION_DEFAULT ) - return rte_flow_error_set(error, -EINVAL, - RTE_FLOW_ERROR_TYPE_ACTION_CONF, - NULL, - "Only symmetric TOEPLITZsupported when pattern specified");
drivers/net/i40e/i40e_hash.c +12
-1+break ; +case RTE_ETH_HASH_FUNCTION_DEFAULT : +case RTE_ETH_HASH_FUNCTION_TOEPLITZ : +case RTE_ETH_HASH_FUNCTION_SIMPLE_XOR : +break ; +default : +return rte_flow_error_set (error,EINVAL , +RTE_FLOW_ERROR_TYPE_ACTION_CONF , +NULL , +"RSS hash function not supported " +"when pattern specified" ); + }if (!i40e_hash_validate_rss_types (rss_act->types)) return rte_flow_error_set(error, EINVAL, --
Quoted 1 line
2.27.0
Zhang, Qi Z
AppliedQuoted 76 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Xing, Beilei
Sent: Monday, June 21, 2021 4:19 PM
To: Yang, SteveX <[email protected]>; [email protected]
Cc: Yang, SteveX <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH v3] net/i40e: fix set rss hash function invalidQuoted 35 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Steve Yang
Sent: Monday, June 21, 2021 4:04 PM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Yang, SteveX <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH v3] net/i40e: fix set rss hash function invalidi40e can support following rss hash function types: default/toeplitz, symmetric toeplitz, and
simple_xor. However, when filter engine parses pattern action, it only supports symmetric toeplitz & default.Add
simple_xorand toeplitz hash functions support when parsing pattern action.Fixes ef4c16fd9148 ("net/i40e: refactor RSS flow")Signed-off-by Steve Yang <[email protected]>---
v3:
- add Cc stable line.
v2:
- add the fix line.
- supportsimple_xorand toeplitz hash functions explicitly.drivers/net/i40e/i40e_hash.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)(quoted diff) +0
-0
b/drivers/net/i40e/i40e_hash.cindexb1cb24f437..0cef21c88f100644drivers/net/i40e/i40e_hash.c i40e_hash_parse_pattern_act(const struct · line 1107
Quoted 3 lines
drivers/net/i40e/i40e_hash.c +0
-0@@ -1105,13 +1105,21 @@ i40e_hash_parse_pattern_act(const struct rte_eth_dev *dev,NULL , "RSS Queues not supported when patternspecified");
Quoted 26 lines
drivers/net/i40e/i40e_hash.c +14
-6-if (rss_act->func == RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) +switch (rss_act->func) { +case RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ : rss_conf->symmetric_enable = true; -else if (rss_act->func !=RTE_ETH_HASH_FUNCTION_DEFAULT ) -return rte_flow_error_set (error, -EINVAL , -RTE_FLOW_ERROR_TYPE_ACTION_CONF , -NULL , - "Only symmetric TOEPLITZ supported when pattern specified"); + break; +case RTE_ETH_HASH_FUNCTION_DEFAULT : +case RTE_ETH_HASH_FUNCTION_TOEPLITZ : +case RTE_ETH_HASH_FUNCTION_SIMPLE_XOR : +break ; +default : +return rte_flow_error_set (error,EINVAL , +RTE_FLOW_ERROR_TYPE_ACTION_CONF , +NULL , +"RSS hash function not supported " +"when pattern specified" ); + }
Quoted 6 lines
Quoted 4 lines
drivers/net/i40e/i40e_hash.c +0
-1if (!i40e_hash_validate_rss_types (rss_act->types)) return rte_flow_error_set(error, EINVAL, --2.27.0
Acked-by Beilei Xing <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi