net/iavf: fix rss algorithm configure issue
When configure rss rule, the etherdev rss hash function type should be mapped to the corresponding virtchnl rss algorithm type.
--- drivers/net/iavf/iavf_hash.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)
drivers/net/iavf/iavf_hash.c +11 -9
@@ -47,7 +47,7 @@ struct iavf_hash_match_type {struct iavf_rss_meta {struct virtchnl_proto_hdrs *proto_hdrs; -uint32_t hash_function; +enum virtchnl_rss_algorithm rss_algorithm; };struct iavf_hash_flow_cfg {
@@ -1001,13 +1001,15 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item,/* Check hash function and save it to rss_meta. */ if (rss->func ==RTE_ETH_HASH_FUNCTION_SIMPLE_XOR ) - rss_meta->hash_function = -RTE_ETH_HASH_FUNCTION_SIMPLE_XOR ; - -if (rss->func == -RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ) - rss_meta->hash_function = -RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ; + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_R_ASYMMETRIC ; +else if (rss->func == +RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ) + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC ; +else + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC ; type_match_item = rte_zmalloc("iavf_type_match_item",
@@ -1126,7 +1128,7 @@ iavf_hash_create(__rte_unused struct iavf_adapter *ad, } rss_cfg->proto_hdrs = *rss_meta->proto_hdrs; - rss_cfg->rss_algorithm = rss_meta->hash_function; + rss_cfg->rss_algorithm = rss_meta->rss_algorithm; ret =iavf_add_del_rss_cfg (ad, rss_cfg, true);if (!ret) {
Signature · 1 line
2.20.1
Quoted 37 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Sunday, May 10, 2020 4:28 AM
To: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>
Cc: Ye, Xiaolong <[email protected]>; [email protected]; Guo, Jia <[email protected]>
Subject: [dpdk-dev] net/iavf: fix rss algorithm configure issueWhen configure rss rule, the etherdev rss hash function type should be mapped to the corresponding virtchnl rss algorithm type.
Fixes 7be10c3004be ("net/iavf: add RSS configuration for VF")Signed-off-by Jeff Guo <[email protected]>--- drivers/net/iavf/iavf_hash.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)drivers/net/iavf/iavf_hash.c index renamed from drivers/net/iavf/iavf_hash.c +0
-0
6359ead76..173b7633f100644drivers/net/iavf/iavf_hash.c +1
-1@@ -47,7 +47,7 @@ struct iavf_hash_match_type {struct iavf_rss_meta {struct virtchnl_proto_hdrs *proto_hdrs; -uint32_t hash_function; +enum virtchnl_rss_algorithm rss_algorithm; };struct iavf_hash_flow_cfg {@@ -1001,13 +1001,15 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item,/* Check hash function and save it to rss_meta. */
drivers/net/iavf/iavf_hash.c iavf_hash_parse_action(struct · line 1006
Quoted 10 lines
drivers/net/iavf/iavf_hash.c +2
-7if (rss->func ==RTE_ETH_HASH_FUNCTION_SIMPLE_XOR ) - rss_meta->hash_function = -RTE_ETH_HASH_FUNCTION_SIMPLE_XOR ; - -if (rss->func == -RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ) - rss_meta->hash_function = -RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ; + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_R_ASYMMETRIC ;
RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ --> VIRTCHNL_RSS_ALG_R_ASYMMETRIC
Is it should be VIRTCHNL_RSS_ALG_XOR_SYMMETRIC?
Quoted 22 lines
drivers/net/iavf/iavf_hash.c +7
-0+else if (rss->func == +RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ) + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC ; +else + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC ; type_match_item =drivers/net/iavf/iavf_hash.c +1
-1rte_zmalloc("iavf_type_match_item",@@ -1126,7 +1128,7 @@ iavf_hash_create(__rte_unused struct iavf_adapter *ad, } rss_cfg->proto_hdrs = *rss_meta->proto_hdrs; - rss_cfg->rss_algorithm = rss_meta->hash_function; + rss_cfg->rss_algorithm = rss_meta->rss_algorithm; ret =iavf_add_del_rss_cfg (ad, rss_cfg, true);if (!ret) {
--
2.20.1
Quoted 46 lines
-----Original Message-----
From: Zhang, Qi Z
Sent: Tuesday, May 12, 2020 10:18 AM
To: Guo, Jia <[email protected]>; Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>
Cc: Ye, Xiaolong <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] net/iavf: fix rss algorithm configure issueQuoted 34 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Sunday, May 10, 2020 4:28 AM
To: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>
Cc: Ye, Xiaolong <[email protected]>; [email protected]; Guo, Jia <[email protected]>
Subject: [dpdk-dev] net/iavf: fix rss algorithm configure issueWhen configure rss rule, the etherdev rss hash function type should be mapped to the corresponding virtchnl rss algorithm type.
Fixes 7be10c3004be ("net/iavf: add RSS configuration for VF")Signed-off-by Jeff Guo <[email protected]>--- drivers/net/iavf/iavf_hash.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)(quoted diff) +0
-0
b/drivers/net/iavf/iavf_hash.cindex6359ead76..173b7633f100644drivers/net/iavf/iavf_hash.c +1
-1@@ -47,7 +47,7 @@ struct iavf_hash_match_type {struct iavf_rss_meta {struct virtchnl_proto_hdrs *proto_hdrs; -uint32_t hash_function; +enum virtchnl_rss_algorithm rss_algorithm; };struct iavf_hash_flow_cfg {@@ -1001,13 +1001,15 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item,
Quoted 14 lines
drivers/net/iavf/iavf_hash.c iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item, · line 1005
Quoted 11 lines
drivers/net/iavf/iavf_hash.c +2
-7/* Check hash function and save it to rss_meta. */ if (rss->func ==RTE_ETH_HASH_FUNCTION_SIMPLE_XOR ) - rss_meta->hash_function = -RTE_ETH_HASH_FUNCTION_SIMPLE_XOR ; - -if (rss->func == -RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ) - rss_meta->hash_function = -RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ; + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_R_ASYMMETRIC ;
RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ-->VIRTCHNL_RSS_ALG_R_ASYMMETRIC
A typo, it isRTE_ETH_HASH_FUNCTION_SIMPLE_XOR --> VIRTCHNL_RSS_ALG_R_ASYMMETRIC which looks not correct.
Quoted 27 lines
Is it should be
VIRTCHNL_RSS_ALG_XOR_SYMMETRIC?Quoted 22 lines
drivers/net/iavf/iavf_hash.c +7
-0+else if (rss->func == +RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ) + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC ; +else + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC ; type_match_item =drivers/net/iavf/iavf_hash.c +1
-1rte_zmalloc("iavf_type_match_item",@@ -1126,7 +1128,7 @@ iavf_hash_create(__rte_unused struct iavf_adapter *ad, } rss_cfg->proto_hdrs = *rss_meta->proto_hdrs; - rss_cfg->rss_algorithm = rss_meta->hash_function; + rss_cfg->rss_algorithm = rss_meta->rss_algorithm; ret =iavf_add_del_rss_cfg (ad, rss_cfg, true);if (!ret) {
--
2.20.1
hi, qi
Quoted 58 lines · Qi Z
Quoted 45 lines
-----Original Message-----
From: Zhang, Qi Z
Sent: Tuesday, May 12, 2020 10:18 AM
To: Guo, Jia <[email protected]>; Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>
Cc: Ye, Xiaolong <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] net/iavf: fix rss algorithm configure issueQuoted 34 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Sunday, May 10, 2020 4:28 AM
To: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>
Cc: Ye, Xiaolong <[email protected]>; [email protected]; Guo, Jia <[email protected]>
Subject: [dpdk-dev] net/iavf: fix rss algorithm configure issueWhen configure rss rule, the etherdev rss hash function type should be mapped to the corresponding virtchnl rss algorithm type.
Fixes 7be10c3004be ("net/iavf: add RSS configuration for VF")Signed-off-by Jeff Guo <[email protected]>--- drivers/net/iavf/iavf_hash.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)(quoted diff) +0
-0
b/drivers/net/iavf/iavf_hash.cindex6359ead76..173b7633f100644drivers/net/iavf/iavf_hash.c +1
-1@@ -47,7 +47,7 @@ struct iavf_hash_match_type {struct iavf_rss_meta {struct virtchnl_proto_hdrs *proto_hdrs; -uint32_t hash_function; +enum virtchnl_rss_algorithm rss_algorithm; };struct iavf_hash_flow_cfg {@@ -1001,13 +1001,15 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item,Quoted 13 lines
drivers/net/iavf/iavf_hash.c iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item, · line 1005
Quoted 11 lines
drivers/net/iavf/iavf_hash.c +2
-7/* Check hash function and save it to rss_meta. */ if (rss->func ==RTE_ETH_HASH_FUNCTION_SIMPLE_XOR ) - rss_meta->hash_function = -RTE_ETH_HASH_FUNCTION_SIMPLE_XOR ; - -if (rss->func == -RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ) - rss_meta->hash_function = -RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ; + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_R_ASYMMETRIC ;
RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ-->VIRTCHNL_RSS_ALG_R_ASYMMETRIC
Quoted 5 lines
A typo, it is
RTE_ETH_HASH_FUNCTION_SIMPLE_XOR-->VIRTCHNL_RSS_ALG_R_ASYMMETRICwhich looks not correct.Quoted 3 lines
Is it should be
VIRTCHNL_RSS_ALG_XOR_SYMMETRIC?
At currently driver, VIRTCHNL_RSS_ALG_R_ASYMMETRIC is used to identify simple XOR.
Quoted 22 lines
Quoted 22 lines
Quoted 22 lines
drivers/net/iavf/iavf_hash.c +7
-0+else if (rss->func == +RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ) + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC ; +else + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC ; type_match_item =rte_zmalloc("iavf_type_match_item",
drivers/net/iavf/iavf_hash.c +1
-1@@ -1126,7 +1128,7 @@ iavf_hash_create(__rte_unused struct iavf_adapter *ad, } rss_cfg->proto_hdrs = *rss_meta->proto_hdrs; - rss_cfg->rss_algorithm = rss_meta->hash_function; + rss_cfg->rss_algorithm = rss_meta->rss_algorithm; ret =iavf_add_del_rss_cfg (ad, rss_cfg, true);if (!ret) {
--
2.20.1
Quoted 74 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Wednesday, May 13, 2020 7:20 AM
To: Zhang, Qi Z <[email protected]>; Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>
Cc: Ye, Xiaolong <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] net/iavf: fix rss algorithm configure issuehi, qi
Quoted 41 lines · Qi Z
Quoted 41 lines
-----Original Message-----
From: Zhang, Qi Z
Sent: Tuesday, May 12, 2020 10:18 AM
To: Guo, Jia <[email protected]>; Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>
Cc: Ye, Xiaolong <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] net/iavf: fix rss algorithm configure issueQuoted 30 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Sunday, May 10, 2020 4:28 AM
To: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>
Cc: Ye, Xiaolong <[email protected]>; [email protected]; Guo, Jia <[email protected]>
Subject: [dpdk-dev] net/iavf: fix rss algorithm configure issueWhen configure rss rule, the etherdev rss hash function type should be mapped to the corresponding virtchnl rss algorithm type.
Fixes 7be10c3004be ("net/iavf: add RSS configuration for VF")Signed-off-by Jeff Guo <[email protected]>--- drivers/net/iavf/iavf_hash.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)(quoted diff) +0
-0
b/drivers/net/iavf/iavf_hash.cindex6359ead76..173b7633f100644drivers/net/iavf/iavf_hash.c +1
-1@@ -47,7 +47,7 @@ struct iavf_hash_match_type {struct iavf_rss_meta {struct virtchnl_proto_hdrs *proto_hdrs; -uint32_t hash_function; +enum virtchnl_rss_algorithm rss_algorithm; };Quoted 6 lines
Quoted 6 lines
drivers/net/iavf/iavf_hash.c iavf_hash_parse_action(struct · line 1004
Quoted 6 lines
drivers/net/iavf/iavf_hash.c +0
-0struct iavf_hash_flow_cfg {@@ -1001,13 +1001,15 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item,/* Check hash function and save it to rss_meta. */ if (rss->func ==
RTE_ETH_HASH_FUNCTION_SIMPLE_XOR)Quoted 11 lines
Quoted 11 lines
drivers/net/iavf/iavf_hash.c iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item, · line 1005
Quoted 9 lines
drivers/net/iavf/iavf_hash.c +2
-7- rss_meta->hash_function = -RTE_ETH_HASH_FUNCTION_SIMPLE_XOR ; - -if (rss->func == -RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ) - rss_meta->hash_function = -RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ; + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_R_ASYMMETRIC ;
RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ-->VIRTCHNL_RSS_ALG_R_ASYMMETRICQuoted 2 lines
A typo, it is
RTE_ETH_HASH_FUNCTION_SIMPLE_XOR-->
Quoted 7 lines
VIRTCHNL_RSS_ALG_R_ASYMMETRICwhich looks not correct.Quoted 3 lines
Quoted 3 lines
Is it should be
VIRTCHNL_RSS_ALG_XOR_SYMMETRIC?At currently driver,
VIRTCHNL_RSS_ALG_R_ASYMMETRICis used to identify simple XOR.
I didn't get it..
After apply your patch, we have below code which does not make sense,
/* Check hash function and save it to rss_meta. */ if (rss->func == RTE_ETH_HASH_FUNCTION_SIMPLE_XOR)
rss_meta->rss_algorithm = VIRTCHNL_RSS_ALG_R_ASYMMETRIC;
else if...
ASYMMETRIC is not kind of symmetric hash and should not be mapped to simple xor.
Quoted 25 lines
Quoted 4 lines
Quoted 4 lines
drivers/net/iavf/iavf_hash.c iavf_hash_parse_action(struct · line 1008
Quoted 4 lines
drivers/net/iavf/iavf_hash.c +2
-0+ else if (rss->func == +
RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ)Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
drivers/net/iavf/iavf_hash.c +5
-0+ rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC ; + else + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC ; type_match_item =rte_zmalloc("iavf_type_match_item",
drivers/net/iavf/iavf_hash.c +1
-1@@ -1126,7 +1128,7 @@ iavf_hash_create(__rte_unused struct iavf_adapter *ad, } rss_cfg->proto_hdrs = *rss_meta->proto_hdrs; - rss_cfg->rss_algorithm = rss_meta->hash_function; + rss_cfg->rss_algorithm = rss_meta->rss_algorithm; ret =iavf_add_del_rss_cfg (ad, rss_cfg, true);if (!ret) {
--
2.20.1
hi, qi
Quoted 81 lines · Qi Z
Quoted 70 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Wednesday, May 13, 2020 7:20 AM
To: Zhang, Qi Z <[email protected]>; Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>
Cc: Ye, Xiaolong <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] net/iavf: fix rss algorithm configure issuehi, qi
Quoted 40 lines · Qi Z
Quoted 40 lines
-----Original Message-----
From: Zhang, Qi Z
Sent: Tuesday, May 12, 2020 10:18 AM
To: Guo, Jia <[email protected]>; Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>
Cc: Ye, Xiaolong <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] net/iavf: fix rss algorithm configure issueQuoted 30 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Sunday, May 10, 2020 4:28 AM
To: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>
Cc: Ye, Xiaolong <[email protected]>; [email protected]; Guo, Jia <[email protected]>
Subject: [dpdk-dev] net/iavf: fix rss algorithm configure issueWhen configure rss rule, the etherdev rss hash function type should be mapped to the corresponding virtchnl rss algorithm type.
Fixes 7be10c3004be ("net/iavf: add RSS configuration for VF")Signed-off-by Jeff Guo <[email protected]>--- drivers/net/iavf/iavf_hash.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)(quoted diff) +0
-0
b/drivers/net/iavf/iavf_hash.cindex6359ead76..173b7633f100644drivers/net/iavf/iavf_hash.c +1
-1@@ -47,7 +47,7 @@ struct iavf_hash_match_type {struct iavf_rss_meta {struct virtchnl_proto_hdrs *proto_hdrs; -uint32_t hash_function; +enum virtchnl_rss_algorithm rss_algorithm; };Quoted 6 lines
Quoted 6 lines
drivers/net/iavf/iavf_hash.c iavf_hash_parse_action(struct · line 1004
Quoted 6 lines
drivers/net/iavf/iavf_hash.c +0
-0struct iavf_hash_flow_cfg {@@ -1001,13 +1001,15 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item,/* Check hash function and save it to rss_meta. */ if (rss->func ==
RTE_ETH_HASH_FUNCTION_SIMPLE_XOR)Quoted 11 lines
Quoted 11 lines
drivers/net/iavf/iavf_hash.c iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item, · line 1005
Quoted 9 lines
drivers/net/iavf/iavf_hash.c +2
-7- rss_meta->hash_function = -RTE_ETH_HASH_FUNCTION_SIMPLE_XOR ; - -if (rss->func == -RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ) - rss_meta->hash_function = -RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ; + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_R_ASYMMETRIC ;
RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ-->VIRTCHNL_RSS_ALG_R_ASYMMETRICQuoted 8 lines
Quoted 2 lines
A typo, it is
RTE_ETH_HASH_FUNCTION_SIMPLE_XOR-->
VIRTCHNL_RSS_ALG_R_ASYMMETRICwhich looks not correct.Quoted 3 lines
Quoted 3 lines
Is it should be
VIRTCHNL_RSS_ALG_XOR_SYMMETRIC?At currently driver,
VIRTCHNL_RSS_ALG_R_ASYMMETRICis used to identify simple XOR.I didn't get it..
After apply your patch, we have below code which does not make sense,
Quoted 8 lines
/* Check hash function and save it to
rss_meta. */ if (rss->func==RTE_ETH_HASH_FUNCTION_SIMPLE_XOR)rss_meta->rss_algorithm = VIRTCHNL_RSS_ALG_R_ASYMMETRIC;else if...
ASYMMETRIC is not kind of symmetric hash and should not be mapped to simple xor.
This is a typo, VIRTCHNL_RSS_ALG_R_ASYMMETRIC should be VIRTCHNL_RSS_ALG_XOR_ASYMMETRIC and it should
means simple XOR, but VIRTCHNL_RSS_ALG_XOR_SYMMETRIC means symmetric xor. A type fix will send by v2 to make it clear.
Quoted 24 lines
Quoted 24 lines
Quoted 3 lines
Quoted 3 lines
drivers/net/iavf/iavf_hash.c iavf_hash_parse_action(struct · line 1008
Quoted 3 lines
drivers/net/iavf/iavf_hash.c +2
-0+ else if (rss->func == +
RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ)Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
drivers/net/iavf/iavf_hash.c +5
-0+ rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC ; + else + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC ; type_match_item =rte_zmalloc("iavf_type_match_item",
drivers/net/iavf/iavf_hash.c +1
-1@@ -1126,7 +1128,7 @@ iavf_hash_create(__rte_unused struct iavf_adapter *ad, } rss_cfg->proto_hdrs = *rss_meta->proto_hdrs; - rss_cfg->rss_algorithm = rss_meta->hash_function; + rss_cfg->rss_algorithm = rss_meta->rss_algorithm; ret =iavf_add_del_rss_cfg (ad, rss_cfg, true);if (!ret) {--
2.20.1
PATCH v2 1/2 common/iavf: fix typo of rss algorithm type
In reply to Jeff GuoA typo need to be fixd for Simple XOR algorithm configuration.
---
v2: fix a typo for xor.
--- drivers/common/iavf/virtchnl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/common/iavf/virtchnl.h +1 -1
@@ -551,7 +551,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_rss_hena);/* Type of RSS algorithm */ enum virtchnl_rss_algorithm {VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC =0 , -VIRTCHNL_RSS_ALG_R_ASYMMETRIC =1 , +VIRTCHNL_RSS_ALG_XOR_ASYMMETRIC =1 ,VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC =2 ,VIRTCHNL_RSS_ALG_XOR_SYMMETRIC =3 , };
Signature · 1 line
2.20.1
PATCH v2 2/2 net/iavf: fix rss algorithm configure issue
When configure rss rule, the etherdev rss hash function type should be mapped to the corresponding virtchnl rss algorithm type.
---v2->v1:
fix a type for xor.
--- drivers/net/iavf/iavf_hash.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)
drivers/net/iavf/iavf_hash.c +11 -9
@@ -47,7 +47,7 @@ struct iavf_hash_match_type {struct iavf_rss_meta {struct virtchnl_proto_hdrs *proto_hdrs; -uint32_t hash_function; +enum virtchnl_rss_algorithm rss_algorithm; };struct iavf_hash_flow_cfg {
@@ -1001,13 +1001,15 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item,/* Check hash function and save it to rss_meta. */ if (rss->func ==RTE_ETH_HASH_FUNCTION_SIMPLE_XOR ) - rss_meta->hash_function = -RTE_ETH_HASH_FUNCTION_SIMPLE_XOR ; - -if (rss->func == -RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ) - rss_meta->hash_function = -RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ; + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_XOR_ASYMMETRIC ; +else if (rss->func == +RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ) + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC ; +else + rss_meta->rss_algorithm = +VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC ; type_match_item = rte_zmalloc("iavf_type_match_item",
@@ -1126,7 +1128,7 @@ iavf_hash_create(__rte_unused struct iavf_adapter *ad, } rss_cfg->proto_hdrs = *rss_meta->proto_hdrs; - rss_cfg->rss_algorithm = rss_meta->hash_function; + rss_cfg->rss_algorithm = rss_meta->rss_algorithm; ret =iavf_add_del_rss_cfg (ad, rss_cfg, true);if (!ret) {
Signature · 1 line
2.20.1
Quoted 11 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Thursday, May 14, 2020 4:21 AM
To: Xing, Beilei <[email protected]>; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>
Cc: [email protected]; Guo, Jia <[email protected]>
Subject: [dpdk-dev v2 2/2] net/iavf: fix rss algorithm configure issue
Quoted 5 lines
When configure rss rule, the etherdev rss hash function type should be mapped to the corresponding virtchnl rss algorithm type.
Fixes 7be10c3004be ("net/iavf: add RSS configuration for VF")Signed-off-by Jeff Guo <[email protected]>
Ye Xiaolong
AppliedQuoted 11 lines · Qi Z
Quoted 11 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Thursday, May 14, 2020 4:21 AM
To: Xing, Beilei <[email protected]>; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>
Cc: [email protected]; Guo, Jia <[email protected]>
Subject: [dpdk-dev v2 2/2] net/iavf: fix rss algorithm configure issue
Quoted 8 lines
Quoted 5 lines
When configure rss rule, the etherdev rss hash function type should be mapped to the corresponding virtchnl rss algorithm type.
Fixes 7be10c3004be ("net/iavf: add RSS configuration for VF")Signed-off-by Jeff Guo <[email protected]>Acked-by Qi Zhang <[email protected]>
Applied to dpdk-next-net-intel, Thanks.
Re: [dpdk-dev] [dpdk-dev v2 1/2] common/iavf: fix typo of rss algorithm type
In reply to Jeff GuoQuoted 25 lines · Jeff Guo
A typo need to be fixd for Simple XOR algorithm configuration.
Signed-off-by Jeff Guo <[email protected]>---
v2: fix a typo for xor.
---drivers/common/iavf/virtchnl.h| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/common/iavf/virtchnl.h +1
-1@@ -551,7 +551,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_rss_hena);/* Type of RSS algorithm */ enum virtchnl_rss_algorithm {VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC =0 , -VIRTCHNL_RSS_ALG_R_ASYMMETRIC =1 , +VIRTCHNL_RSS_ALG_XOR_ASYMMETRIC =1 ,VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC =2 ,VIRTCHNL_RSS_ALG_XOR_SYMMETRIC =3 , };Signature · 1 line
2.20.1
Ye Xiaolong
AppliedRe: [dpdk-dev] [dpdk-dev v2 1/2] common/iavf: fix typo of rss algorithm type
In reply to Jeff GuoQuoted 25 lines · Jeff Guo
A typo need to be fixd for Simple XOR algorithm configuration.
Signed-off-by Jeff Guo <[email protected]>---
v2: fix a typo for xor.
---drivers/common/iavf/virtchnl.h| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/common/iavf/virtchnl.h +1
-1@@ -551,7 +551,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_rss_hena);/* Type of RSS algorithm */ enum virtchnl_rss_algorithm {VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC =0 , -VIRTCHNL_RSS_ALG_R_ASYMMETRIC =1 , +VIRTCHNL_RSS_ALG_XOR_ASYMMETRIC =1 ,VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC =2 ,VIRTCHNL_RSS_ALG_XOR_SYMMETRIC =3 , };Signature · 1 line
2.20.1
Applied to dpdk-next-net-intel, Thanks.