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 D7F5148B69 for ; Fri, 21 Nov 2025 12:24:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D21C0402EE; Fri, 21 Nov 2025 12:24:37 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 2C344402E6 for ; Fri, 21 Nov 2025 12:24:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763724275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gC0OtgCmjDPPP+Vy3huqwg1WdRQRFZUwT4wQXjBb0II=; b=QFhSnF+RvD6d3KKEmJgoao8JyKNl8q+eYo9fBSE1Lob15Ti75EEc8qS5o1dkFjBfu5EBAy v0RKnT1CK1aFBXjX8WASI+WJo/04rLmQv3GNxPlAd/wnDiacmwV39YReOrkQAIuIgF9YWR tGZudYM/WWDKmDajiaV66d++Oos4wWk= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-390-36GBW9QqMM-TgO7vDN6yIg-1; Fri, 21 Nov 2025 06:24:32 -0500 X-MC-Unique: 36GBW9QqMM-TgO7vDN6yIg-1 X-Mimecast-MFC-AGG-ID: 36GBW9QqMM-TgO7vDN6yIg_1763724271 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 72A5C1956063; Fri, 21 Nov 2025 11:24:31 +0000 (UTC) Received: from rh.redhat.com (unknown [10.42.28.165]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0240B30044DC; Fri, 21 Nov 2025 11:24:29 +0000 (UTC) From: Kevin Traynor To: Gregory Etelson Cc: Dariusz Sosnowski , dpdk stable Subject: patch 'net/mlx5: fix send to kernel action resources release' has been queued to stable release 24.11.4 Date: Fri, 21 Nov 2025 11:21:10 +0000 Message-ID: <20251121112128.485623-86-ktraynor@redhat.com> In-Reply-To: <20251121112128.485623-1-ktraynor@redhat.com> References: <20251121112128.485623-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: xECc19ecBu_pkBaZxkJ736DSI6IoMoZcuF3i59hz3rM_1763724271 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 Hi, FYI, your patch has been queued to stable release 24.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/26/25. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/6b7221e37eb5a55c28848a276739dfffb6460f12 Thanks. Kevin --- >From 6b7221e37eb5a55c28848a276739dfffb6460f12 Mon Sep 17 00:00:00 2001 From: Gregory Etelson Date: Wed, 12 Nov 2025 18:24:40 +0200 Subject: [PATCH] net/mlx5: fix send to kernel action resources release [ upstream commit 472b0994319198090e44a7c2de1e43f0a0e0a270 ] In the MLX5 PMD hierarchy a flow table is bound to a domain object. A domain object can be released if it does not reference any flow tables. When the PMD creates a send to kernel flow action, it also creates a dedicated flow table for that action. The PMD called for Rx, Tx and FDB domain destruction before it destroyed send to kernel resources - flow action and flow table. As a result, domain destruction could not be completed. The patch moves send to kernel actions and tables destruction before domain destruction. Fixes: f31a141e6478 ("net/mlx5: add send to kernel action resource holder") Signed-off-by: Gregory Etelson Acked-by: Dariusz Sosnowski --- drivers/net/mlx5/linux/mlx5_os.c | 40 ++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index de037b25f1..f8197a22bc 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -738,4 +738,28 @@ error: } +#ifdef HAVE_MLX5DV_DR +static void +mlx5_destroy_send_to_kernel_action(struct mlx5_dev_ctx_shared *sh) +{ + int i; + + for (i = 0; i < MLX5DR_TABLE_TYPE_MAX; i++) { + if (sh->send_to_kernel_action[i].action) { + void *action = sh->send_to_kernel_action[i].action; + + mlx5_glue->destroy_flow_action(action); + sh->send_to_kernel_action[i].action = NULL; + } + if (sh->send_to_kernel_action[i].tbl) { + struct mlx5_flow_tbl_resource *tbl = + sh->send_to_kernel_action[i].tbl; + + flow_dv_tbl_resource_release(sh, tbl); + sh->send_to_kernel_action[i].tbl = NULL; + } + } +} +#endif /* HAVE_MLX5DV_DR */ + /** * Destroy DR related data within private structure. @@ -764,4 +788,5 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv) MLX5_ASSERT(LIST_EMPTY(&sh->shared_rxqs)); #ifdef HAVE_MLX5DV_DR + mlx5_destroy_send_to_kernel_action(sh); if (sh->rx_domain) { mlx5_glue->dr_destroy_domain(sh->rx_domain); @@ -786,19 +811,4 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv) sh->pop_vlan_action = NULL; } - for (i = 0; i < MLX5DR_TABLE_TYPE_MAX; i++) { - if (sh->send_to_kernel_action[i].action) { - void *action = sh->send_to_kernel_action[i].action; - - mlx5_glue->destroy_flow_action(action); - sh->send_to_kernel_action[i].action = NULL; - } - if (sh->send_to_kernel_action[i].tbl) { - struct mlx5_flow_tbl_resource *tbl = - sh->send_to_kernel_action[i].tbl; - - flow_dv_tbl_resource_release(sh, tbl); - sh->send_to_kernel_action[i].tbl = NULL; - } - } #endif /* HAVE_MLX5DV_DR */ if (sh->default_miss_action) -- 2.51.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-11-21 11:05:12.232959763 +0000 +++ 0086-net-mlx5-fix-send-to-kernel-action-resources-release.patch 2025-11-21 11:05:09.589201707 +0000 @@ -1 +1 @@ -From 472b0994319198090e44a7c2de1e43f0a0e0a270 Mon Sep 17 00:00:00 2001 +From 6b7221e37eb5a55c28848a276739dfffb6460f12 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 472b0994319198090e44a7c2de1e43f0a0e0a270 ] + @@ -21 +22,0 @@ -Cc: stable@dpdk.org @@ -30 +31 @@ -index dba3b61b68..8026a68702 100644 +index de037b25f1..f8197a22bc 100644