From: Marcin Szycik <marcin.szycik@linux.intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, sandeep.penigalapati@intel.com,
ananth.s@intel.com, alexander.duyck@gmail.com,
Marcin Szycik <marcin.szycik@linux.intel.com>,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>
Subject: [Intel-wired-lan] [PATCH iwl-next v2 09/10] ice: re-introduce ice_dealloc_flow_entry() helper
Date: Thu, 9 Apr 2026 14:00:02 +0200 [thread overview]
Message-ID: <20260409120003.2719-10-marcin.szycik@linux.intel.com> (raw)
In-Reply-To: <20260409120003.2719-1-marcin.szycik@linux.intel.com>
It was removed in commit ad667d626825 ("ice: remove null checks before
devm_kfree() calls"). Now it's useful again.
Signed-off-by: Marcin Szycik <marcin.szycik@linux.intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
---
v2:
* Add this patch
---
drivers/net/ethernet/intel/ice/ice_flow.c | 33 ++++++++++++++---------
1 file changed, 20 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_flow.c b/drivers/net/ethernet/intel/ice/ice_flow.c
index 144d8326d4f9..20ee85b0bcf0 100644
--- a/drivers/net/ethernet/intel/ice/ice_flow.c
+++ b/drivers/net/ethernet/intel/ice/ice_flow.c
@@ -1589,6 +1589,23 @@ ice_flow_find_prof_id(struct ice_hw *hw, enum ice_block blk, u64 prof_id)
return NULL;
}
+/**
+ * ice_dealloc_flow_entry - Deallocate flow entry memory
+ * @hw: pointer to the HW struct
+ * @entry: flow entry to be removed
+ */
+static void
+ice_dealloc_flow_entry(struct ice_hw *hw, struct ice_flow_entry *entry)
+{
+ if (!entry)
+ return;
+
+ kfree(entry->entry);
+ kfree(entry->range_buf);
+ kfree(entry->acts);
+ devm_kfree(ice_hw_to_dev(hw), entry);
+}
+
/**
* ice_flow_get_hw_prof - return the HW profile for a specific profile ID handle
* @hw: pointer to the HW struct
@@ -1760,11 +1777,7 @@ static int ice_flow_rem_entry_sync(struct ice_hw *hw, enum ice_block blk,
}
list_del(&entry->l_entry);
-
- kfree(entry->entry);
- kfree(entry->range_buf);
- kfree(entry->acts);
- devm_kfree(ice_hw_to_dev(hw), entry);
+ ice_dealloc_flow_entry(hw, entry);
return 0;
}
@@ -2899,10 +2912,7 @@ static int ice_flow_acl_add_scen_entry_sync(struct ice_hw *hw,
/* As we don't add the new entry to our SW DB, deallocate its
* memories, and return the exist entry to the caller
*/
- kfree(e->entry);
- kfree(e->range_buf);
- kfree(e->acts);
- devm_kfree(ice_hw_to_dev(hw), e);
+ ice_dealloc_flow_entry(hw, e);
*entry = exist;
}
out:
@@ -3021,10 +3031,7 @@ int ice_flow_add_entry(struct ice_hw *hw, enum ice_block blk, u64 prof_id,
out:
if (status && e) {
- kfree(e->entry);
- kfree(e->range_buf);
- kfree(e->acts);
- devm_kfree(ice_hw_to_dev(hw), e);
+ ice_dealloc_flow_entry(hw, e);
}
return status;
--
2.49.0
WARNING: multiple messages have this Message-ID (diff)
From: Marcin Szycik <marcin.szycik@linux.intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, sandeep.penigalapati@intel.com,
ananth.s@intel.com, alexander.duyck@gmail.com,
Marcin Szycik <marcin.szycik@linux.intel.com>,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>
Subject: [PATCH iwl-next v2 09/10] ice: re-introduce ice_dealloc_flow_entry() helper
Date: Thu, 9 Apr 2026 14:00:02 +0200 [thread overview]
Message-ID: <20260409120003.2719-10-marcin.szycik@linux.intel.com> (raw)
In-Reply-To: <20260409120003.2719-1-marcin.szycik@linux.intel.com>
It was removed in commit ad667d626825 ("ice: remove null checks before
devm_kfree() calls"). Now it's useful again.
Signed-off-by: Marcin Szycik <marcin.szycik@linux.intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
---
v2:
* Add this patch
---
drivers/net/ethernet/intel/ice/ice_flow.c | 33 ++++++++++++++---------
1 file changed, 20 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_flow.c b/drivers/net/ethernet/intel/ice/ice_flow.c
index 144d8326d4f9..20ee85b0bcf0 100644
--- a/drivers/net/ethernet/intel/ice/ice_flow.c
+++ b/drivers/net/ethernet/intel/ice/ice_flow.c
@@ -1589,6 +1589,23 @@ ice_flow_find_prof_id(struct ice_hw *hw, enum ice_block blk, u64 prof_id)
return NULL;
}
+/**
+ * ice_dealloc_flow_entry - Deallocate flow entry memory
+ * @hw: pointer to the HW struct
+ * @entry: flow entry to be removed
+ */
+static void
+ice_dealloc_flow_entry(struct ice_hw *hw, struct ice_flow_entry *entry)
+{
+ if (!entry)
+ return;
+
+ kfree(entry->entry);
+ kfree(entry->range_buf);
+ kfree(entry->acts);
+ devm_kfree(ice_hw_to_dev(hw), entry);
+}
+
/**
* ice_flow_get_hw_prof - return the HW profile for a specific profile ID handle
* @hw: pointer to the HW struct
@@ -1760,11 +1777,7 @@ static int ice_flow_rem_entry_sync(struct ice_hw *hw, enum ice_block blk,
}
list_del(&entry->l_entry);
-
- kfree(entry->entry);
- kfree(entry->range_buf);
- kfree(entry->acts);
- devm_kfree(ice_hw_to_dev(hw), entry);
+ ice_dealloc_flow_entry(hw, entry);
return 0;
}
@@ -2899,10 +2912,7 @@ static int ice_flow_acl_add_scen_entry_sync(struct ice_hw *hw,
/* As we don't add the new entry to our SW DB, deallocate its
* memories, and return the exist entry to the caller
*/
- kfree(e->entry);
- kfree(e->range_buf);
- kfree(e->acts);
- devm_kfree(ice_hw_to_dev(hw), e);
+ ice_dealloc_flow_entry(hw, e);
*entry = exist;
}
out:
@@ -3021,10 +3031,7 @@ int ice_flow_add_entry(struct ice_hw *hw, enum ice_block blk, u64 prof_id,
out:
if (status && e) {
- kfree(e->entry);
- kfree(e->range_buf);
- kfree(e->acts);
- devm_kfree(ice_hw_to_dev(hw), e);
+ ice_dealloc_flow_entry(hw, e);
}
return status;
--
2.49.0
next prev parent reply other threads:[~2026-04-09 13:00 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 11:59 [Intel-wired-lan] [PATCH iwl-next v2 00/10] Add ACL support Marcin Szycik
2026-04-09 11:59 ` Marcin Szycik
2026-04-09 11:59 ` [Intel-wired-lan] [PATCH iwl-next v2 01/10] ice: rename shared Flow Director functions and structs Marcin Szycik
2026-04-09 11:59 ` Marcin Szycik
2026-05-06 18:33 ` [Intel-wired-lan] " Nowlin, Alexander
2026-05-06 18:33 ` Nowlin, Alexander
2026-04-09 11:59 ` [Intel-wired-lan] [PATCH iwl-next v2 02/10] ice: initialize ACL table Marcin Szycik
2026-04-09 11:59 ` Marcin Szycik
2026-05-06 18:34 ` [Intel-wired-lan] " Nowlin, Alexander
2026-05-06 18:34 ` Nowlin, Alexander
2026-04-09 11:59 ` [Intel-wired-lan] [PATCH iwl-next v2 03/10] ice: initialize ACL scenario Marcin Szycik
2026-04-09 11:59 ` Marcin Szycik
2026-05-06 18:35 ` [Intel-wired-lan] " Nowlin, Alexander
2026-05-06 18:35 ` Nowlin, Alexander
2026-04-09 11:59 ` [Intel-wired-lan] [PATCH iwl-next v2 04/10] ice: create flow profile Marcin Szycik
2026-04-09 11:59 ` Marcin Szycik
2026-05-06 18:37 ` [Intel-wired-lan] " Nowlin, Alexander
2026-05-06 18:37 ` Nowlin, Alexander
2026-04-09 11:59 ` [Intel-wired-lan] [PATCH iwl-next v2 05/10] Revert "ice: remove unused ice_flow_entry fields" Marcin Szycik
2026-04-09 11:59 ` Marcin Szycik
2026-05-06 18:38 ` [Intel-wired-lan] " Nowlin, Alexander
2026-05-06 18:38 ` Nowlin, Alexander
2026-04-09 11:59 ` [Intel-wired-lan] [PATCH iwl-next v2 06/10] ice: use plain alloc/dealloc for ice_ntuple_fltr Marcin Szycik
2026-04-09 11:59 ` Marcin Szycik
2026-05-06 18:39 ` [Intel-wired-lan] " Nowlin, Alexander
2026-05-06 18:39 ` Nowlin, Alexander
2026-04-09 12:00 ` [Intel-wired-lan] [PATCH iwl-next v2 07/10] ice: create ACL entry Marcin Szycik
2026-04-09 12:00 ` Marcin Szycik
2026-05-06 18:40 ` [Intel-wired-lan] " Nowlin, Alexander
2026-05-06 18:40 ` Nowlin, Alexander
2026-04-09 12:00 ` [Intel-wired-lan] [PATCH iwl-next v2 08/10] ice: program " Marcin Szycik
2026-04-09 12:00 ` Marcin Szycik
2026-04-09 13:35 ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-04-09 13:35 ` Loktionov, Aleksandr
2026-04-13 10:57 ` Marcin Szycik
2026-05-06 18:42 ` Nowlin, Alexander
2026-05-06 18:42 ` Nowlin, Alexander
2026-04-09 12:00 ` Marcin Szycik [this message]
2026-04-09 12:00 ` [PATCH iwl-next v2 09/10] ice: re-introduce ice_dealloc_flow_entry() helper Marcin Szycik
2026-05-06 18:42 ` [Intel-wired-lan] " Nowlin, Alexander
2026-05-06 18:42 ` Nowlin, Alexander
2026-04-09 12:00 ` [Intel-wired-lan] [PATCH iwl-next v2 10/10] ice: use ACL for ntuple rules that conflict with FDir Marcin Szycik
2026-04-09 12:00 ` Marcin Szycik
2026-04-09 17:37 ` [Intel-wired-lan] " Przemek Kitszel
2026-05-06 18:43 ` Nowlin, Alexander
2026-05-06 18:43 ` Nowlin, Alexander
2026-05-06 12:50 ` [Intel-wired-lan] [PATCH iwl-next v2 00/10] Add ACL support Marcin Szycik
2026-05-06 12:50 ` Marcin Szycik
2026-05-07 22:22 ` [Intel-wired-lan] " Jacob Keller
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=20260409120003.2719-10-marcin.szycik@linux.intel.com \
--to=marcin.szycik@linux.intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=alexander.duyck@gmail.com \
--cc=ananth.s@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
--cc=przemyslaw.kitszel@intel.com \
--cc=sandeep.penigalapati@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.