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 4E68641D52 for ; Thu, 23 Feb 2023 16:07:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4A44843241; Thu, 23 Feb 2023 16:07:28 +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 1703E43244 for ; Thu, 23 Feb 2023 16:07:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677164845; 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=vAhraEY6Ehf9i+EENfbekqqWvJNTYIuINFoacb3rBN4=; b=LrJ/AWs7wU3jVdn97GRfsLKruWPwylmnKwLEJZoTDD1KSXoQ4Tkpq2ARQC8/GmaGDy5Vbn Pf/4q0WWavB+dakd3xR6C4BJ4NR+1opXqkA2BlkfdGoumxI+A6waushuN88pI4qrSFgjJN hjWcbcL5WIZ5POkTUXmWa1M1LtbY2oY= 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-616-7ZxlCP9LMw-LW4ahOk7Hew-1; Thu, 23 Feb 2023 10:07:23 -0500 X-MC-Unique: 7ZxlCP9LMw-LW4ahOk7Hew-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 EC6F13814590; Thu, 23 Feb 2023 15:07:10 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id B6BE52166B38; Thu, 23 Feb 2023 15:07:09 +0000 (UTC) From: Kevin Traynor To: Huisong Li Cc: =?UTF-8?q?Morten=20Br=C3=B8rup?= , Chengwen Feng , dpdk stable Subject: patch 'ethdev: fix telemetry data truncation' has been queued to stable release 21.11.4 Date: Thu, 23 Feb 2023 15:05:08 +0000 Message-Id: <20230223150631.723699-17-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/86d2c8b77c6df2fa43bf863fdf807f8c1e31466d Thanks. Kevin --- >From 86d2c8b77c6df2fa43bf863fdf807f8c1e31466d Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Mon, 19 Dec 2022 15:06:42 +0800 Subject: [PATCH] ethdev: fix telemetry data truncation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 7db3f2af573287abb9201d46a92b4ca3ebc5d9ad ] The 'u32' and 'u64' data can not assigned to 'int' type variable. They need to use the 'u64' APIs to add. Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info") Signed-off-by: Huisong Li Acked-by: Morten Brørup Acked-by: Chengwen Feng --- lib/ethdev/rte_ethdev.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index 62e67f006d..0320694f82 100644 --- a/lib/ethdev/rte_ethdev.c +++ b/lib/ethdev/rte_ethdev.c @@ -6369,7 +6369,7 @@ eth_dev_handle_port_info(const char *cmd __rte_unused, rte_tel_data_add_dict_int(d, "port_id", eth_dev->data->port_id); rte_tel_data_add_dict_int(d, "mtu", eth_dev->data->mtu); - rte_tel_data_add_dict_int(d, "rx_mbuf_size_min", + rte_tel_data_add_dict_u64(d, "rx_mbuf_size_min", eth_dev->data->min_rx_buf_size); - rte_tel_data_add_dict_int(d, "rx_mbuf_alloc_fail", + rte_tel_data_add_dict_u64(d, "rx_mbuf_alloc_fail", eth_dev->data->rx_mbuf_alloc_failed); rte_ether_format_addr(mac_addr, sizeof(mac_addr), @@ -6400,10 +6400,10 @@ eth_dev_handle_port_info(const char *cmd __rte_unused, rte_tel_data_add_dict_container(d, "txq_state", txq_state, 0); rte_tel_data_add_dict_int(d, "numa_node", eth_dev->data->numa_node); - rte_tel_data_add_dict_int(d, "dev_flags", eth_dev->data->dev_flags); - rte_tel_data_add_dict_int(d, "rx_offloads", + rte_tel_data_add_dict_u64(d, "dev_flags", eth_dev->data->dev_flags); + rte_tel_data_add_dict_u64(d, "rx_offloads", eth_dev->data->dev_conf.rxmode.offloads); - rte_tel_data_add_dict_int(d, "tx_offloads", + rte_tel_data_add_dict_u64(d, "tx_offloads", eth_dev->data->dev_conf.txmode.offloads); - rte_tel_data_add_dict_int(d, "ethdev_rss_hf", + rte_tel_data_add_dict_u64(d, "ethdev_rss_hf", eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf); -- 2.39.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-23 14:46:24.263299468 +0000 +++ 0017-ethdev-fix-telemetry-data-truncation.patch 2023-02-23 14:46:23.724235806 +0000 @@ -1 +1 @@ -From 7db3f2af573287abb9201d46a92b4ca3ebc5d9ad Mon Sep 17 00:00:00 2001 +From 86d2c8b77c6df2fa43bf863fdf807f8c1e31466d Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 7db3f2af573287abb9201d46a92b4ca3ebc5d9ad ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 5d5e18db1e..a40d396677 100644 +index 62e67f006d..0320694f82 100644 @@ -26 +27 @@ -@@ -6038,7 +6038,7 @@ eth_dev_handle_port_info(const char *cmd __rte_unused, +@@ -6369,7 +6369,7 @@ eth_dev_handle_port_info(const char *cmd __rte_unused, @@ -36 +37 @@ -@@ -6069,10 +6069,10 @@ eth_dev_handle_port_info(const char *cmd __rte_unused, +@@ -6400,10 +6400,10 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,