From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EBCDD41C95 for ; Tue, 14 Feb 2023 14:06:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DCB19410D1; Tue, 14 Feb 2023 14:06:50 +0100 (CET) Received: from agw.arknetworks.am (agw.arknetworks.am [79.141.165.80]) by mails.dpdk.org (Postfix) with ESMTP id 1237D40ED9; Tue, 14 Feb 2023 14:06:50 +0100 (CET) Received: from localhost.localdomain (unknown [78.109.66.163]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by agw.arknetworks.am (Postfix) with ESMTPSA id 7DCECE045D; Tue, 14 Feb 2023 17:06:49 +0400 (+04) From: Ivan Malov To: dev@dpdk.org Cc: Andrew Rybchenko , stable@dpdk.org, Viacheslav Galaktionov , Andy Moreton Subject: [PATCH] net/sfc: fix MAC address entry leak in transfer flow parsing Date: Tue, 14 Feb 2023 17:06:59 +0400 Message-Id: <20230214130659.6971-1-ivan.malov@arknetworks.am> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 Reviewed-by: Viacheslav Galaktionov Reviewed-by: Andy Moreton --- 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