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 9A88241D52 for ; Thu, 23 Feb 2023 16:07:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3AD8B43264; Thu, 23 Feb 2023 16:07:38 +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 7F04C43257 for ; Thu, 23 Feb 2023 16:07:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677164856; 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=xR2paR7vnkLfu9qLAl84HMLATAfSX5GboXW4JN3YdXQ=; b=fKHP5OYPVQF4rZ3htlBxzHN9UPapCMpQ3bvGKlSJtIaLq42ISw8Vhz9QcPaB81332vVjOz 0eYUbgOojerGM9MeV2RhA2y24Xz/On6OrK5Kaut70ZjNNw1zE1uJOgQxzumaPICTwPBK7j 8FpH/Sb4RkWyCrqJ9BJoXOO05JIUyvg= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-86-lJOgqMkHNmqA_nRH4blAkA-1; Thu, 23 Feb 2023 10:07:33 -0500 X-MC-Unique: lJOgqMkHNmqA_nRH4blAkA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A970F2806064; Thu, 23 Feb 2023 15:07:14 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id CF4AE2166B2B; Thu, 23 Feb 2023 15:07:13 +0000 (UTC) From: Kevin Traynor To: Huisong Li Cc: =?UTF-8?q?Morten=20Br=C3=B8rup?= , Chengwen Feng , dpdk stable Subject: patch 'mem: fix telemetry data truncation' has been queued to stable release 21.11.4 Date: Thu, 23 Feb 2023 15:05:11 +0000 Message-Id: <20230223150631.723699-20-ktraynor@redhat.com> In-Reply-To: <20230223150631.723699-1-ktraynor@redhat.com> References: <20230223150631.723699-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 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 21.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/28/23. 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/5cac713dff050bd02a7156ca2be9ec9e6a1b4e4c Thanks. Kevin --- >From 5cac713dff050bd02a7156ca2be9ec9e6a1b4e4c Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Mon, 19 Dec 2022 15:06:45 +0800 Subject: [PATCH] mem: fix telemetry data truncation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 6243e36b837b754c33017718cf79f7574a52b09c ] The 'u32' and 'u64' data can not assigned to 'int' type variable. They need to use the 'u64' APIs to add. Fixes: e6732d0d6e26 ("mem: add telemetry infos") Signed-off-by: Huisong Li Acked-by: Morten Brørup Acked-by: Chengwen Feng --- lib/eal/common/eal_common_memory.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/eal/common/eal_common_memory.c b/lib/eal/common/eal_common_memory.c index 616db5ce31..a3f2bdd0ca 100644 --- a/lib/eal/common/eal_common_memory.c +++ b/lib/eal/common/eal_common_memory.c @@ -1134,5 +1134,5 @@ handle_eal_heap_info_request(const char *cmd __rte_unused, const char *params, rte_tel_data_start_dict(d); - rte_tel_data_add_dict_int(d, "Head id", heap_id); + rte_tel_data_add_dict_u64(d, "Head id", heap_id); rte_tel_data_add_dict_string(d, "Name", heap->name); rte_tel_data_add_dict_u64(d, "Heap_size", @@ -1196,11 +1196,11 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused, rte_tel_data_start_dict(d); - rte_tel_data_add_dict_int(d, "Zone", mz_idx); + rte_tel_data_add_dict_u64(d, "Zone", mz_idx); rte_tel_data_add_dict_string(d, "Name", mz->name); - rte_tel_data_add_dict_int(d, "Length", mz->len); + rte_tel_data_add_dict_u64(d, "Length", mz->len); snprintf(addr, ADDR_STR, "%p", mz->addr); rte_tel_data_add_dict_string(d, "Address", addr); rte_tel_data_add_dict_int(d, "Socket", mz->socket_id); - rte_tel_data_add_dict_int(d, "Flags", mz->flags); + rte_tel_data_add_dict_u64(d, "Flags", mz->flags); /* go through each page occupied by this memzone */ @@ -1217,5 +1217,5 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused, ms = rte_fbarray_get(&msl->memseg_arr, ms_idx); - rte_tel_data_add_dict_int(d, "Hugepage_size", page_sz); + rte_tel_data_add_dict_u64(d, "Hugepage_size", page_sz); snprintf(addr, ADDR_STR, "%p", ms->addr); rte_tel_data_add_dict_string(d, "Hugepage_base", addr); -- 2.39.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-23 14:46:24.334056728 +0000 +++ 0020-mem-fix-telemetry-data-truncation.patch 2023-02-23 14:46:23.728235819 +0000 @@ -1 +1 @@ -From 6243e36b837b754c33017718cf79f7574a52b09c Mon Sep 17 00:00:00 2001 +From 5cac713dff050bd02a7156ca2be9ec9e6a1b4e4c Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 6243e36b837b754c33017718cf79f7574a52b09c ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 688dc615d7..8e427bf4b4 100644 +index 616db5ce31..a3f2bdd0ca 100644 @@ -26 +27 @@ -@@ -1140,5 +1140,5 @@ handle_eal_heap_info_request(const char *cmd __rte_unused, const char *params, +@@ -1134,5 +1134,5 @@ handle_eal_heap_info_request(const char *cmd __rte_unused, const char *params, @@ -33 +34 @@ -@@ -1202,11 +1202,11 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused, +@@ -1196,11 +1196,11 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused, @@ -48 +49 @@ -@@ -1223,5 +1223,5 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused, +@@ -1217,5 +1217,5 @@ handle_eal_memzone_info_request(const char *cmd __rte_unused,