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 E034F43835 for ; Tue, 5 Mar 2024 16:36:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C56842E95; Tue, 5 Mar 2024 16:36:29 +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 708E042E6E for ; Tue, 5 Mar 2024 16:36:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709652987; 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=+dvhGhSEPA+Flwe6kPRxLTpRSM+HQQ6B1E3YeZLoEBs=; b=WO69Kjab+N14XNM5pLZRSmIwm1KFZ2A2/8KEDstL2PhyGgXbq+wy+lvvSyLDra5ynr7dVo Dl+ALeKWNA1XRencH6ebym9Vmy9kBWwbu3D6vSas0iOn4QT/k1gCbbf1UnwNcHpuEpOyPa 5PPtaBtkj71biAV/ruitXapj+o2VfKE= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-376-QMshZD_VNKSQ8Ui75iOjnA-1; Tue, 05 Mar 2024 10:36:23 -0500 X-MC-Unique: QMshZD_VNKSQ8Ui75iOjnA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7246D1C05138; Tue, 5 Mar 2024 15:36:23 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.194.197]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8B3E5200B25C; Tue, 5 Mar 2024 15:36:22 +0000 (UTC) From: Kevin Traynor To: Shaowei Sun <1819846787@qq.com> Cc: Bruce Richardson , Ciara Power , Chengwen Feng , dpdk stable Subject: patch 'telemetry: fix connected clients count' has been queued to stable release 21.11.7 Date: Tue, 5 Mar 2024 15:34:43 +0000 Message-ID: <20240305153449.263666-70-ktraynor@redhat.com> In-Reply-To: <20240305153449.263666-1-ktraynor@redhat.com> References: <20240305153449.263666-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 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 21.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/11/24. 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/1af693e0074daa8f727c3d68592b67f99916359b Thanks. Kevin --- >From 1af693e0074daa8f727c3d68592b67f99916359b Mon Sep 17 00:00:00 2001 From: Shaowei Sun <1819846787@qq.com> Date: Tue, 30 Jan 2024 09:57:04 +0800 Subject: [PATCH] telemetry: fix connected clients count [ upstream commit e14bb5f1050924de1602033596d5b417bfbeee52 ] Telemetry can only create 10 conns by default, each of which is processed by a thread. When a thread fails to write using socket, the thread will end directly without reducing the total number of conns. This will result in the machine running for a long time, and if there are 10 failures, the telemetry will be unavailable Fixes: 2a7d0b872f79 ("telemetry: add upper limit on connections") Signed-off-by: Shaowei Sun <1819846787@qq.com> Acked-by: Bruce Richardson Acked-by: Ciara Power Acked-by: Chengwen Feng --- .mailmap | 1 + lib/telemetry/telemetry.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.mailmap b/.mailmap index dde19c1fe8..8cb4e2f619 100644 --- a/.mailmap +++ b/.mailmap @@ -1233,4 +1233,5 @@ Shannon Nelson Shannon Zhao Shaopeng He +Shaowei Sun <1819846787@qq.com> Sharmila Podury Sharon Haroni diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c index e73f4a593e..075672d91d 100644 --- a/lib/telemetry/telemetry.c +++ b/lib/telemetry/telemetry.c @@ -375,6 +375,6 @@ client_handler(void *sock_id) telemetry_version, getpid(), MAX_OUTPUT_LEN); if (write(s, info_str, strlen(info_str)) < 0) { - close(s); - return NULL; + TMTY_LOG(ERR, "Socket write base info to client failed\n"); + goto exit; } @@ -401,4 +401,5 @@ client_handler(void *sock_id) bytes = read(s, buffer, sizeof(buffer) - 1); } +exit: close(s); __atomic_sub_fetch(&v2_clients, 1, __ATOMIC_RELAXED); -- 2.43.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 14:08:56.316085733 +0000 +++ 0070-telemetry-fix-connected-clients-count.patch 2024-03-05 14:08:54.758521051 +0000 @@ -1 +1 @@ -From e14bb5f1050924de1602033596d5b417bfbeee52 Mon Sep 17 00:00:00 2001 +From 1af693e0074daa8f727c3d68592b67f99916359b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e14bb5f1050924de1602033596d5b417bfbeee52 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index aa569ff456..a0756974e2 100644 +index dde19c1fe8..8cb4e2f619 100644 @@ -31 +32 @@ -@@ -1282,4 +1282,5 @@ Shannon Nelson +@@ -1233,4 +1233,5 @@ Shannon Nelson @@ -38 +39 @@ -index 47846ef868..d4720197ba 100644 +index e73f4a593e..075672d91d 100644 @@ -41 +42 @@ -@@ -379,6 +379,6 @@ client_handler(void *sock_id) +@@ -375,6 +375,6 @@ client_handler(void *sock_id) @@ -46 +47 @@ -+ TMTY_LOG_LINE(ERR, "Socket write base info to client failed"); ++ TMTY_LOG(ERR, "Socket write base info to client failed\n"); @@ -50 +51 @@ -@@ -405,4 +405,5 @@ client_handler(void *sock_id) +@@ -401,4 +401,5 @@ client_handler(void *sock_id) @@ -55 +56 @@ - rte_atomic_fetch_sub_explicit(&v2_clients, 1, rte_memory_order_relaxed); + __atomic_sub_fetch(&v2_clients, 1, __ATOMIC_RELAXED);