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 3E37041C45; Thu, 9 Feb 2023 02:33:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 01CCB40DDA; Thu, 9 Feb 2023 02:33:34 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id BD7474067B for ; Thu, 9 Feb 2023 02:33:32 +0100 (CET) Received: from dggpeml500024.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4PBzqT0jBYzJsLP; Thu, 9 Feb 2023 09:31:49 +0800 (CST) Received: from [10.67.100.224] (10.67.100.224) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 9 Feb 2023 09:33:31 +0800 Subject: Re: [PATCH v4 2/5] telemetry: fix repeat display when callback don't init dict To: Bruce Richardson CC: , , , , , References: <20221219090723.29356-1-fengchengwen@huawei.com> <20230120033456.29710-1-fengchengwen@huawei.com> <20230120033456.29710-3-fengchengwen@huawei.com> From: fengchengwen Message-ID: <049a246f-1774-0eee-3e61-f74231596152@huawei.com> Date: Thu, 9 Feb 2023 09:33:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.100.224] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 2023/2/8 22:15, Bruce Richardson wrote: > On Fri, Jan 20, 2023 at 03:34:53AM +0000, Chengwen Feng wrote: >> When a telemetry callback doesn't initialize the telemetry data >> structure and returns a non-negative number, the telemetry will repeat >> to display the last result. This patch zero the data structure to avoid >> the problem. >> >> Fixes: 6dd571fd07c3 ("telemetry: introduce new functionality") >> Cc: stable@dpdk.org >> >> Signed-off-by: Chengwen Feng >> Reviewed-by: Bruce Richardson >> --- >> lib/telemetry/telemetry.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c >> index 8fbb4f3060..7b905355cd 100644 >> --- a/lib/telemetry/telemetry.c >> +++ b/lib/telemetry/telemetry.c >> @@ -333,7 +333,7 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s) >> static void >> perform_command(telemetry_cb fn, const char *cmd, const char *param, int s) >> { >> - struct rte_tel_data data; >> + struct rte_tel_data data = {0}; >> >> int ret = fn(cmd, param, &data); >> if (ret < 0) { >> -- > > Hi Chengwen, > > this patch is not directly relevant to the rest of the patchset and is a > necessary fix. Can you perhaps submit this fix separately so it can be > merged, even when the rest of the patchset is looking for reviews? done, thanks. > > Thanks, > /Bruce > > . >