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 292AEA0543; Thu, 15 Dec 2022 10:42:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1AAE640684; Thu, 15 Dec 2022 10:42:57 +0100 (CET) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 68C2740223 for ; Thu, 15 Dec 2022 10:42:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671097375; x=1702633375; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=AvVxQXcE7D9XtRQEZX04567IDKmMrQtAFCJjvllf5sw=; b=GHaDECtNz8Q/Nyg3qlPN/SGtp+UXwpfED9wdEl69iFLYcAs+kjgLHhAw LDA8rhNSKHwtCh4DMjtJohHL6+O+g5ABAYpyV+SM1IrQYQk2MfbzIk5Lx 69QduHoSzJTXNWDcE6uzZvKT3nia5F7H6XpUff3ojzzbqiAEUHpiCU4gc SSeTvzMaq64FcZNQmoAe+YsWkrm6rYlPI1QewpQ3U6HHyoXWWlooCdUZS TWKRSRLW1+bb71E+01b6jURqUEs3QMJlmrpmvjesK8kD00sTq4vggpBo1 7s2uytS2X+F7MbUZeenbbHSmWUxi54eF08fU3acGdN6NEKC7vpDW+uxOy w==; X-IronPort-AV: E=McAfee;i="6500,9779,10561"; a="380830981" X-IronPort-AV: E=Sophos;i="5.96,247,1665471600"; d="scan'208";a="380830981" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2022 01:42:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10561"; a="738037584" X-IronPort-AV: E=Sophos;i="5.96,247,1665471600"; d="scan'208";a="738037584" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by FMSMGA003.fm.intel.com with ESMTP; 15 Dec 2022 01:42:53 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 15 Dec 2022 01:42:52 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Thu, 15 Dec 2022 01:42:52 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.176) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Thu, 15 Dec 2022 01:42:52 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZR6GB+q9RUfMsYkpVQYcSjg5ixymveuRrPOesEf5cfDeymfI6id5IAAH+Mba07R568o9qz3/swChD2+qVdHaJ4xVLjiqWgukEEKnlf8qd35D0IsuXaTL9DvvJeNjYvah/ouCkQW1Vg2JzG+xWt/aJPV+Ya81WrbUnYq0wQx7A5iRdiEcTA/ZJPvB+ZK9RYtHsEkF56I2RyDZ6Qd6Sa3AbHcOiDkwL7M9mrCvRqV8Hws45hyI4TNbrIjvaGgswjNNOndDVEG1nc6x/sspwD+u1UwlAsmQHfQ9raQ2oU+al7tR7SYFybfhKq43314vV0FgeBGOjTGVwrxV4pBolZLfTw== 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=Q5LC0plmsIZrvBdB8vRoTmr1IePVD5sKcpb84QFiqHw=; b=WUlA/9N37fkNLOBOSHySzEnFy3t0jdrdOzEmnqLc5wXdJn5orhxF8UMd1YAsyqsc7Vt73uM1YAFkkcgyLvxqBkvnF+VGxGFMD0P9NsCqi86dlSztCOUkCa9U8C2AInvZMAoG9+NTLj547OK83yJ0eVbKPuz+xKmm53PZHNcZ51ZkVsPglgEJzlxRVIQ+AW+CMw/RupVK9IRxkWeieSULZz4clKetGeeztVtDTgkCiGywc73tdqCqVPaO3uROgBIu3D08OFhN1zrot0zWjLJE8aBv+Hb7OFkTfTDuPtO4xeGOuHs9Bxj54HsTu+rKHdPIhEZRDUrpDHNr1vcSt9BVTQ== 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 MWHPR11MB1629.namprd11.prod.outlook.com (2603:10b6:301:d::21) by SA0PR11MB4544.namprd11.prod.outlook.com (2603:10b6:806:92::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.19; Thu, 15 Dec 2022 09:42:46 +0000 Received: from MWHPR11MB1629.namprd11.prod.outlook.com ([fe80::18bd:edae:ad31:a228]) by MWHPR11MB1629.namprd11.prod.outlook.com ([fe80::18bd:edae:ad31:a228%3]) with mapi id 15.20.5924.011; Thu, 15 Dec 2022 09:42:46 +0000 Date: Thu, 15 Dec 2022 09:42:40 +0000 From: Bruce Richardson To: "lihuisong (C)" CC: , Morten =?iso-8859-1?Q?Br=F8rup?= Subject: Re: [RFC PATCH 2/7] telemetry: add uint type as alias for u64 Message-ID: References: <20221213182730.97065-1-bruce.richardson@intel.com> <20221213182730.97065-3-bruce.richardson@intel.com> <61b3f999-ec7d-9201-dcf3-cbdfbc0d705c@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <61b3f999-ec7d-9201-dcf3-cbdfbc0d705c@huawei.com> X-ClientProxiedBy: LNXP123CA0024.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:d2::36) To MWHPR11MB1629.namprd11.prod.outlook.com (2603:10b6:301:d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR11MB1629:EE_|SA0PR11MB4544:EE_ X-MS-Office365-Filtering-Correlation-Id: 09cc1fbe-8584-4cfa-2071-08dade80b88e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: shjwxoeG6xhZ3wzrrI266NR26TKcZq0wScMH/kvas7CR2I5uI5RCfBSNsR0xhlUcqzXXQuxO6OBqF4X9ximk+dbZpWpAaI32jsex18c0IKNQK1rF5C+juosGeZ7gAj9TYhtP6eg4jq8RtSsQNIYvyuzuWhCXxjtPejZnOXoTpFDZ7aahi1CZIWKR7oy2Koss2u/nAqVUhkznxTtQtiKGVTmwY5zEGyzSnwXfuhKsiAbWU94W9O30lR+yPFz2tRDHsBYNz6Q7A0KzpbyXI9v+UebKGKVbYyux1O7iHfMhlWjZ//J9a8qsd03C9nzCB+cVfpxp2NlM+TkZ+6vIsRanaOWD4mhJbSt8twuILnbjenDlE3d1gf2YiyXw/W5eiU76xzMau+BW6r2DorqaiWZaa7IilSGsLJBvFZcMr3LO9b7YGq/OQiZtLQGWTByTE+x46bq9ByhEUTTeqE6rN7iIqASk0NQq1Du9lnG34UOrcfKJ/7jbMeyKCxVLfA81Thb9N9gR8mpnhl5nQFNAFC1SlBE7FxKCat+c2YXOHP6Rwuy1Yl/M6KzJt7Pj5ylwct2U4u482VNlVYpLO9VF8bz2Ns0MzvaSlu/hkK6vVhw2Fd9LR/sxMvmk3J+43Se/3r03MweHPam/e8RP6lka6uwjiw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1629.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(39860400002)(396003)(376002)(366004)(346002)(136003)(451199015)(26005)(66556008)(41300700001)(4326008)(8676002)(8936002)(66476007)(316002)(6916009)(66946007)(82960400001)(38100700002)(6666004)(478600001)(5660300002)(6506007)(6486002)(186003)(6512007)(83380400001)(44832011)(86362001)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TUZWdktkNVBqbzB2S3J2VHg2Ti9tejV4THRoMEo1ZWsvdnRkb1lXUmd2VjQr?= =?utf-8?B?SVdTS2VXbjVCakxDTDk0ZW4wNTZjelhmSVJIYjcvR2NNUjA4NVpzSXNjejBs?= =?utf-8?B?VDd5ZlpVdUNranBjZkRoRWhpNStkRlV0NHpJby9LL2YvVGxxNE9Nek9YNm1P?= =?utf-8?B?YlNNTllXczNWajNwM0c0TDFMV1lCWEJnTG1OZEhvaml4TUJ2UDhtb1R1UW5Z?= =?utf-8?B?NlRUQ1VoN1dSLzNtUm1ESmNwRUlYZG1KK1VZRDBpYTYvVko1RFp2U2l3eW1E?= =?utf-8?B?TkFlNUVkV2Q4NzZCMkFOc3VtT2kweHpkeHN2NmFmTjJUaXlLT0FPMGVDa0hl?= =?utf-8?B?azlwcXF2b2pPSTNUcFNYZWUxREhKd0ZySXYwa3g4NGxnN3ZMVjQvNkpqZE1o?= =?utf-8?B?R2dKRy9kYTExRWpML2NkNitYZUtVZXIrWnlmMUdldWFGNHQvblV5R0l4VnFK?= =?utf-8?B?cnVUV3p4MXFuWXd1WTVuQkFBK0RNMHpCb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tSMzFJZERWb01aTWFoZ0ljSGsyWmUwTWtLeElnQTI4SDkycU5ZY2tO?= =?utf-8?B?R3RZU0M3cE90dzVQcllnVEYrVnJ5SGxrWWNaSmxPZUpYY0JSTDRFYm5QZDd1?= =?utf-8?B?cXZpRlp2UG1ySFdLajhwRXZGK2RKanI1YWEwWjlFQmJqeUMvWUY0NVp2cU9r?= =?utf-8?B?ZkgvVHVuZGtBaVhxNkVQaXZ4dS9LelhwSVZOZkVtZkkyL0ZmaHRTbkZreHQv?= =?utf-8?B?bU9yeDBUOEdPUkRqclBMNllHcEJDdWl6Z0pqdlhIRVRXeE9LYnpRcWhZMGJC?= =?utf-8?B?QTJ0YWgyRUlTTGhYSitIbTcyOUwyVHEvL2xCVmVKTEFzc2lQRUM5bnB4WCtv?= =?utf-8?B?R1F1dENzbDVEVTJ5cGloVlR6c2RPaFJrcTNaTExJKyt3YU9kZS9UcE93d1pl?= =?utf-8?B?YVlDWm4rVDF1SmtKa1NiZ3VBT01iTnoxWUl3RXhvb0ZJRVlnbkNtbTNWZzNE?= =?utf-8?B?bEVRYmpVRm1adkkraVFmSTdIdi9kMHY1RUdMdy9vbkhSaFN0T3gvNVp4R0RZ?= =?utf-8?B?aXFPTnBPUUtWNElWdjNIN3pMZlo0eWRnUkVZYmd2Ullva3drUk1qcjd0MDdF?= =?utf-8?B?WnhuamkyM3NjQ3BVcnQ2dUZBSjFsWGwvT2RFc1J3RFVBMEVoRXJJUVNLSHg2?= =?utf-8?B?bHlCNGdCZjRCNTd6aFN2S3c2UG1xUFdySGRWdW5DejJVa1FxRU9vMDVab1VN?= =?utf-8?B?b1lIUGlrQyt5SkdCLytuLzEyWUxadGtIcUpNSjliTUhxZUFXYWNOUmpEMkg0?= =?utf-8?B?TFE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 09cc1fbe-8584-4cfa-2071-08dade80b88e X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1629.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2022 09:42:46.1098 (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: a61aGeFMLk/d2z7JPaSN1We9omQdn1rXUIg5Pi4s/u+U42bfWDy7DOk4v7Dkf02LlkpuMDGfNsaTX0k13phpJm4bUZQ1FELvMA9RNvaCiMQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4544 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 Thu, Dec 15, 2022 at 09:49:06AM +0800, lihuisong (C) wrote: > > 在 2022/12/14 2:27, Bruce Richardson 写道: > > For future standardization on the "uint" name for unsigned values rather > > than the existing "u64" one, we can for now: > > * rename all internal values to use uint rather than u64 > > * add new function names to alias the existing u64 ones > > > > Suggested-by: Morten Brørup > > Signed-off-by: Bruce Richardson > > --- > > lib/telemetry/rte_telemetry.h | 36 ++++++++++++++++++++++++++++++++++ > > lib/telemetry/telemetry.c | 16 +++++++-------- > > lib/telemetry/telemetry_data.c | 28 ++++++++++++++++++-------- > > lib/telemetry/telemetry_data.h | 4 ++-- > > lib/telemetry/version.map | 7 +++++++ > > 5 files changed, 73 insertions(+), 18 deletions(-) > > > > diff --git a/lib/telemetry/rte_telemetry.h b/lib/telemetry/rte_telemetry.h > > index c2ad65effe..60877dae0a 100644 > > --- a/lib/telemetry/rte_telemetry.h > > +++ b/lib/telemetry/rte_telemetry.h > > @@ -8,6 +8,8 @@ > > #ifndef _RTE_TELEMETRY_H_ > > #define _RTE_TELEMETRY_H_ > > +#include > > + > > #ifdef __cplusplus > > extern "C" { > > #endif > > @@ -121,6 +123,22 @@ int > > rte_tel_data_add_array_int(struct rte_tel_data *d, int x); > > /** > > + * Add an unsigned value to an array. > > + * The array must have been started by rte_tel_data_start_array() with > > + * RTE_TEL_UINT_VAL as the type parameter. > > + * > > + * @param d > > + * The data structure passed to the callback > > + * @param x > > + * The number to be returned in the array > > + * @return > > + * 0 on success, negative errno on error > > + */ > > +__rte_experimental > > +int > > +rte_tel_data_add_array_uint(struct rte_tel_data *d, uint64_t x); > > + > > + /** > > * Add a uint64_t to an array. > > * The array must have been started by rte_tel_data_start_array() with > > * RTE_TEL_UINT_VAL as the type parameter. > > @@ -193,6 +211,24 @@ int > > rte_tel_data_add_dict_int(struct rte_tel_data *d, const char *name, int val); > > /** > > + * Add an unsigned value to a dictionary. > > + * The dict must have been started by rte_tel_data_start_dict(). > > + * > > + * @param d > > + * The data structure passed to the callback > > + * @param name > > + * The name the value is to be stored under in the dict > > + * Must contain only alphanumeric characters or the symbols: '_' or '/' > > + * @param val > > + * The number to be stored in the dict > > + * @return > > + * 0 on success, negative errno on error, E2BIG on string truncation of name. > > + */ > > +int __rte_experimental > __rte_experimental > int > > Right? Yes, that is right.