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 9C2FAA0543; Wed, 14 Dec 2022 18:30:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 81DEE40684; Wed, 14 Dec 2022 18:30:07 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 53DCF400D6 for ; Wed, 14 Dec 2022 18:30:06 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 369E620B87C8; Wed, 14 Dec 2022 09:30:05 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 369E620B87C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1671039005; bh=PpLXEJw3SfbbmYx7AaBO2nZqi/YFWY1tk/D0AULclbc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=baUuaN3vpH24gghNnCzhVs55gLYhofYF58eC2V5S6UNGDXDeqzPij9QMaomOlGrET mh4R7YatyNnPHPGk62KmvUbrs5xhUIY4wZiXgZ2apFGgLDNjfLDlt5afmLb4le4O0S eyYNFDc3dixHdCaHd1+i4W3nfvJmmm5fujkFxxFk= Date: Wed, 14 Dec 2022 09:30:05 -0800 From: Tyler Retzlaff To: Bruce Richardson Cc: dev@dpdk.org, Morten =?iso-8859-1?Q?Br=F8rup?= Subject: Re: [RFC PATCH 1/7] telemetry: rename unsigned 64-bit enum value to uint Message-ID: <20221214173005.GB31935@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20221213182730.97065-1-bruce.richardson@intel.com> <20221213182730.97065-2-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221213182730.97065-2-bruce.richardson@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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 Tue, Dec 13, 2022 at 06:27:24PM +0000, Bruce Richardson wrote: > For telemetry data, rather than having unsigned 64-bit values and signed > 32-bit values, we want to just have unsigned and signed values, each > stored with the max bit-width i.e. 64-bits. To that end, we rename the > U64 enum entry to "UINT" to have a more generic name > > For backward API-level compatibility, we can use a macro to alias the > old name to the new. > > Suggested-by: Morten Brørup > Signed-off-by: Bruce Richardson > --- > diff --git a/lib/telemetry/telemetry_data.c b/lib/telemetry/telemetry_data.c > index 34366ecee3..3c996484ec 100644 > --- a/lib/telemetry/telemetry_data.c > +++ b/lib/telemetry/telemetry_data.c > @@ -18,7 +18,7 @@ rte_tel_data_start_array(struct rte_tel_data *d, enum rte_tel_value_type type) > enum tel_container_types array_types[] = { > RTE_TEL_ARRAY_STRING, /* RTE_TEL_STRING_VAL = 0 */ > RTE_TEL_ARRAY_INT, /* RTE_TEL_INT_VAL = 1 */ > - RTE_TEL_ARRAY_U64, /* RTE_TEL_u64_VAL = 2 */ > + RTE_TEL_ARRAY_U64, /* RTE_TEL_UINT_VAL = 2 */ ^^^^^^^^^^^^^^^^^ is this supposed to be RTE_TEL_UINT_VAL? > RTE_TEL_ARRAY_CONTAINER, /* RTE_TEL_CONTAINER = 3 */ > }; > d->type = array_types[type]; > @@ -173,7 +173,7 @@ rte_tel_data_add_dict_u64(struct rte_tel_data *d, > return -EINVAL; > > d->data_len++; > - e->type = RTE_TEL_U64_VAL; > + e->type = RTE_TEL_UINT_VAL; > e->value.u64val = val; > const size_t bytes = strlcpy(e->name, name, RTE_TEL_MAX_STRING_LEN); > return bytes < RTE_TEL_MAX_STRING_LEN ? 0 : E2BIG; > -- > 2.34.1