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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Mar 7 02:30:33 CET 2024


Hi,

FYI, your patch has been queued to stable release 22.11.5

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/09/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5543f65075a6144697cb0a3ae95643db5cac8f6f

Thanks.

Luca Boccassi

---
>From 5543f65075a6144697cb0a3ae95643db5cac8f6f 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 a97dce5fcf..6546656551 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1228,6 +1228,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 9c3c346ff5..b7fd6f606c 100644
--- a/lib/telemetry/telemetry.c
+++ b/lib/telemetry/telemetry.c
@@ -379,8 +379,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");
+		goto exit;
 	}
 
 	/* receive data is not null terminated */
@@ -405,6 +405,7 @@ client_handler(void *sock_id)
 
 		bytes = read(s, buffer, sizeof(buffer) - 1);
 	}
+exit:
 	close(s);
 	__atomic_sub_fetch(&v2_clients, 1, __ATOMIC_RELAXED);
 	return NULL;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:36.444190114 +0000
+++ 0016-telemetry-fix-connected-clients-count.patch	2024-03-07 01:05:34.686937639 +0000
@@ -1 +1 @@
-From e14bb5f1050924de1602033596d5b417bfbeee52 Mon Sep 17 00:00:00 2001
+From 5543f65075a6144697cb0a3ae95643db5cac8f6f 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 a97dce5fcf..6546656551 100644
@@ -31 +32 @@
-@@ -1281,6 +1281,7 @@ Shally Verma <shallyv at marvell.com> <shally.verma at caviumnetworks.com>
+@@ -1228,6 +1228,7 @@ Shally Verma <shallyv at marvell.com> <shally.verma at caviumnetworks.com>
@@ -40 +41 @@
-index 47846ef868..d4720197ba 100644
+index 9c3c346ff5..b7fd6f606c 100644
@@ -43 +44 @@
-@@ -378,8 +378,8 @@ client_handler(void *sock_id)
+@@ -379,8 +379,8 @@ client_handler(void *sock_id)
@@ -49 +50 @@
-+		TMTY_LOG_LINE(ERR, "Socket write base info to client failed");
++		TMTY_LOG(ERR, "Socket write base info to client failed");
@@ -54 +55 @@
-@@ -404,6 +404,7 @@ client_handler(void *sock_id)
+@@ -405,6 +405,7 @@ client_handler(void *sock_id)
@@ -60 +61 @@
- 	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