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

Xueming Li xuemingl at nvidia.com
Tue Mar 5 10:46:01 CET 2024


Hi,

FYI, your patch has been queued to stable release 23.11.1

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/31/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=cbd1c165bb1ea86efc31c8ac309ee5e7c5f555cb

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From cbd1c165bb1ea86efc31c8ac309ee5e7c5f555cb 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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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 ab0742a382..8d8f5b1b5d 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1278,6 +1278,7 @@ Shally Verma <shallyv at marvell.com> <shally.verma at caviumnetworks.com>
 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>
 Shay Agroskin <shayagr at amazon.com>
diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
index 92982842a8..ee4718a4b3 100644
--- a/lib/telemetry/telemetry.c
+++ b/lib/telemetry/telemetry.c
@@ -377,8 +377,8 @@ client_handler(void *sock_id)
 			"{\"version\":\"%s\",\"pid\":%d,\"max_output_len\":%d}",
 			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;
 	}

 	/* receive data is not null terminated */
@@ -403,6 +403,7 @@ client_handler(void *sock_id)

 		bytes = read(s, buffer, sizeof(buffer) - 1);
 	}
+exit:
 	close(s);
 	rte_atomic_fetch_sub_explicit(&v2_clients, 1, rte_memory_order_relaxed);
 	return NULL;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:31.698145124 +0800
+++ 0020-telemetry-fix-connected-clients-count.patch	2024-03-05 17:39:30.693566490 +0800
@@ -1 +1 @@
-From e14bb5f1050924de1602033596d5b417bfbeee52 Mon Sep 17 00:00:00 2001
+From cbd1c165bb1ea86efc31c8ac309ee5e7c5f555cb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit e14bb5f1050924de1602033596d5b417bfbeee52 ]
@@ -16 +18,0 @@
-Cc: stable at dpdk.org
@@ -28 +30 @@
-index aa569ff456..a0756974e2 100644
+index ab0742a382..8d8f5b1b5d 100644
@@ -31 +33 @@
-@@ -1281,6 +1281,7 @@ Shally Verma <shallyv at marvell.com> <shally.verma at caviumnetworks.com>
+@@ -1278,6 +1278,7 @@ Shally Verma <shallyv at marvell.com> <shally.verma at caviumnetworks.com>
@@ -40 +42 @@
-index 47846ef868..d4720197ba 100644
+index 92982842a8..ee4718a4b3 100644
@@ -43 +45 @@
-@@ -378,8 +378,8 @@ client_handler(void *sock_id)
+@@ -377,8 +377,8 @@ client_handler(void *sock_id)
@@ -49 +51 @@
-+		TMTY_LOG_LINE(ERR, "Socket write base info to client failed");
++		TMTY_LOG(ERR, "Socket write base info to client failed\n");
@@ -54 +56 @@
-@@ -404,6 +404,7 @@ client_handler(void *sock_id)
+@@ -403,6 +403,7 @@ client_handler(void *sock_id)


More information about the stable mailing list