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 5BB3B46BAE for ; Fri, 18 Jul 2025 21:33:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 57D9B40E54; Fri, 18 Jul 2025 21:33:56 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id DD64940611 for ; Fri, 18 Jul 2025 21:33:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752867234; 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=H2zpdTwbB5TF0VCr029qu/ynYvXF7A/wE5ctkOcnsYQ=; b=iTMGT/N/GkkAEssy/WecafNPbGJZiYt4f75dcmaxp3JzUFpNmJcYBuAVk1nzCBhOxNw/w9 ALyt62Dxkxfd9HtYZYsi7db7bdrnx6tdGQEeMHa8EeYKIGfiVyHezwNQGnv/MAXdDhi07/ OiBVgHGKixPXX5UfriKGCIdW0wNXh1E= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-303-JIbH12u6PoipGwUhEdTNKg-1; Fri, 18 Jul 2025 15:33:53 -0400 X-MC-Unique: JIbH12u6PoipGwUhEdTNKg-1 X-Mimecast-MFC-AGG-ID: JIbH12u6PoipGwUhEdTNKg_1752867232 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3218B18001DD; Fri, 18 Jul 2025 19:33:52 +0000 (UTC) Received: from rh.redhat.com (unknown [10.44.32.40]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9E1CA180045B; Fri, 18 Jul 2025 19:33:50 +0000 (UTC) From: Kevin Traynor To: Dariusz Sosnowski Cc: Bing Zhao , dpdk stable Subject: patch 'net/mlx5: fix counter service cleanup on init failure' has been queued to stable release 24.11.3 Date: Fri, 18 Jul 2025 20:29:21 +0100 Message-ID: <20250718193247.1008129-27-ktraynor@redhat.com> In-Reply-To: <20250718193247.1008129-1-ktraynor@redhat.com> References: <20250718193247.1008129-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: rvwieUTliub5xFxGEkgG6w_vEc-kfJjCm7ojJwgre8A_1752867232 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.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/23/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/a7ecf49c22006ce2e4452aee849cdb14399c291b Thanks. Kevin --- >From a7ecf49c22006ce2e4452aee849cdb14399c291b Mon Sep 17 00:00:00 2001 From: Dariusz Sosnowski Date: Fri, 25 Apr 2025 21:41:05 +0200 Subject: [PATCH] net/mlx5: fix counter service cleanup on init failure [ upstream commit 4d78ac5f3ef7c1ae3ae194423428c0f96e9994bc ] When initializing the counter pool in mlx5_hws_cnt_pool_create(), the background service thread was started before pool creation completed. If pool creation failed after the thread was started, the error handling path did not clean up the running thread, as it assumed no resources needed cleanup if the pool was not created. This patch moves the creation of the background service thread to the end of the counter pool initialization, ensuring resources are released in the correct order during rollback. It also adds a missing "goto error" in case the service thread initialization fails. Fixes: 4d368e1da3a4 ("net/mlx5: support flow counter action for HWS") Signed-off-by: Dariusz Sosnowski Acked-by: Bing Zhao --- drivers/net/mlx5/mlx5_hws_cnt.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/mlx5/mlx5_hws_cnt.c b/drivers/net/mlx5/mlx5_hws_cnt.c index 000c2b1980..124c552aec 100644 --- a/drivers/net/mlx5/mlx5_hws_cnt.c +++ b/drivers/net/mlx5/mlx5_hws_cnt.c @@ -725,10 +725,4 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev, goto success; } - /* init cnt service if not. */ - if (priv->sh->cnt_svc == NULL) { - ret = mlx5_hws_cnt_svc_init(priv->sh, error); - if (ret) - goto error; - } cparam.fetch_sz = HWS_CNT_CACHE_FETCH_DEFAULT; cparam.preload_sz = HWS_CNT_CACHE_PRELOAD_DEFAULT; @@ -765,4 +759,10 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev, goto error; } + /* init cnt service if not. */ + if (priv->sh->cnt_svc == NULL) { + ret = mlx5_hws_cnt_svc_init(priv->sh, error); + if (ret) + goto error; + } priv->sh->cnt_svc->refcnt++; cpool->priv = priv; -- 2.50.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-07-18 20:29:12.033692640 +0100 +++ 0027-net-mlx5-fix-counter-service-cleanup-on-init-failure.patch 2025-07-18 20:29:10.849907083 +0100 @@ -1 +1 @@ -From 4d78ac5f3ef7c1ae3ae194423428c0f96e9994bc Mon Sep 17 00:00:00 2001 +From a7ecf49c22006ce2e4452aee849cdb14399c291b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4d78ac5f3ef7c1ae3ae194423428c0f96e9994bc ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -27 +28 @@ -index fd12bcd7ec..5c7c0041aa 100644 +index 000c2b1980..124c552aec 100644 @@ -30 +31 @@ -@@ -730,10 +730,4 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev, +@@ -725,10 +725,4 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev, @@ -41 +42 @@ -@@ -770,4 +764,10 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev, +@@ -765,4 +759,10 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev,