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 4499641C40; Wed, 8 Feb 2023 15:15:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF38E4014F; Wed, 8 Feb 2023 15:15:29 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id D80AD40141 for ; Wed, 8 Feb 2023 15:15:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675865728; x=1707401728; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=k22VUPJ8IDyq/iR2+aIPNFKpZlC4dISxeoHnriZCFrU=; b=eF/TE8SgCJ2MzqtbMH0ey4b/NN/cjTTdx8wvVIfgxqHK+lRoRE83qdWu +34O92dg67HjSKXVQJeie+E1kyRfQ+wqqqYrVD0JmGIGIOuf2LEEaFUfA 2+kaHCFlV+THxFTjMjVSY1mhv6nG7Uu83b4ceqpLdhP4XxLyqQdIWaW5W geWTka2SoaaQGwcZgNjFrh7xCVnqepBprKFaYyNUBGL10Z30GdYjVj1pq Cf4PQDOEVK74sNeaWcb9XmIjZhF2S5yo6NjbuDlVBSPZvYvjMmO9exQrq RmOJWM58aHgv6i5L64ktcHkFsn76YGzuQl0u1r7boqYZ1kaS9BeApYfej g==; X-IronPort-AV: E=McAfee;i="6500,9779,10615"; a="329830396" X-IronPort-AV: E=Sophos;i="5.97,281,1669104000"; d="scan'208";a="329830396" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2023 06:15:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10615"; a="617227414" X-IronPort-AV: E=Sophos;i="5.97,281,1669104000"; d="scan'208";a="617227414" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga003.jf.intel.com with ESMTP; 08 Feb 2023 06:15:26 -0800 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 8 Feb 2023 06:15:26 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 8 Feb 2023 06:15:26 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Wed, 8 Feb 2023 06:15:26 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Wed, 8 Feb 2023 06:15:25 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Llk8yrPEuwk6ho+mcCd20OFt+ChqGtX1YU2shSiPv7GbvqBNTqTHbixoKXCq17e/qShOmWmTaLjdQjEFv74iAo8ykvujiVgI6lOCMZQjIxE0Ook/b31yAisFWJIXUXemOSe4CpvkpCXazpoE1Mrg3G8eE76iUn2SfkgHjk+PD7CWDBGyVbCubZlE1AAm8mreFzZTcuaul4sD4nGDs9cB3blbEvJryPu2AVcVv4It+hWD9Om4nfcNfMLmX+pHgtJBCUWjtKmQObNxvgW8AxM+l1D7DIICt8aHCeztpr89X+98vH1demeQHy5RTzkP1YtM+oM6deTECRWk0VCODTewuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ni0T22XOVh4EmQNxi9ljS/kydJiTMnX3Jr+sb1reO2E=; b=Aq5zWQznat80R4s4ys1uYAAmj5x0HED2EG3idvpBbJO6INKvG5R1Px+43YrM/A+dDiotEJ9pXyCEMWuQxCrdIlTfHWsGupuGPudfhiT+k7j0i2hvLjVcbhesEJAxSMuSfc2t11v6fEpzKmu/qdoR+izjVK/cvlQ1E+hm3xw04uaimtrYKVpSOnepm3Gxo1VR8v5PM0UPO4tEb0kM6Srnn6VMotEX136i8HpiUZeyj0ot8cOEbtUuEknp/KEdkq9gbrYOQhuwz5KSF/fEKAgAaVD5a+oOifbxZDDAmNmhaet2IdgNXYUzB5mztRB7rcNSmDvbn+hsW13474bv3y3DgQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by CO1PR11MB4962.namprd11.prod.outlook.com (2603:10b6:303:99::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17; Wed, 8 Feb 2023 14:15:23 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::aaba:abb7:8794:def]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::aaba:abb7:8794:def%9]) with mapi id 15.20.6086.017; Wed, 8 Feb 2023 14:15:23 +0000 Date: Wed, 8 Feb 2023 14:15:15 +0000 From: Bruce Richardson To: Chengwen Feng CC: , , , , , Subject: Re: [PATCH v4 2/5] telemetry: fix repeat display when callback don't init dict Message-ID: References: <20221219090723.29356-1-fengchengwen@huawei.com> <20230120033456.29710-1-fengchengwen@huawei.com> <20230120033456.29710-3-fengchengwen@huawei.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20230120033456.29710-3-fengchengwen@huawei.com> X-ClientProxiedBy: LO4P265CA0136.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2c4::12) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|CO1PR11MB4962:EE_ X-MS-Office365-Filtering-Correlation-Id: 5b2acfe4-4204-4fd4-5b31-08db09deead6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cSCbjdQCo5Kxfgek9NFgkAWoZz7I4ltNq7+eFQwIPuijLwSEuVwDfJXEZpDiUvlADiWtpZakKWv49TZlZU8ZTwX7wGPoVLi87brITtk7E1ZN5qhVLLCIfvR3PT+VgmOFDwmPl4NroEiDsQ2hRECMWcYG6wuINcjUYXoPPIBOwYuCkrDbLBqofsi/jOv0SXsNKlTEzBdtmt0tOcMv+JHXi1W//fWTvjH7WzDqrTewOE19Uin2qbKGvmUHKxdWrhM9ro2t65O7XWyRnFVdhQFwpXi/MN4iIE6N61y+IduEXyziZpnN0kJjaaBAo0q+uM5I56RGoqIn5CHWv9UfMmUxnaHLD0fgT0my2Pq5u96Ttu2kEIq2L46LCAI5GzRyUf5eHttTsBskvRwFDpPToPzU7MGqYsoq/Yw3aojip831OdUK+zd4fGiun91IKq65+Nv8cOkwsQyvGo28eisJQnF34PE2IGvtyaJ0uLmnKMECkxyQ0QSmx1p9bjeol3LsMIy5di6oFFfsYlHHWukzrvfTDLKluVQnDdq1DeVkr+1uUEbX6FWeIL/UirwdU4YTT24AgUwLYXRKhtpL6zRQWtFOyvfxr331DuhAQosTg0AaGt2xbG1fYuz5CvLzoMzMReKvcfygeXXyYgD13Ir1ZjWy8mNyraJhRGLqiVXcz9PFxTGEyGiyJDBRf7LKlX/i1WdN X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(376002)(396003)(346002)(136003)(366004)(39860400002)(451199018)(83380400001)(2906002)(316002)(478600001)(6486002)(82960400001)(38100700002)(66946007)(66556008)(4326008)(6916009)(8676002)(44832011)(41300700001)(6506007)(8936002)(5660300002)(86362001)(6512007)(186003)(26005)(107886003)(66476007)(6666004)(67856001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?L70cHfetV+yZBOc4SfcBsk3OFuw6rNXq7UBAib2kl0+34rryvjeUtAijCJvG?= =?us-ascii?Q?6jnQPz1PAoqGr000ycaDY/O7p0r5IQw0RQ2zluPi+Gj8DvZKst6aXtOlciWd?= =?us-ascii?Q?/0mT8+IJWrlnK4oUeVrVBLcZu9VhXTI1raYHw6lkgNKBc3uCwufGOK/MeyQz?= =?us-ascii?Q?P1rE4NmyySYdTkqS4KUNg2Jlv1Jzq381RIjGGUei5DLPpeJNV+5zZXhux5Ci?= =?us-ascii?Q?6ZJC6SKKGCBiMVXwfILM1xC2ay7uWNoaWun1Pjelq9mW5GQmDDzJhmY3K1k2?= =?us-ascii?Q?xz1PSsXg1MDJAd+p5sXlre935gUHQHg9AOLPs4hTr4KDhV02Ru8VYVNl42Xw?= =?us-ascii?Q?YPSjrp1istvptwyj+OsH6hh79o/43mx21WFt2rJvN+8WJVweUKb0o4xuhW58?= =?us-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X29k58THLv9rS+?= =?us-ascii?Q?D+HGBJ8nznJwY5uHvD7v790wMihTYd7DXsMcHSsZF09IiS2xQZoZisQLhzjn?= =?us-ascii?Q?jOftk9x+PBuX3QNbxhQCu8+jX+oKr5GGvAvI65/vgp7Phavs+9ziXAANlttl?= =?us-ascii?Q?dHIIVuiDmSVwZaG+qUFr9bin6agxOX/ioYEfJ0e/zw/FgpmOaXE1IcI33WLQ?= =?us-ascii?Q?RynVf/LLeAwencHPw3Pq1axemPh70G7ybJothY8GCXDSI5J9C9ojjTFa+SdF?= =?us-ascii?Q?gUTB8THEWZqEr1KCFnlhOmBVGCSRF7cANnN4czSzR9/P9VkyopVlLZQvf4c5?= =?us-ascii?Q?Gw=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 5b2acfe4-4204-4fd4-5b31-08db09deead6 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2023 14:15:23.3176 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BJyenw9wPPl7zNe3OVlVx7BG5XKRyTfwpLfgXYM4/4vW9UN/CMIX2tv5oKgUnzHHa/XuEBPcOK9ZZGolCp5ri/TwtGgD2tVo3Iu/DwSm3HI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4962 X-OriginatorOrg: intel.com 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 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? Thanks, /Bruce