[PATCH v2 4/7] net/iavf: fix memory leak on uninit
Anatoly Burakov
anatoly.burakov at intel.com
Tue Feb 10 16:52:06 CET 2026
When IPsec is initialized, parsers and engines are registered into the
common infrastructure. However, during deinitialization, they are not
cleaned up. Fix it by including IPsec engines in the cleanup.
Fixes: 6bc987ecb860 ("net/iavf: support IPsec inline crypto")
Cc: radu.nicolau at intel.com
Cc: stable at dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
Acked-by: Radu Nicolau <radu.nicolau at intel.com>
---
drivers/net/intel/iavf/iavf_generic_flow.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/intel/iavf/iavf_generic_flow.c b/drivers/net/intel/iavf/iavf_generic_flow.c
index 02917f863d..42ecc90d1d 100644
--- a/drivers/net/intel/iavf/iavf_generic_flow.c
+++ b/drivers/net/intel/iavf/iavf_generic_flow.c
@@ -1859,6 +1859,11 @@ iavf_flow_uninit(struct iavf_adapter *ad)
TAILQ_REMOVE(&vf->dist_parser_list, p_parser, node);
rte_free(p_parser);
}
+
+ while ((p_parser = TAILQ_FIRST(&vf->ipsec_crypto_parser_list))) {
+ TAILQ_REMOVE(&vf->ipsec_crypto_parser_list, p_parser, node);
+ rte_free(p_parser);
+ }
}
int
@@ -1920,6 +1925,8 @@ iavf_unregister_parser(struct iavf_flow_parser *parser,
else if ((parser->engine->type == IAVF_FLOW_ENGINE_FDIR) ||
(parser->engine->type == IAVF_FLOW_ENGINE_FSUB))
list = &vf->dist_parser_list;
+ else if (parser->engine->type == IAVF_FLOW_ENGINE_IPSEC_CRYPTO)
+ list = &vf->ipsec_crypto_parser_list;
if (list == NULL)
return;
--
2.47.3
More information about the dev
mailing list