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 07061A0C4F; Sun, 1 Aug 2021 19:40:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D7B7440143; Sun, 1 Aug 2021 19:40:18 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 0C2CB40140 for ; Sun, 1 Aug 2021 19:40:16 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 171HUkuK009434; Sun, 1 Aug 2021 10:40:16 -0700 Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2171.outbound.protection.outlook.com [104.47.55.171]) by mx0a-0016f401.pphosted.com with ESMTP id 3a53vrba7j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 01 Aug 2021 10:40:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KBJR6/GmJAz66UNSKK4JUR5tZQCFBzqJTmXX2qn/1/kFWrAAImwnzi0avZFiRyIzsfmOmrOL5CqrnUTbiAMMF1NLhmcFTHNlLBhpfE2Pt4vxYum/pBhe2LHaJaSyPYGFditxyaapwvnbqPa27yXkMeo1YrfNRASkAFGCqEXDz2iQcKyyQnMY1Tj1+vRTzki39Ircs5aEJh7eardSxWXnc3xtRbVPfEKj9t1QYItGf2dKHoYR/Z2nKuMSnPBVmf8SYBOE2JIJGofrqk/19z+tbA/f/KBd0VGYmvkc0xsbQxXsUaDOTwuEEgq3QJd5DnMFQ3w92AyZs+TsbyirXWrbmA== 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-SenderADCheck; bh=BbJI6vbijzBczkVE6OPlXEIAlBOb0MsskbR/UDrJeGc=; b=WhpSKxQZEFJcU7s8PipE506y8I9d0XJkhbB5fuWS9EWR5kv4amSRFQzb89aPl02LLY6Om2WeEGBZQKPtt7i3J6j29bIg09UbUWrydJY9cZTZk4VlHqD/ppLnrkW/hFn52EQvs6GNJvTBIRPzYApXmydWd3y0YYW6GnBGDhxt/ZsnSBuoHhUqXv6+lB6zysv5DnMRgBeEgCOUeaLeYGIIiAkvgZ4903M4vfruJQJtkeWHzLUTD0NOiDBkhY1hVokznO5AFq1hhThPXy5481hX9XS9hjNgxtsFMXvlnlhKTFGGTpIriY8lw22kzI62AcwE56OWjplBQ4o+SFo2EfQbFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BbJI6vbijzBczkVE6OPlXEIAlBOb0MsskbR/UDrJeGc=; b=DSo1blMp2kzZ+XY8vMm6QsfqEbQ/7q6H7Rr/CHekTRXiZW00XtHFzXjcb80+hKYjeD7Hyzij9/Wv+f3D/55ZKdSTohms51N/kPoQhIB/XqykX7xh0IcImhpckfgh3XUBsgJFNXkUWjSZWMKL2BDiSe+PiV1YLpXfEwdkIMkPbzY= Received: from CO1PR18MB4714.namprd18.prod.outlook.com (2603:10b6:303:e9::18) by CO1PR18MB4553.namprd18.prod.outlook.com (2603:10b6:303:fc::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.17; Sun, 1 Aug 2021 17:40:13 +0000 Received: from CO1PR18MB4714.namprd18.prod.outlook.com ([fe80::c515:b091:df51:cc6c]) by CO1PR18MB4714.namprd18.prod.outlook.com ([fe80::c515:b091:df51:cc6c%2]) with mapi id 15.20.4373.026; Sun, 1 Aug 2021 17:40:13 +0000 From: Gowrishankar Muthukrishnan To: Bruce Richardson CC: "dev@dpdk.org" , "ciara.power@intel.com" , Jerin Jacob Kollanukkaran , Kiran Kumar Kokkilagadda , Nithin Kumar Dabilpuram , Sunil Kumar Kori , Satha Koteswara Rao Kottidi Thread-Topic: [EXT] Re: [dpdk-dev] [v1, 1/3] telemetry: enable storing pointer value Thread-Index: AQHXhI2AKJ2wPvhwj06DD4n2aCqto6taGU4AgAEzaGCAAwCQIA== Date: Sun, 1 Aug 2021 17:40:12 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=marvell.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3ec18b8c-0035-4d02-d5a0-08d955136a9b x-ms-traffictypediagnostic: CO1PR18MB4553: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: XVohg1oK0wlEUz/+8ob9JWgWoNtv+m/B/LDdwGYIeR+Yi7Bbc8Ssa/7kjBmYs2Hnk3nfr8TXSu7tS/eUcRJfmROpIvwMtmaNQDR6rIwka5Hmi/3bU+jwLGZGIgn/Q+e/1Le6Vzcqt3RE1mhUuY8Ml67xuDqNTG4URPR8Lz0vNH1sq6+aCd77LPF1Et7WBWYTgIm1f/bfbvMbMh+vxdAobo9qGJoCn3bnUnUukd5ep9X8wEVNH3R9y+MiNKezahBZW3JWBTuq1K3r9d0S5NnVEaVt743y8tXgoMASbDzzWpEXFsx4b6v03ct1Av5+vGulm5MUr4OyjuyFkdkvH4lVd7EhCWEv94SB08Z9YBXX/UAqE1KTYlHB6loOWHOf9ZF4QGs6cE4eZ9MQvgVfeC3ecjy1boqOLbb5hpo0/lJrd8Ua2+QD5BUxVnTRlSyT+o+3ye9ua2wkN/u/X0a/yWX9rMNNooujo4+OYrXGvVdUayI985utUkamSQ/XOosh3CC/rWalsl8Hz773jWry7YXr3mARmg4d7HAKe/SGB0BOfo98skRg5DUkOCA/yxeyH30dFrCoV09HJPhl+HJmdcYw9u6f30JWUWub5BzynOOT8WuBQA/Hfcy3rG5HrcZe2AXBMjfxptSpmEVGRKxuKBoXYD4XBLLvFrJvvKLtqAtlV/0kbM9tPmMRY727Dw8yVWmmLyIAHEbCOHJD5GQKdIZplQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR18MB4714.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(376002)(39850400004)(396003)(366004)(346002)(8936002)(478600001)(38100700002)(71200400001)(8676002)(122000001)(7696005)(38070700005)(52536014)(33656002)(316002)(107886003)(53546011)(4326008)(6916009)(9686003)(55016002)(6506007)(54906003)(55236004)(2906002)(66446008)(66476007)(66556008)(66946007)(76116006)(83380400001)(64756008)(26005)(5660300002)(86362001)(186003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?DOb/vVRd3C9ZMRIwg8TFHBzQoLYlJmCWDHhgbSJ5IVEgtwac2tADDhWa9gxw?= =?us-ascii?Q?YJnUDUHTWPE2C+RNHUAGJ72ZtahfO1FVv58XuhYI9tIcNDSoXBN2SxwVssyq?= =?us-ascii?Q?au3MRp9ebCkcLLbCuhgRk3P1BXDt3SzUFfkeImmdKim3PvqjoMtyhkBIzoAf?= =?us-ascii?Q?AIg2sgMjOloTWx5dNhXCIZ4liTSC1JcUn4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krXm8YDVGeXWGJMCPOUd6+9v1wmTRby5CHvachhb8hp?= =?us-ascii?Q?H/vyedX93jzQYJ9PP+wjuPASIwQUxD/nq1QAWfnXPL9+esMgGRHj8TgCO1uZ?= =?us-ascii?Q?KjHbi1IH9qPKh23G8CaBdl2RunlMHTWx0XH2jGt0hR5UGjmsbZ3Ku4ytUqZT?= =?us-ascii?Q?IRgqWW2sdDv6lhTM4OJA940wMbajy0rQTs7Bl92TgkOS/7jaETNEPdNj/0ZM?= =?us-ascii?Q?2zU=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR18MB4714.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ec18b8c-0035-4d02-d5a0-08d955136a9b X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Aug 2021 17:40:12.8464 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fpM28ONZ2trV8E6gX+8Tae6edVBQM/k4nYfhOnjWoqyerw1HvskePkIrn3CbikIW/ya70QmONT8RXzXFxXUwx929pyZxD6fHJ72uC4B6s1s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR18MB4553 X-Proofpoint-ORIG-GUID: -N3cIlMSA3lBXIgckk47djhJC1cE1qLe X-Proofpoint-GUID: -N3cIlMSA3lBXIgckk47djhJC1cE1qLe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-01_02:2021-07-30, 2021-08-01 signatures=0 Subject: Re: [dpdk-dev] [EXT] Re: [v1, 1/3] telemetry: enable storing pointer value 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 Sender: "dev" > -----Original Message----- > From: Gowrishankar Muthukrishnan > Sent: Friday, July 30, 2021 5:38 PM > To: Bruce Richardson > Cc: dev@dpdk.org; ciara.power@intel.com; Jerin Jacob Kollanukkaran > ; Kiran Kumar Kokkilagadda ; > Nithin Kumar Dabilpuram ; Sunil Kumar Kori > ; Satha Koteswara Rao Kottidi > > Subject: RE: [EXT] Re: [dpdk-dev] [v1, 1/3] telemetry: enable storing poi= nter > value >=20 > Hi Bruce, >=20 > > I'm a little curious as to the usefulness of having a pointer value in > > telemetry output? How would a telemetry user be expected to use > > pointer information returned? Printing pointers seems something more > > useful for a debugging or tracing interface than a telemetry one. > > >=20 > Thanks for the quick review. I enabled _ptr API keeping few things in min= d: >=20 > 1. User need to explicitly type cast pointer value (ie address) to uint64= _t > which otherwise can cause compiler warning (Wint-conversion). Althoug= h > u64 is large enough for holding address as value, type casting is pro= blematic > for non-64 bit machines (eg 32 bit). One other option is to use uintp= tr_t > as a holder. >=20 Please check [v2]. I modified json encoding to uintptr instead of stringified hex as in curren= t patch. I think, this is better approach as pointer value is stored more correctly = (void *) as well as retrieved in JSON following uintptr_t cast. Also I think, this i= s architecture=20 compliant approach rather than assuming pointer address is always 64 bit (a= nd=20 what if 128 bit comes alive - who knows when). Aim is to leave _ptr api=20 architecture compliance anytime. > 2. With this API, code walk could be easier as user can interpret the acc= essed > data better (ie ptr is address value). _ptr API is meant for pointer= variables, > though it is up to user to choose. >=20 With above uintptr_t as encoded value, it does not change the client handli= ng as client would consume it as its architecture supported value (uint64_t). One advantage of having this API is to support JSON5 compliance hex address once decided so in future. > 3. Also while debugging telemetry date using script like usertools/dpdk- > telemetry.py, > perceiving address as hex is quicker than same as u64. >=20 > Answering on returned data, user needs to convert stringified hex to poin= ter > value. With uintptr_t value (in new patch), no change is needed in client side. Please suggest. Thanks, Gowrishankar >=20 > Regards, > Gowrishankar