[PATCH v3 1/2] net/ice: remove indirection for FDIR filters

Bruce Richardson bruce.richardson at intel.com
Mon Oct 13 14:09:04 CEST 2025


On Fri, Oct 10, 2025 at 02:13:19PM +0100, Anatoly Burakov wrote:
> Currently, when filters are created for FDIR, they are allocated
> dynamically using `ice_malloc()`. Not only this is inconsistent with hash
> filter code paths (hash uses embedded structures), this is also creating
> unnecessary indirection and complexity, and creates a memory leak where,
> if something fails during raw pattern parse, the profile memory isn't
> deallocated.
> 
> Since there is no actual reason for why FDIR filter profile must use
> indirection, instead of fixing the memory leak just avoid it altogether
> by making the filter profile an embedded struct. When parsing begins, the
> entire scratch filter structure is zeroed out anyway, so there is no need
> to add any additional zero-initialization code.
> 
> Fixes: 25be39cc1760 ("net/ice: enable protocol agnostic flow offloading in FDIR")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
> ---
Series-
Acked-by: Bruce Richardson <bruce.richardson at intel.com>

Applied to dpdk-next-net-intel



More information about the stable mailing list