On Tue, Oct 20, 2026 at 01:11:08PM +0100, Anatoly Burakov wrote: > Pattern lookup allocates a match item just to copy an entry from the > engine's supported-pattern table. Each engine must then free this > temporary object after parsing. > > Make `ice_search_pattern_match_item()` fill caller-provided storage > and return a status code. Use stack-local match items in all four > engines, removing the allocation and corresponding cleanup paths. > > Signed-off-by: Anatoly Burakov <[email protected]> Acked-by: Bruce Richardson <[email protected]>
I'm sure there are still plenty more cleanups that can be done converting dynamic to stack storage. Even a quick review of this change shows that the "rss_meta_ptr" value in ice_hash_parse_pattern_action can be just put on stack to simplify the code. > --- > drivers/net/intel/ice/ice_acl_filter.c | 22 ++++++++------------ > drivers/net/intel/ice/ice_fdir_filter.c | 18 ++++++++-------- > drivers/net/intel/ice/ice_generic_flow.c | 25 +++++------------------ > drivers/net/intel/ice/ice_generic_flow.h | 3 ++- > drivers/net/intel/ice/ice_hash.c | 13 +++++------- > drivers/net/intel/ice/ice_switch_filter.c | 14 +++++-------- > 6 files changed, 34 insertions(+), 61 deletions(-) >

