DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/ice: fix ACL filter uninit
@ 2025-02-21  8:25 Mingjin Ye
  2025-02-25  3:19 ` Li, HongboX
  2025-02-25 18:16 ` Medvedkin, Vladimir
  0 siblings, 2 replies; 3+ messages in thread
From: Mingjin Ye @ 2025-02-21  8:25 UTC (permalink / raw)
  To: dev; +Cc: Mingjin Ye, Bruce Richardson, Anatoly Burakov

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")

Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
---
 drivers/net/intel/ice/ice_acl_filter.c | 48 +++++++++++++-------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/drivers/net/intel/ice/ice_acl_filter.c b/drivers/net/intel/ice/ice_acl_filter.c
index 04c17a98ed..83cb3e36f9 100644
--- a/drivers/net/intel/ice/ice_acl_filter.c
+++ b/drivers/net/intel/ice/ice_acl_filter.c
@@ -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
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] net/ice: fix ACL filter uninit
  2025-02-21  8:25 [PATCH] net/ice: fix ACL filter uninit Mingjin Ye
@ 2025-02-25  3:19 ` Li, HongboX
  2025-02-25 18:16 ` Medvedkin, Vladimir
  1 sibling, 0 replies; 3+ messages in thread
From: Li, HongboX @ 2025-02-25  3:19 UTC (permalink / raw)
  To: dev; +Cc: Ye, MingjinX

> -----Original Message-----
> From: Mingjin Ye <mingjinx.ye@intel.com>
> Sent: Friday, February 21, 2025 4:25 PM
> To: dev@dpdk.org
> Cc: Ye, MingjinX <mingjinx.ye@intel.com>; Richardson, Bruce
> <bruce.richardson@intel.com>; Burakov, Anatoly
> <anatoly.burakov@intel.com>
> Subject: [PATCH] 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")
> 
> Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
> ---
Tested-by: Li, Hongbo <hongbox.li@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/ice: fix ACL filter uninit
  2025-02-21  8:25 [PATCH] net/ice: fix ACL filter uninit Mingjin Ye
  2025-02-25  3:19 ` Li, HongboX
@ 2025-02-25 18:16 ` Medvedkin, Vladimir
  1 sibling, 0 replies; 3+ messages in thread
From: Medvedkin, Vladimir @ 2025-02-25 18:16 UTC (permalink / raw)
  To: Mingjin Ye, dev; +Cc: Bruce Richardson, Anatoly Burakov

Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

On 21/02/2025 08:25, Mingjin Ye wrote:
> 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")
>
> Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
> ---
>   drivers/net/intel/ice/ice_acl_filter.c | 48 +++++++++++++-------------
>   1 file changed, 24 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/net/intel/ice/ice_acl_filter.c b/drivers/net/intel/ice/ice_acl_filter.c
> index 04c17a98ed..83cb3e36f9 100644
> --- a/drivers/net/intel/ice/ice_acl_filter.c
> +++ b/drivers/net/intel/ice/ice_acl_filter.c
> @@ -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

-- 
Regards,
Vladimir


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-25 18:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-21  8:25 [PATCH] net/ice: fix ACL filter uninit Mingjin Ye
2025-02-25  3:19 ` Li, HongboX
2025-02-25 18:16 ` Medvedkin, Vladimir

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).