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 4CFF441D52 for ; Thu, 23 Feb 2023 16:07:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E30D84325D; Thu, 23 Feb 2023 16:07:37 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 4CCD243250 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=1677164855; 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=rBg8iRpuiTrx5sBSYano4clhVNsuvd6REMF7rK9VwTU=; b=GI0aMcJSsL4Ay+ca/Skmkv0zee5ieIIqT92Gm2jAVE727q2I/vtvvJqNB+xJUhLqHN/wzZ Cqlx8NNv2s+j1I8kKWPWCDR5fPQq2Q0Fh2j7LNROYVXvswV9OumDgr0tJE3HcC4L5xryvr ieN4POwfLApOAMEM6Z2Dp+bvelVhlq4= 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-219-U09FwGKcN_yk8e_RTRdNtw-1; Thu, 23 Feb 2023 10:07:30 -0500 X-MC-Unique: U09FwGKcN_yk8e_RTRdNtw-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 698EB3C10EC8; Thu, 23 Feb 2023 15:07:12 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 636A82166B29; Thu, 23 Feb 2023 15:07:11 +0000 (UTC) From: Kevin Traynor To: Huisong Li Cc: =?UTF-8?q?Morten=20Br=C3=B8rup?= , Chengwen Feng , dpdk stable Subject: patch 'mempool: fix telemetry data truncation' has been queued to stable release 21.11.4 Date: Thu, 23 Feb 2023 15:05:09 +0000 Message-Id: <20230223150631.723699-18-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/119d73b152eca50244c3f99a26c5ee388dd0e01a Thanks. Kevin --- >From 119d73b152eca50244c3f99a26c5ee388dd0e01a Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Mon, 19 Dec 2022 15:06:43 +0800 Subject: [PATCH] mempool: fix telemetry data truncation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 4eebfcf70a21b2b608e3bb9f20b5ee23338172ec ] The 'u32' and 'u64' data can not assigned to 'int' type variable. They need to use the 'u64' APIs to add. Fixes: 2f5c4025abb3 ("mempool: add telemetry endpoint") Signed-off-by: Huisong Li Acked-by: Morten Brørup Acked-by: Chengwen Feng --- lib/mempool/rte_mempool.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c index 3c9a1ad71a..40e6d17409 100644 --- a/lib/mempool/rte_mempool.c +++ b/lib/mempool/rte_mempool.c @@ -1493,25 +1493,25 @@ mempool_info_cb(struct rte_mempool *mp, void *arg) rte_tel_data_add_dict_string(info->d, "name", mp->name); - rte_tel_data_add_dict_int(info->d, "pool_id", mp->pool_id); - rte_tel_data_add_dict_int(info->d, "flags", mp->flags); + rte_tel_data_add_dict_u64(info->d, "pool_id", mp->pool_id); + rte_tel_data_add_dict_u64(info->d, "flags", mp->flags); rte_tel_data_add_dict_int(info->d, "socket_id", mp->socket_id); - rte_tel_data_add_dict_int(info->d, "size", mp->size); - rte_tel_data_add_dict_int(info->d, "cache_size", mp->cache_size); - rte_tel_data_add_dict_int(info->d, "elt_size", mp->elt_size); - rte_tel_data_add_dict_int(info->d, "header_size", mp->header_size); - rte_tel_data_add_dict_int(info->d, "trailer_size", mp->trailer_size); - rte_tel_data_add_dict_int(info->d, "private_data_size", + rte_tel_data_add_dict_u64(info->d, "size", mp->size); + rte_tel_data_add_dict_u64(info->d, "cache_size", mp->cache_size); + rte_tel_data_add_dict_u64(info->d, "elt_size", mp->elt_size); + rte_tel_data_add_dict_u64(info->d, "header_size", mp->header_size); + rte_tel_data_add_dict_u64(info->d, "trailer_size", mp->trailer_size); + rte_tel_data_add_dict_u64(info->d, "private_data_size", mp->private_data_size); rte_tel_data_add_dict_int(info->d, "ops_index", mp->ops_index); - rte_tel_data_add_dict_int(info->d, "populated_size", + rte_tel_data_add_dict_u64(info->d, "populated_size", mp->populated_size); mz = mp->mz; rte_tel_data_add_dict_string(info->d, "mz_name", mz->name); - rte_tel_data_add_dict_int(info->d, "mz_len", mz->len); - rte_tel_data_add_dict_int(info->d, "mz_hugepage_sz", + rte_tel_data_add_dict_u64(info->d, "mz_len", mz->len); + rte_tel_data_add_dict_u64(info->d, "mz_hugepage_sz", mz->hugepage_sz); rte_tel_data_add_dict_int(info->d, "mz_socket_id", mz->socket_id); - rte_tel_data_add_dict_int(info->d, "mz_flags", mz->flags); + rte_tel_data_add_dict_u64(info->d, "mz_flags", mz->flags); } -- 2.39.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-23 14:46:24.288470907 +0000 +++ 0018-mempool-fix-telemetry-data-truncation.patch 2023-02-23 14:46:23.725235809 +0000 @@ -1 +1 @@ -From 4eebfcf70a21b2b608e3bb9f20b5ee23338172ec Mon Sep 17 00:00:00 2001 +From 119d73b152eca50244c3f99a26c5ee388dd0e01a Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 4eebfcf70a21b2b608e3bb9f20b5ee23338172ec ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index f33f455790..950d01ffac 100644 +index 3c9a1ad71a..40e6d17409 100644 @@ -26 +27 @@ -@@ -1501,25 +1501,25 @@ mempool_info_cb(struct rte_mempool *mp, void *arg) +@@ -1493,25 +1493,25 @@ mempool_info_cb(struct rte_mempool *mp, void *arg)