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 D7B9C43C60 for ; Thu, 7 Mar 2024 02:33:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D3BF040E5A; Thu, 7 Mar 2024 02:33:18 +0100 (CET) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by mails.dpdk.org (Postfix) with ESMTP id 6722640261 for ; Thu, 7 Mar 2024 02:33:17 +0100 (CET) Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-512bde3d197so361032e87.0 for ; Wed, 06 Mar 2024 17:33:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709775197; x=1710379997; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=l3GPyceKKZx6lzLxBfHrPJAfGsL+goUoNeFfaiXj18g=; b=IMSFhShcdVyPSeFrp6l/B8hC4UQBADI0b78QNGYlg25M74LI/I1o22CMFD1MwhNBPO uAeSNTbC8v8lmEx8njEAHLDRlUvbqpTHKlacXblV0H4ez488oKKqG7hpwXNzXd4Q9vMq IeBiplnUL8Is6baYPv0S518m2tq74U98q9SUAv+fUWxBVdXrKh+CndZjYp5cwsV6bolV Ru1AQ3AW/FKbs3Ja8zSO5FBMzZl7DAxcDg8iPBlR4SMqx2j9sdm41+ta5ENfDBNI93gX YvfHB6Jg3FdmmiLsylynhWhrrHmumD2K3O/sGHqIX44/SWPYrzzf3HqFgs+OyIlcKNHK nFog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709775197; x=1710379997; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=l3GPyceKKZx6lzLxBfHrPJAfGsL+goUoNeFfaiXj18g=; b=erv4gfRlNca1HrD6wqEaG+mSDpfsjSRdIF/Vab9C6bohK1jd5kAZdmj0cxVFJj8yMm /nkWvwbKBbAil4zK7pkZc5UISMFYX9630bUeAu1C06741pTFeyLF8aEEkUqSk4ejk+Os QpikwPOKyrqHp/7zzqng8s11z1I1BeY18P3adXEUwAwxZxLE5U3pT4Zo5Ypa1FjnMSJ9 UrgEzshZYIqWV/aF3t/VLyYLBRWzD31GyDgob+nS6BxgWfGrNdzBcyES6W25VgzP2iDQ JiyfBXQv6vy0Jc+O0mAg/VgPMATvPcXjhRmntnOyIy0ny3tf9A1J3rWyeKzlx/a3oHug LS6A== X-Forwarded-Encrypted: i=1; AJvYcCVy+2HObZPDlw4SJicI7WoetT3E2JECbnbRp530w2ExwOb8bGEscH1z50gFqleUwivsL7F8pn+eose/EnA6WkU= X-Gm-Message-State: AOJu0YzBTW0NFH/CDpMAtaWskBv/9rL1eTuTvoppCV+VZkqZdBgD6MLk b7wuLp+chr5zcymgH1pgoclo88a/C8fkPk5jXTg7un7v+r9Q2/OF X-Google-Smtp-Source: AGHT+IFvjgdZGXKZHX59S+anJCVeWyp58qRdULRwupH4nl4+9fWr9OUS30wrUZF43LWhsSsH2cUPtQ== X-Received: by 2002:a19:740d:0:b0:513:25b9:6cf8 with SMTP id v13-20020a19740d000000b0051325b96cf8mr401063lfe.19.1709775196625; Wed, 06 Mar 2024 17:33:16 -0800 (PST) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id m38-20020a05600c3b2600b00412b6fbb9b5sm883085wms.8.2024.03.06.17.33.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 17:33:16 -0800 (PST) From: luca.boccassi@gmail.com 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 22.11.5 Date: Thu, 7 Mar 2024 01:30:33 +0000 Message-Id: <20240307013159.1735343-16-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240307013159.1735343-1-luca.boccassi@gmail.com> References: <20240307013159.1735343-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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@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 a97dce5fcf..6546656551 100644 --- a/.mailmap +++ b/.mailmap @@ -1228,6 +1228,7 @@ Shally Verma Shannon Nelson Shannon Zhao Shaopeng He +Shaowei Sun <1819846787@qq.com> Sharmila Podury Sharon Haroni Shay Agroskin 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@dpdk.org @@ -28 +29 @@ -index aa569ff456..a0756974e2 100644 +index a97dce5fcf..6546656551 100644 @@ -31 +32 @@ -@@ -1281,6 +1281,7 @@ Shally Verma +@@ -1228,6 +1228,7 @@ Shally Verma @@ -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);