patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/sfc: fix MAC address entry leak in transfer flow parsing
@ 2023-02-14 13:06 Ivan Malov
  2023-02-14 13:41 ` Andrew Rybchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Ivan Malov @ 2023-02-14 13:06 UTC (permalink / raw)
  To: dev; +Cc: Andrew Rybchenko, stable, Viacheslav Galaktionov, Andy Moreton

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@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am>
Reviewed-by: Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>
Reviewed-by: Andy Moreton <amoreton@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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/sfc: fix MAC address entry leak in transfer flow parsing
  2023-02-14 13:06 [PATCH] net/sfc: fix MAC address entry leak in transfer flow parsing Ivan Malov
@ 2023-02-14 13:41 ` Andrew Rybchenko
  2023-02-14 18:50   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Rybchenko @ 2023-02-14 13:41 UTC (permalink / raw)
  To: Ivan Malov, dev; +Cc: stable, Viacheslav Galaktionov, Andy Moreton

On 2/14/23 16:06, Ivan Malov wrote:
> 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@dpdk.org
> 
> Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am>
> Reviewed-by: Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>
> Reviewed-by: Andy Moreton <amoreton@xilinx.com>

Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/sfc: fix MAC address entry leak in transfer flow parsing
  2023-02-14 13:41 ` Andrew Rybchenko
@ 2023-02-14 18:50   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2023-02-14 18:50 UTC (permalink / raw)
  To: Andrew Rybchenko, Ivan Malov, dev
  Cc: stable, Viacheslav Galaktionov, Andy Moreton

On 2/14/2023 1:41 PM, Andrew Rybchenko wrote:
> On 2/14/23 16:06, Ivan Malov wrote:
>> 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@dpdk.org
>>
>> Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am>
>> Reviewed-by: Viacheslav Galaktionov
>> <viacheslav.galaktionov@arknetworks.am>
>> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
> 
> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> 
> 

Applied to dpdk-next-net/main, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-14 18:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-14 13:06 [PATCH] net/sfc: fix MAC address entry leak in transfer flow parsing Ivan Malov
2023-02-14 13:41 ` Andrew Rybchenko
2023-02-14 18:50   ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).