Skip to contentSkip to conversation

net/ice: change RSS rule destroy API

PATCH Superseded Simei Su 3 participants 4 messages Nov 6, 2019 – Nov 12, 2019 Network drivers

lore
Share & tools
lore

Simei Su

author
#0 lore raw

PATCH 1/1 net/ice: change RSS rule destroy API

This patch changes RSS rule destroy API from ice_rem_vsi_rss_cfg() to ice_rem_rss_cfg(). ice_rem_vsi_rss_cfg() removes RSS configurations associated with VSI. ice_rem_rss_cfg() remove an existing RSS configuration with matching hashed fields. To support input set change, we should adopt ice_rem_rss_cfg(). This patch also fixes logic error otherwise ice_rem_rss_cfg() is never be carried out.

Fixes 5ad3db8d4bdd ("net/ice: enable advanced RSS")
---
 drivers/net/ice/ice_hash.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ice/ice_hash.c +3 -1
index 3381b45..ba83a12 100644
@@ -464,6 +464,7 @@ struct ice_hash_match_type ice_hash_type_list[] = {
 				"No memory for filter_ptr");
 		return -ENOMEM;
 	}
+	filter_ptr->symm = 1;
 
 	if (hash_function == RTE_ETH_HASH_FUNCTION_SIMPLE_XOR) {
 		/* Enable registers for simple_xor hash function. */
@@ -528,7 +529,8 @@ struct ice_hash_match_type ice_hash_type_list[] = {
 			(1 << VSIQF_HASH_CTL_HASH_SCHEME_S);
 		ICE_WRITE_REG(hw, VSIQF_HASH_CTL(vsi->vsi_id), reg);
 	} else {
-		ret = ice_rem_vsi_rss_cfg(hw, vsi->idx);
+		ret = ice_rem_rss_cfg(hw, vsi->idx,
+			filter_ptr->hashed_flds, filter_ptr->packet_hdr);
 		if (ret) {
 			rte_flow_error_set(error, EINVAL,
 					RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
Signature · 1 line
1.8.3.1
author
#1 lore raw

PATCH v2 1/1 net/ice: fix RSS rule destroy

This patch changes RSS rule destroy interface from ice_rem_vsi_rss_cfg() to ice_rem_rss_cfg(). To coordinate with input set change, it should destroy a specific flow rule but not all vsi cfg.

Fixes 5ad3db8d4bdd ("net/ice: enable advanced RSS")
---
 drivers/net/ice/ice_hash.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ice/ice_hash.c +2 -1
index 8dc3146..57e7d55 100644
@@ -530,7 +530,8 @@ struct ice_hash_match_type ice_hash_type_list[] = {
 			(1 << VSIQF_HASH_CTL_HASH_SCHEME_S);
 		ICE_WRITE_REG(hw, VSIQF_HASH_CTL(vsi->vsi_id), reg);
 	} else {
-		ret = ice_rem_vsi_rss_cfg(hw, vsi->idx);
+		ret = ice_rem_rss_cfg(hw, vsi->idx,
+			filter_ptr->hashed_flds, filter_ptr->packet_hdr);
 		if (ret) {
 			rte_flow_error_set(error, EINVAL,
 					RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
Signature · 1 line
1.8.3.1
Acked-by on v2 1/1
#2 lore raw

Re: [dpdk-dev] [PATCH v2] net/ice: fix RSS rule destroy

Quoted 10 lines

-----Original Message-----
From: Su, Simei <[email protected]>
Sent: Monday, November 11, 2019 3:55 PM
To: Zhang, Qi Z <[email protected]>; Xing, Beilei <[email protected]>; Ye, Xiaolong <[email protected]>
Cc: [email protected]; Su, Simei <[email protected]>
Subject: [PATCH v2] net/ice: fix RSS rule destroy

Quoted 7 lines

This patch changes RSS rule destroy interface from ice_rem_vsi_rss_cfg() to ice_rem_rss_cfg(). To coordinate with input set change, it should destroy a specific flow rule but not all vsi cfg.

Fixes 5ad3db8d4bdd ("net/ice: enable advanced RSS")
Applied
#3 lore raw

Re: [dpdk-dev] [PATCH v2] net/ice: fix RSS rule destroy

In reply to Simei Su
Quoted 28 lines · Simei Su

This patch changes RSS rule destroy interface from ice_rem_vsi_rss_cfg() to ice_rem_rss_cfg(). To coordinate with input set change, it should destroy a specific flow rule but not all vsi cfg.

Fixes 5ad3db8d4bdd ("net/ice: enable advanced RSS")

---
drivers/net/ice/ice_hash.c | 3 ++-

1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ice/ice_hash.c +2 -1
index 8dc3146..57e7d55 100644
@@ -530,7 +530,8 @@ struct ice_hash_match_type ice_hash_type_list[] = {
 			(1 << VSIQF_HASH_CTL_HASH_SCHEME_S);
 		ICE_WRITE_REG(hw, VSIQF_HASH_CTL(vsi->vsi_id), reg);
 	} else {
-		ret = ice_rem_vsi_rss_cfg(hw, vsi->idx);
+		ret = ice_rem_rss_cfg(hw, vsi->idx,
+			filter_ptr->hashed_flds, filter_ptr->packet_hdr);
 		if (ret) {
 			rte_flow_error_set(error, EINVAL,
 					RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
Signature · 1 line
1.8.3.1

Applied to dpdk-next-net-intel. Thanks.