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 A3A5443885; Wed, 10 Jan 2024 18:49:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 23B8D4025E; Wed, 10 Jan 2024 18:49:20 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id E59334021E for ; Wed, 10 Jan 2024 18:49:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704908958; x=1736444958; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=c4/wJ1zLo470XquTdqWzm9D01w41drLeghN0jmIzkpY=; b=h50yjaXsyZEE2zxmkdEJOKeiSBIcADj0rFcKpaVRLANshVzcPKow61hG BYm+BqUwSpsLkYOjc7LB4YJ3eGSSuoUTU7nOaUwcrocnrDbQwg28QBtRl f0esU8aQJN2tC6xIQG9+4hInavG31kZ5y7MeypvXiNSVwa9MXmm6uIRpf ZtV28p6SthKk4S1hN6H+frROvi7Y8dCyhyZgd9TrIi8HaBAzCFhMSS5tc sYbko6P7/f6HkqDC57VJ7KnzCRc+7KfpG9prDW4DQjV8rzD7dO4F9zS3E xhok8ISLVvqxRP0V2Dy1or0MAtvXObJsaKitII0SOsVCsqKywDD8NoI+n w==; X-IronPort-AV: E=McAfee;i="6600,9927,10949"; a="395744052" X-IronPort-AV: E=Sophos;i="6.04,184,1695711600"; d="scan'208";a="395744052" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2024 09:49:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10949"; a="905623062" X-IronPort-AV: E=Sophos;i="6.04,184,1695711600"; d="scan'208";a="905623062" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga004.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 10 Jan 2024 09:49:16 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 10 Jan 2024 09:49:16 -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.35 via Frontend Transport; Wed, 10 Jan 2024 09:49:16 -0800 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.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.35; Wed, 10 Jan 2024 09:49:14 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lOaedyy6h+bPCmLcKRm5sVQ2NGQ6TpX1zfSI/0iZssjVM2kxteZco3P9mdhrtlTRT9h84Q+8uN5pFCN/xLwuxQPBsY5xc953NXlzORE/Ijm2FH1KYhx2S8FOmhxxanZZmIeSP1WQvd5UAnqhqRMOw9xaZ//OmIqp8vAZZK3DIaRedZUp4vVv7NQvrFjC8FxtEzDDD39U0K4bctvumMPI0g+hinwN/3+BU9kvbozXacq4kWwA68TXJXywcnBqb0rS5WqKW/rqg2Jsd7W3s8RDVeg2hdPt3dt8QrpMeEf55pyfkBqOazd+g1xoV0S06pLR+ePf1iFydi8NtH0nuadawg== 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=qwhhn5FhBSxDzqQMUbNbvK3APSUClwMD9/4rqmcj5js=; b=A3kFHJLMrixHIjMCFdE7H0EkGKyyWZoTPULWXtGyT0RzZtgOrzoFiZ6eM3NR8/wOYBchh4uV+PU+oAQpfJ2jOY5SlPMqPegMdM/FkRe5jk0zug2mQyFm+HJ/9Nl3a1X0uHVLrdoiha5f9TQlSgUUn6f554j2vape65ww7KVIVagvZnZMKv7jeesl3AGNnYn7kVlv+NfWhuF/1e3NEimLwaGl7xFl5NhCppxtDFI6ojQD25oYTkfxvs4Kb5+rHynkTyRnvwbndbUHW+v4kGEyWXKpgT8CjLO1s5xS5MWwUo87Ou+9wpbxDKSir+woghwOGE7kfMd0rUHRrkO57Eft+w== 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 Received: from SN7PR11MB7639.namprd11.prod.outlook.com (2603:10b6:806:32a::14) by MW4PR11MB6888.namprd11.prod.outlook.com (2603:10b6:303:22d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.21; Wed, 10 Jan 2024 17:49:12 +0000 Received: from SN7PR11MB7639.namprd11.prod.outlook.com ([fe80::8a06:eadf:e98b:23ad]) by SN7PR11MB7639.namprd11.prod.outlook.com ([fe80::8a06:eadf:e98b:23ad%2]) with mapi id 15.20.7181.015; Wed, 10 Jan 2024 17:49:12 +0000 From: "Power, Ciara" To: Jonathan Erb CC: "dev@dpdk.org" Subject: RE: [PATCH v2 1/2] telemetry: correct json empty dictionaries Thread-Topic: [PATCH v2 1/2] telemetry: correct json empty dictionaries Thread-Index: AQHaNrTqVb6doT6qM0yGPARdpdubP7DTbL9g Date: Wed, 10 Jan 2024 17:49:12 +0000 Message-ID: References: <20231224220201.762377-1-jonathan.erb@threater.com> In-Reply-To: <20231224220201.762377-1-jonathan.erb@threater.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN7PR11MB7639:EE_|MW4PR11MB6888:EE_ x-ms-office365-filtering-correlation-id: bfdeda14-e83b-4ec2-2247-08dc120474a1 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: l/PMvmhDXMB6rOfecs7F/x7m0v/hnsWgpye9SXWCH3GZdYuncxznOlOPnWU3L9HG2OEZePKi9qeVDkS83y1uElk5fRMn91vIoJ2BlhWofuNFx1c+J4VW99FY1Qr4QrVSIW5iwPjPIxr62CXVViCNoUIqDdOX0TmKxR19eRB9rSrMYnbEORe9y/5I4MqQPQlBxqf3TAInxchVDUsu2oKpMIFFylt64X+TDtnn7aL9aUYKoH2ddMrwuoZ1G1FLqgsO7FV+l4fppBWuAfQsuqeK2V0C9h+Jwo50h6N5OaOr2GLc28cQNUxf4q3Ix3yBH9mzcmNLg6iN5CIT3EuDjGIf4xZnot3gUboqsB+Za+bBykENDW+gtCINePKtEx0dHfEp31fKGThNLoGD2CdeOKhPDbj8R2BuCmxtNAe5MTxSKY9nlnpozZuydkpNshPWfTuCJHubYjrML5srF7QY2kgxGH6AMSyjNRRZCcn5IuIvfBVcbclBsmtTjKIYovPLlLWxUhWsiplj4N4B8TdwmcreeGOBWS3bv7v2K030Ak5BqibSa3Cr3PzdpceCtxInDZUISNfqCXDTK0NPTe2K72CNZP97SBXQjogGfLJMGdAgx4hUNAdSvbKH1OHAzAtAU4fA x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN7PR11MB7639.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(346002)(396003)(136003)(39860400002)(366004)(230922051799003)(186009)(64100799003)(451199024)(1800799012)(66556008)(66476007)(52536014)(66446008)(76116006)(8676002)(66946007)(8936002)(478600001)(26005)(83380400001)(64756008)(71200400001)(55016003)(6916009)(2906002)(4326008)(5660300002)(38070700009)(7696005)(122000001)(38100700002)(41300700001)(316002)(82960400001)(86362001)(6506007)(9686003)(33656002)(53546011); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?yYk3qNWwA4Ieo3cBURVxf7gaNBuIUgfuk2/DQlnmyylAHbCedkZMkbVlbgs6?= =?us-ascii?Q?ZywkULZbvrw6GHA40x6zpxGWvPm1lyAEFaCDCEiZXFyfKyinD6nWNOzX+kNV?= =?us-ascii?Q?zYr+TOzTaC6hhRc8DkQE9TAIbNANAg1IXTPB3+7LNzYGG3X+m4WhSvAQxY21?= =?us-ascii?Q?tP3TX/7y2mFqrN3zGwcVlx5X/qRKSRYmY1LhInQyxthixcgCwZnvbRzQV1Dp?= =?us-ascii?Q?RrIaBBScMSba9LkjvGZFJ4R1pZaSpPFJsTVYm3Gr2UUk2WT3VsZUtkrlkPM0?= =?us-ascii?Q?i8lmojNZy+i68N7EDzoEn/UEhQJBOiKz54qah//d56aTaIwpF+wJdHcodQ1l?= =?us-ascii?Q?ejXCtdVbPehAQstV1HPrZKOC1Dqt00IJAuSx8jBn3BXSfPDj/ia9WsVPQdO3?= =?us-ascii?Q?Qn9SayTrx/lurqWndmTc/ZDKOKokq8+jPxvOGJuIUW28jJHPjRSa8fi7w6+j?= =?us-ascii?Q?i62lZHqgg+oPZKTfKg0IcIdNbuc77fNCwrWNcEQgf8DNlEOwpjk/WlvtAr0v?= =?us-ascii?Q?sf3oVlCkRTjdwAvkT0n/SVvtwZOrwT07GXfeH/chA53xdvTgEukH+1/mutgo?= =?us-ascii?Q?fzgPfE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rxmpPsQkKkCJ2+UL?= =?us-ascii?Q?gNQTUvvbl4LrAQqKGf+AmlPMWfMIOsAKw0rziycZ1yvEwu8hVh26g22zofdk?= =?us-ascii?Q?mMRAshDl22wHOTwvfIg1MToViJuwP5z00TIoK943?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB7639.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bfdeda14-e83b-4ec2-2247-08dc120474a1 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Jan 2024 17:49:12.5624 (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: a6qw1v70Uj7uGkR1A/c2UOG19cq1PJlz6GW+F9aA3VXdQ3DvXxd/mISri8ITVuq06ZVAafgSCQnCF6cD5HYEZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR11MB6888 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 Hi Jonathan, > -----Original Message----- > From: Jonathan Erb > Sent: Sunday, December 24, 2023 10:02 PM > To: Power, Ciara > Cc: dev@dpdk.org; Jonathan Erb > Subject: [PATCH v2 1/2] telemetry: correct json empty dictionaries >=20 > Fix to allow telemetry to handle empty dictionaries correctly. >=20 > This patch resolves an issue where empty dictionaries are reported by > telemetry as '[]' rather than '{}'. Initializing the output buffer based = on the > container type resolves the issue. >=20 > Signed-off-by: Jonathan Erb > --- > .mailmap | 2 +- > lib/telemetry/telemetry.c | 6 +++++- > 2 files changed, 6 insertions(+), 2 deletions(-) >=20 > diff --git a/.mailmap b/.mailmap > index ab0742a382..a3302ba7a1 100644 > --- a/.mailmap > +++ b/.mailmap > @@ -675,7 +675,7 @@ John Ousterhout John > Romein John W. Linville Jon= as > Pfefferle -Jonathan Erb > > +Jonathan Erb > Jonathan Tsai Jon DeVree > Jon Loeliger diff --git a/lib/telemetry/telemetry.c > b/lib/telemetry/telemetry.c index 92982842a8..0788a32210 100644 > --- a/lib/telemetry/telemetry.c > +++ b/lib/telemetry/telemetry.c > @@ -169,7 +169,11 @@ container_to_json(const struct rte_tel_data *d, char > *out_buf, size_t buf_len) > d->type !=3D TEL_ARRAY_INT && d->type !=3D > TEL_ARRAY_STRING) > return snprintf(out_buf, buf_len, "null"); >=20 > - used =3D rte_tel_json_empty_array(out_buf, buf_len, 0); > + if (d->type =3D=3D RTE_TEL_DICT) > + used =3D rte_tel_json_empty_obj(out_buf, buf_len, 0); > + else > + used =3D rte_tel_json_empty_array(out_buf, buf_len, 0); > + > if (d->type =3D=3D TEL_ARRAY_UINT) > for (i =3D 0; i < d->data_len; i++) > used =3D rte_tel_json_add_array_uint(out_buf, > -- > 2.34.1 +1 for Bruce's suggestion to squash patch #2 into this one. Thanks, Acked-by: Ciara Power