DPDK patches and discussions
 help / color / mirror / Atom feed
From: Mingjin Ye <mingjinx.ye@intel.com>
To: dev@dpdk.org
Cc: Mingjin Ye <mingjinx.ye@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Anatoly Burakov <anatoly.burakov@intel.com>
Subject: [PATCH] net/ice: fix ACL filter uninit
Date: Fri, 21 Feb 2025 08:25:09 +0000	[thread overview]
Message-ID: <20250221082510.332677-1-mingjinx.ye@intel.com> (raw)

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


                 reply	other threads:[~2025-02-21  8:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250221082510.332677-1-mingjinx.ye@intel.com \
    --to=mingjinx.ye@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).