patch 'telemetry: fix connected clients count' has been queued to stable release 21.11.7

Kevin Traynor ktraynor at redhat.com
Tue Mar 5 16:34:43 CET 2024


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 at 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 at qq.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Ciara Power <ciara.power at intel.com>
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
---
 .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 <snelson at pensando.io>
 Shannon Zhao <zhaoshenglong at huawei.com>
 Shaopeng He <shaopeng.he at intel.com>
+Shaowei Sun <1819846787 at qq.com>
 Sharmila Podury <sharmila.podury at att.com>
 Sharon Haroni <sharon.haroni at intel.com>
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 at dpdk.org
@@ -28 +29 @@
-index aa569ff456..a0756974e2 100644
+index dde19c1fe8..8cb4e2f619 100644
@@ -31 +32 @@
-@@ -1282,4 +1282,5 @@ Shannon Nelson <snelson at pensando.io>
+@@ -1233,4 +1233,5 @@ Shannon Nelson <snelson at pensando.io>
@@ -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);



More information about the stable mailing list