On Sat, Oct 10, 2026 at 12:12:55PM +0000, Anurag Mandal wrote:
> This patch addresses several memory leaks and
> incorrect error reporting that exist in the
> iavf RSS (hash) flow engine:
>
> - iavf_hash_parse_raw_pattern() returns without
> freeing "pkt_buf" when the "msk_buf" allocation
> fails, leaking the first buffer on every failed
> raw pattern parse.
>
> - iavf_hash_create() only frees the parsed "meta"
> on success.
> Both error paths return early and leak the struct
> iavf_rss_meta allocated by iavf_hash_parse_pattern_action(),
> which no other caller frees.
> Free in both error paths.
>
> - iavf_hash_destroy() never releases flow->rule.
> The virtchnl_rss_cfg allocated by iavf_hash_create() is only
> released by the engine's free callback, iavf_hash_free(),
> which is invoked from iavf_flow_uninit() but not from
> iavf_flow_destroy().
> So every flow destroy or flush of an RSS rule leaks it.
> The early return taken while the VF is resetting leaks it too.
> Free the config and clear flow->rule properly in all paths.
>
> - Out of memory conditions are reported to the application as
> EINVAL while -ENOMEM is returned.
> Report ENOMEM instead.
>
> Fixes: bc0e85586eaf ("net/iavf: support VF RSS flow rule with raw pattern")
> Fixes: 7be10c3004be ("net/iavf: add RSS configuration for VF")
> Fixes: c02ea7410e51 ("net/iavf: fix flow flush after PF reset")
>
Cc: [email protected]
> Signed-off-by: Anurag Mandal <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
Applied to dpdk-next-net-intel.
Thanks,
/Bruce