[PATCH v1 04/12] net/ice/base: fix memory leak in recipe handling

Bruce Richardson bruce.richardson at intel.com
Fri Sep 5 17:10:33 CEST 2025


On Tue, Sep 02, 2025 at 06:26:54PM +0100, Anatoly Burakov wrote:
> From: Pandi Kumar Maharajan <pandi.maharajan at intel.com>
> 
> Advanced filter operations (apply/remove GENEVE/VXLAN filters) trigger
> the call chain: ice_add_adv_rule()/ice_rem_adv_rule() -> ice_find_recp()
> -> ice_get_recp_frm_fw(). Each call to ice_get_recp_frm_fw() creates new
> linked list entries for SW recipe tracking without cleaning up previous
> entries for the same recipe ID. The linked list then continuously grows
> with each filter add/remove operation, leading to excessive heap usage
> over time.
> 
> Fix the memory leak by adding logic to remove the duplicate entries
> before adding new ones for the same recipe ID.
> 
> Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Pandi Kumar Maharajan <pandi.maharajan at intel.com>
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson at intel.com>


More information about the dev mailing list