Skip to contentSkip to conversation

net/ice: fix ACL filter uninit

PATCH Applied Mingjin Ye 4 participants 4 messages Feb 21, 2025 – Feb 28, 2025 Network drivers

lore
Share & tools
lore

Mingjin Ye

author
#0 lore raw

PATCH 1/1 net/ice: fix ACL filter uninit

The pf has enabled the ACL filter, so uninit is no longer limited to the DCF.

Fixes a9d612291c2d ("net/ice: support IPv4 fragments in ACL filters")
---
 drivers/net/intel/ice/ice_acl_filter.c | 48 +++++++++++++-------------
 1 file changed, 24 insertions(+), 24 deletions(-)
drivers/net/intel/ice/ice_acl_filter.c +24 -24
index 04c17a98ed..83cb3e36f9 100644
@@ -278,26 +278,28 @@ ice_acl_prof_init(struct ice_pf *pf)
 	if (ret)
 		goto err_add_prof_ipv4_sctp;
 
-	for (i = 0; i < pf->main_vsi->idx; i++) {
-		ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4, i);
-		if (ret)
-			goto err_assoc_prof;
-
-		ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4_frag, i);
-		if (ret)
-			goto err_assoc_prof;
-
-		ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4_udp, i);
-		if (ret)
-			goto err_assoc_prof;
-
-		ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4_tcp, i);
-		if (ret)
-			goto err_assoc_prof;
-
-		ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4_sctp, i);
-		if (ret)
-			goto err_assoc_prof;
+	if (hw->dcf_enabled) {
+		for (i = 0; i < pf->main_vsi->idx; i++) {
+			ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4, i);
+			if (ret)
+				goto err_assoc_prof;
+
+			ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4_frag, i);
+			if (ret)
+				goto err_assoc_prof;
+
+			ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4_udp, i);
+			if (ret)
+				goto err_assoc_prof;
+
+			ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4_tcp, i);
+			if (ret)
+				goto err_assoc_prof;
+
+			ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4_sctp, i);
+			if (ret)
+				goto err_assoc_prof;
+		}
 	}
 	return 0;
 
@@ -1082,10 +1084,8 @@ ice_acl_uninit(struct ice_adapter *ad)
 	struct ice_pf *pf = &ad->pf;
 	struct ice_hw *hw = ICE_PF_TO_HW(pf);
 
-	if (ad->hw.dcf_enabled) {
-		ice_deinit_acl(pf);
-		ice_acl_prof_free(hw);
-	}
+	ice_deinit_acl(pf);
+	ice_acl_prof_free(hw);
 }
 
 static struct
Signature · 1 line
2.25.1
Tested-by on v1 1/1
#1 lore raw
Quoted 9 lines

-----Original Message-----
From: Mingjin Ye <[email protected]>
Sent: Friday, February 21, 2025 4:25 PM
To: [email protected]
Cc: Ye, MingjinX <[email protected]>; Richardson, Bruce <[email protected]>; Burakov, Anatoly <[email protected]>
Subject: [PATCH] net/ice: fix ACL filter uninit

Quoted 6 lines

The pf has enabled the ACL filter, so uninit is no longer limited to the DCF.

Fixes a9d612291c2d ("net/ice: support IPv4 fragments in ACL filters")

---

Acked-by on v1 1/1
#2 lore raw
In reply to Mingjin Ye
Quoted 76 lines · Mingjin Ye

The pf has enabled the ACL filter, so uninit is no longer limited to the DCF.

Fixes a9d612291c2d ("net/ice: support IPv4 fragments in ACL filters")
---
  drivers/net/intel/ice/ice_acl_filter.c | 48 +++++++++++++-------------
  1 file changed, 24 insertions(+), 24 deletions(-)
drivers/net/intel/ice/ice_acl_filter.c +24 -24
index 04c17a98ed..83cb3e36f9 100644
@@ -278,26 +278,28 @@ ice_acl_prof_init(struct ice_pf *pf)
  	if (ret)
  		goto err_add_prof_ipv4_sctp;
 
-	for (i = 0; i < pf->main_vsi->idx; i++) {
-		ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4, i);
-		if (ret)
-			goto err_assoc_prof;
-
-		ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4_frag, i);
-		if (ret)
-			goto err_assoc_prof;
-
-		ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4_udp, i);
-		if (ret)
-			goto err_assoc_prof;
-
-		ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4_tcp, i);
-		if (ret)
-			goto err_assoc_prof;
-
-		ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4_sctp, i);
-		if (ret)
-			goto err_assoc_prof;
+	if (hw->dcf_enabled) {
+		for (i = 0; i < pf->main_vsi->idx; i++) {
+			ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4, i);
+			if (ret)
+				goto err_assoc_prof;
+
+			ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4_frag, i);
+			if (ret)
+				goto err_assoc_prof;
+
+			ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4_udp, i);
+			if (ret)
+				goto err_assoc_prof;
+
+			ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4_tcp, i);
+			if (ret)
+				goto err_assoc_prof;
+
+			ret = ice_flow_assoc_prof(hw, ICE_BLK_ACL, prof_ipv4_sctp, i);
+			if (ret)
+				goto err_assoc_prof;
+		}
  	}
  	return 0;
 
@@ -1082,10 +1084,8 @@ ice_acl_uninit(struct ice_adapter *ad)
  	struct ice_pf *pf = &ad->pf;
  	struct ice_hw *hw = ICE_PF_TO_HW(pf);
 
-	if (ad->hw.dcf_enabled) {
-		ice_deinit_acl(pf);
-		ice_acl_prof_free(hw);
-	}
+	ice_deinit_acl(pf);
+	ice_acl_prof_free(hw);
  }
 
  static struct
Signature · 2 lines
Regards,
Vladimir
#3 lore raw
Quoted 13 lines · Vladimir
Quoted 10 lines · Mingjin Ye

The pf has enabled the ACL filter, so uninit is no longer limited to the DCF.

Fixes a9d612291c2d ("net/ice: support IPv4 fragments in ACL filters")
---
  drivers/net/intel/ice/ice_acl_filter.c | 48 +++++++++++++-------------
  1 file changed, 24 insertions(+), 24 deletions(-)

Applied to dpdk-next-net-intel

Thanks,
/Bruce