patch 'mempool: fix telemetry data truncation' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Mon Feb 27 07:59:02 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

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

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

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 16f272c96f1bcbc470629f825d67bcf20a598a31 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong at huawei.com>
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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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 <lihuisong at huawei.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
---
 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 f33f455790..950d01ffac 100644
--- a/lib/mempool/rte_mempool.c
+++ b/lib/mempool/rte_mempool.c
@@ -1500,27 +1500,27 @@ mempool_info_cb(struct rte_mempool *mp, void *arg)
 		return;

 	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);
 }

 static int
--
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-27 14:08:42.046453300 +0800
+++ 0035-mempool-fix-telemetry-data-truncation.patch	2023-02-27 14:08:40.749237000 +0800
@@ -1 +1 @@
-From 4eebfcf70a21b2b608e3bb9f20b5ee23338172ec Mon Sep 17 00:00:00 2001
+From 16f272c96f1bcbc470629f825d67bcf20a598a31 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 4eebfcf70a21b2b608e3bb9f20b5ee23338172ec ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list