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,
anthony.l.nguyen@intel.com,
Marcin Szycik <marcin.szycik@linux.intel.com>,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Subject: [PATCH iwl-next v5 07/12] ice: use plain alloc/dealloc for ice_ntuple_fltr
Date: Thu, 2 Jul 2026 12:30:01 +0200 [thread overview]
Message-ID: <20260702103007.97020-8-marcin.szycik@linux.intel.com> (raw)
In-Reply-To: <20260702103007.97020-1-marcin.szycik@linux.intel.com>
Change struct ice_ntuple_fltr allocation from devm_ to plain alloc,
since its lifetime is not tied to the device. All such objects are being
removed on device remove via ice_deinit_features() -> ice_deinit_fdir()
-> ice_vsi_manage_fdir() -> ice_fdir_del_all_fltrs()
Signed-off-by: Marcin Szycik <marcin.szycik@linux.intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
---
v2:
* Add this patch
---
drivers/net/ethernet/intel/ice/ice_ethtool_ntuple.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool_ntuple.c b/drivers/net/ethernet/intel/ice/ice_ethtool_ntuple.c
index 87457e739e2a..242be0a297db 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool_ntuple.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool_ntuple.c
@@ -1781,7 +1781,7 @@ void ice_fdir_del_all_fltrs(struct ice_vsi *vsi)
ice_fdir_write_all_fltr(pf, f_rule, false);
ice_ntuple_update_cntrs(hw, f_rule, false);
list_del(&f_rule->fltr_node);
- devm_kfree(ice_pf_to_dev(pf), f_rule);
+ kfree(f_rule);
}
}
@@ -1882,7 +1882,7 @@ ice_ntuple_update_list_entry(struct ice_pf *pf, struct ice_ntuple_fltr *input,
*/
ice_fdir_do_rem_flow(pf, old_fltr->flow_type);
list_del(&old_fltr->fltr_node);
- devm_kfree(ice_hw_to_dev(hw), old_fltr);
+ kfree(old_fltr);
}
if (!input)
return err;
@@ -2234,7 +2234,7 @@ int ice_add_ntuple_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd)
return -ENOSPC;
}
- input = devm_kzalloc(dev, sizeof(*input), GFP_KERNEL);
+ input = kzalloc_obj(*input);
if (!input)
return -ENOMEM;
@@ -2278,7 +2278,7 @@ int ice_add_ntuple_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd)
mutex_unlock(&hw->fdir_fltr_lock);
free_input:
if (ret)
- devm_kfree(dev, input);
+ kfree(input);
return ret;
}
--
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,
anthony.l.nguyen@intel.com,
Marcin Szycik <marcin.szycik@linux.intel.com>,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Subject: [Intel-wired-lan] [PATCH iwl-next v5 07/12] ice: use plain alloc/dealloc for ice_ntuple_fltr
Date: Thu, 2 Jul 2026 12:30:01 +0200 [thread overview]
Message-ID: <20260702103007.97020-8-marcin.szycik@linux.intel.com> (raw)
In-Reply-To: <20260702103007.97020-1-marcin.szycik@linux.intel.com>
Change struct ice_ntuple_fltr allocation from devm_ to plain alloc,
since its lifetime is not tied to the device. All such objects are being
removed on device remove via ice_deinit_features() -> ice_deinit_fdir()
-> ice_vsi_manage_fdir() -> ice_fdir_del_all_fltrs()
Signed-off-by: Marcin Szycik <marcin.szycik@linux.intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
---
v2:
* Add this patch
---
drivers/net/ethernet/intel/ice/ice_ethtool_ntuple.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool_ntuple.c b/drivers/net/ethernet/intel/ice/ice_ethtool_ntuple.c
index 87457e739e2a..242be0a297db 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool_ntuple.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool_ntuple.c
@@ -1781,7 +1781,7 @@ void ice_fdir_del_all_fltrs(struct ice_vsi *vsi)
ice_fdir_write_all_fltr(pf, f_rule, false);
ice_ntuple_update_cntrs(hw, f_rule, false);
list_del(&f_rule->fltr_node);
- devm_kfree(ice_pf_to_dev(pf), f_rule);
+ kfree(f_rule);
}
}
@@ -1882,7 +1882,7 @@ ice_ntuple_update_list_entry(struct ice_pf *pf, struct ice_ntuple_fltr *input,
*/
ice_fdir_do_rem_flow(pf, old_fltr->flow_type);
list_del(&old_fltr->fltr_node);
- devm_kfree(ice_hw_to_dev(hw), old_fltr);
+ kfree(old_fltr);
}
if (!input)
return err;
@@ -2234,7 +2234,7 @@ int ice_add_ntuple_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd)
return -ENOSPC;
}
- input = devm_kzalloc(dev, sizeof(*input), GFP_KERNEL);
+ input = kzalloc_obj(*input);
if (!input)
return -ENOMEM;
@@ -2278,7 +2278,7 @@ int ice_add_ntuple_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd)
mutex_unlock(&hw->fdir_fltr_lock);
free_input:
if (ret)
- devm_kfree(dev, input);
+ kfree(input);
return ret;
}
--
2.49.0
next prev parent reply other threads:[~2026-07-02 11:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 10:29 [PATCH iwl-next v5 00/12] Add ACL support Marcin Szycik
2026-07-02 10:29 ` [Intel-wired-lan] " Marcin Szycik
2026-07-02 10:29 ` [PATCH iwl-next v5 01/12] ice: rename shared Flow Director functions and structs Marcin Szycik
2026-07-02 10:29 ` [Intel-wired-lan] " Marcin Szycik
2026-07-02 10:29 ` [PATCH iwl-next v5 02/12] ice: remove unused ICE_FD_FLUSH_REQ from PF state Marcin Szycik
2026-07-02 10:29 ` [Intel-wired-lan] " Marcin Szycik
2026-07-02 10:29 ` [PATCH iwl-next v5 03/12] ice: initialize ACL table Marcin Szycik
2026-07-02 10:29 ` [Intel-wired-lan] " Marcin Szycik
2026-07-02 10:29 ` [PATCH iwl-next v5 04/12] ice: initialize ACL scenario Marcin Szycik
2026-07-02 10:29 ` [Intel-wired-lan] " Marcin Szycik
2026-07-02 10:29 ` [PATCH iwl-next v5 05/12] ice: create flow profile Marcin Szycik
2026-07-02 10:29 ` [Intel-wired-lan] " Marcin Szycik
2026-07-02 10:30 ` [PATCH iwl-next v5 06/12] Revert "ice: remove unused ice_flow_entry fields" Marcin Szycik
2026-07-02 10:30 ` [Intel-wired-lan] " Marcin Szycik
2026-07-02 10:30 ` Marcin Szycik [this message]
2026-07-02 10:30 ` [Intel-wired-lan] [PATCH iwl-next v5 07/12] ice: use plain alloc/dealloc for ice_ntuple_fltr Marcin Szycik
2026-07-02 10:30 ` [PATCH iwl-next v5 08/12] ice: create ACL entry Marcin Szycik
2026-07-02 10:30 ` [Intel-wired-lan] " Marcin Szycik
2026-07-02 10:30 ` [PATCH iwl-next v5 09/12] ice: program " Marcin Szycik
2026-07-02 10:30 ` [Intel-wired-lan] " Marcin Szycik
2026-07-02 10:30 ` [PATCH iwl-next v5 10/12] ice: add ACL reset recovery and NTUPLE feature toggle Marcin Szycik
2026-07-02 10:30 ` [Intel-wired-lan] " Marcin Szycik
2026-07-02 10:30 ` [PATCH iwl-next v5 11/12] ice: re-introduce ice_dealloc_flow_entry() helper Marcin Szycik
2026-07-02 10:30 ` [Intel-wired-lan] " Marcin Szycik
2026-07-02 10:30 ` [PATCH iwl-next v5 12/12] ice: use ACL for ntuple rules that conflict with FDir Marcin Szycik
2026-07-02 10:30 ` [Intel-wired-lan] " Marcin Szycik
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=20260702103007.97020-8-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=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
--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.