net/sfc: fix MAC address entry leak in transfer flow parsing
PATCH 1/1 net/sfc: fix MAC address entry leak in transfer flow parsing
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).
--- drivers/net/sfc/sfc_mae.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/sfc/sfc_mae.c +2 -0
@@ -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 ;
Signature · 1 line
2.17.1
Quoted 6 lines · Ivan Malov
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).
Quoted 6 lines
Fixes 4c6005999e41 ("net/sfc: support MAC address edits in transfer flows")Signed-off-by Ivan Malov <[email protected]>Reviewed-by Viacheslav Galaktionov <[email protected]>Reviewed-by Andy Moreton <[email protected]>
Ferruh Yigit
AppliedQuoted 11 lines · Andrew Rybchenko
Quoted 10 lines · Ivan Malov
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 transferflows")
Cc: [email protected]
Quoted 8 lines
Quoted 4 lines
Signed-off-by Ivan Malov <[email protected]>Reviewed-by Viacheslav GalaktionovReviewed-by Andy Moreton <[email protected]>Acked-by Andrew Rybchenko <[email protected]>
Applied to dpdk-next-net/main, thanks.