[PATCH] net/sfc: fix MAC address entry leak in transfer flow parsing
Ivan Malov
ivan.malov at arknetworks.am
Tue Feb 14 14:06:59 CET 2023
When the action parsing helper discovers it can "attach" to
an existing action set, it must invoke "delete" on the MAC
address(es) that it has "attached" to during parsing. That
is because the action set itself (i.e. not the flow rule
entry) holds a reference of the address(es).
Fixes: 4c6005999e41 ("net/sfc: support MAC address edits in transfer flows")
Cc: stable at dpdk.org
Signed-off-by: Ivan Malov <ivan.malov at arknetworks.am>
Reviewed-by: Viacheslav Galaktionov <viacheslav.galaktionov at arknetworks.am>
Reviewed-by: Andy Moreton <amoreton at xilinx.com>
---
drivers/net/sfc/sfc_mae.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index aab697b204..c254562696 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -3912,6 +3912,8 @@ sfc_mae_rule_parse_actions(struct sfc_adapter *sa,
spec_mae->action_set = sfc_mae_action_set_attach(sa, &ctx);
if (spec_mae->action_set != NULL) {
+ sfc_mae_mac_addr_del(sa, ctx.src_mac);
+ sfc_mae_mac_addr_del(sa, ctx.dst_mac);
sfc_mae_encap_header_del(sa, ctx.encap_header);
efx_mae_action_set_spec_fini(sa->nic, ctx.spec);
return 0;
--
2.17.1
More information about the stable
mailing list