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 9C01DA00C2; Thu, 13 Oct 2022 09:12:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7FF8642C94; Thu, 13 Oct 2022 09:12:42 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id C8EA442C27 for ; Thu, 13 Oct 2022 09:12:41 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29CNtqU5027230; Thu, 13 Oct 2022 00:12:39 -0700 Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2105.outbound.protection.outlook.com [104.47.58.105]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3k67nq9fdy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Oct 2022 00:12:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JCQI31H5VER230ePPo4rBafp5ZiawUN6Kx7xYbD2XeD4hzHZUvsEPoHWdiRExV1wZbK4b44DRAroxcZE+9iqQ2LiF36awallbNfDMd7Gt6fDPZp+m07JZBqSy0HqLDh0XE4WAqcZW64pAsEuf4oh8RJ6yBhWvDesppdXfgAtC4vEjEJ+ZwxIfSgEodiNhoddZTpceoweB1uQsF79ARLxT0tlusBS/g7ZH1hxDOBcSpcEo4SruYUPYJGypaKA+46FdMqXpiOd/XrMqSAlZx3aGPjWK2N2BdbBv/8IZSYkFsRy12yfi/8ghdx48BBL9dTM0YxJ7QWQZGK1U+3q8wgcwQ== 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=tOAaZcP0zfPxBXVaTAfZtbRzCZ3whK28PDxDYraPVJ4=; b=Oxhn60fPupsAmdsQEfdSgGh7tyVrrIqKnMB4tn+ffkFHZJ2uR6t2U5xl/QpKEFRC4Q0w+5E2VYPy1x3YTSjBMHHxEcwNJkc1o+8QYG3H4sa/HRs6KjLKXQ4khv89tQVYW7Of+8LBAG7agSSlyCMl9WUtHJVTQ6P4zbzdpUyqfu8CkcqzEIgMGFIpZhNJkvaMkBPpyPevfQLGl8xrJwZRdncC6/07w8ESB86FDo7cOzz/+M/yBwUBGOqmYuq3eZCSjlQlkwQziAq75Aixzaexu3L2kAKjHMKfihZ/hkB2GXeYS5690tu4rgMb+hPjkuNTk9dgYBQrmTp5U/pUN8wwCA== 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=tOAaZcP0zfPxBXVaTAfZtbRzCZ3whK28PDxDYraPVJ4=; b=rVfJpKnB5Bwoz0VLWJmyywsMhAbMQtgOfE+Eh0WS4QMNJkVquf2gPlkXyUaTPI3/KPTn/OY5mB71l4xP4Stnb5YOeo1Q70661bt7rfaQTyO2aDHOz88E15pjGz7bKekFHHXuqXnQx9q3h7G9np3yyqWRPBa6hFSdflAz7lZvv3Q= Received: from PH0PR18MB4086.namprd18.prod.outlook.com (2603:10b6:510:3::9) by CO1PR18MB4730.namprd18.prod.outlook.com (2603:10b6:303:e9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Thu, 13 Oct 2022 07:12:35 +0000 Received: from PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::55a:3144:a48a:341e]) by PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::55a:3144:a48a:341e%5]) with mapi id 15.20.5709.015; Thu, 13 Oct 2022 07:12:35 +0000 From: Pavan Nikhilesh Bhagavatula To: =?iso-8859-1?Q?Morten_Br=F8rup?= , Thomas Monjalon , Jerin Jacob , Sachin Saxena , Hemant Agrawal , Ori Kam , Liron Himi CC: "Van Haaren, Harry" , Jerin Jacob Kollanukkaran , "dev@dpdk.org" , "Li, WeiyuanX" , Ferruh Yigit , Andrew Rybchenko , "david.marchand@redhat.com" Subject: RE: xstats id type Thread-Topic: xstats id type Thread-Index: AQHY3tBR5tTok75eSkuE/wFLd/x/ca4L6Fjw Date: Thu, 13 Oct 2022 07:12:35 +0000 Message-ID: References: <98CBD80474FA8B44BF855DF32C47DC35D873D4@smartserver.smartshare.dk> <6614700.R56niFO833@thomas> <8405275.Sb9uPGUboI@thomas> <98CBD80474FA8B44BF855DF32C47DC35D873DA@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D873DA@smartserver.smartshare.dk> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR18MB4086:EE_|CO1PR18MB4730:EE_ x-ms-office365-filtering-correlation-id: dc73424d-5a3c-43cd-d91f-08daacea4e0f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HEn9wR9XXyBUzx9BPdnzHUhBndSrx2U2uP8aU61bg0iGWNBONIvLaHVj62bVZ+cDFeB/FUWJnGIGw+YCbgiEdSnnjkFDWpnKlEC9+Q9bYUC1XLbSDB/HnZ2EHWM4hPztRAk3UPM08eekruys0xNk9NLY9v9FacMNK2v72CUF+tErd+7cFj4/ysOREoAc3oYCLzQaclricxCno6LGdyDhH3CXjAvjHk82CFXtKkB9cYslXgVN9lTe+tSbmCQgUyphPH4dJ+SCK7Gn71rxaugg6xN5ujdutatpIqnIboASdiUxLonK0GxSZbl52jeBcp/qXl59BcznHdij8RQ47KuQ+KJrfC56OWhypcI8dqvAn6k7SJoUTEw8Am8Fj26Xx71koJssoGxeG29AS8CH4hrpQhDYgXYW+dedOMAnzXxtpk8SHohUJguiOTcyR4SHtaPICyEEsrRbxeglaZX4a8MXxT97WXlh6vM3MTeYZs/R8Z3OzVFSpnM63fW0MKE+NzXXlt1wAEQmbzsp+JUJHWdYVKA9eDxdLISDH865u4muz0FSlCH9b7TO9wMFO/MRh0ScGwL7gH0sadKVUbUr6wa+TQIvnN2U8gi6tJeK6qvvfyKLET2YUbGk/pb3eLDUR9DqLS0Osj0pxioQGBhVlMgCYm3ze3g6x2PB9f9e2WgxPZIvJ8j+56txIZDRLZUewrh3IYpKdKKAFo2ejMgUnzSJL0uAp9UI/1WN2Spf7HsAX6jqpJefNoTw+ipSr9Wz+QWDCmP56bN+WkQcwujEvz8eqxt2bRHorkhhq7ovD+VdWwmLZ4xDzH9mj4OPUWNEGVY5KsVK6A9kH9v/1k2lJa64UCOBhrXFpxDyI2NWdi51eB0= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4086.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(396003)(366004)(39860400002)(136003)(376002)(346002)(451199015)(7416002)(5660300002)(186003)(2906002)(6506007)(7696005)(41300700001)(53546011)(9686003)(52536014)(26005)(8936002)(38100700002)(55016003)(86362001)(38070700005)(33656002)(83380400001)(3480700007)(66574015)(122000001)(316002)(110136005)(6636002)(54906003)(19627235002)(478600001)(66556008)(66476007)(66446008)(64756008)(8676002)(4326008)(66946007)(76116006)(7116003)(71200400001)(966005)(69864005)(21314003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?ssnZHwL8jSTm+Rt+kPJpI/yJZiXW8gTAok0JbvlzQMd5Tq+ar7huM/lMNR?= =?iso-8859-1?Q?jxdUbsDqr8lToY9WzpxI1id85wHQImkQQjfjVGXF7nBSzOV15eCjpjqgHm?= =?iso-8859-1?Q?DtLQ1eFCILVvmZhdZ45rxkwP0h25JssxYxTx0IOBtk8ckzz56etf5s5r5t?= =?iso-8859-1?Q?IMMjbn9ghqkh/xFagqD4uHDb63Gjdz++RsjODzKBxo2GAej9+o98+jqRr+?= =?iso-8859-1?Q?rthLCJonIJLhqHxcSwu4MGFOZQbNEnyxtd6lN5Mym2ZJW4fFXhUWBow5u/?= =?iso-8859-1?Q?WjQeLtnbpL74MgP/RoknPg4nJqGTK4FcYa45hbGOcFIPUolPvdyrHgskVi?= =?iso-8859-1?Q?cT7/a2sEDWbScymZo/Qf3QnqZEPGPn1zzBR5JzQBY8xTwyDxt5KVRU/aP3?= =?iso-8859-1?Q?WQSgRF2dyN9WIXgoUt9ANskvWul1l/rjavUuo1F7pDcFhlIL+VGbcD5GYv?= =?iso-8859-1?Q?ErP8353BjOlbsUZGUk3YIlJiw6M/kArXjl5thw2u4yADdcCUDO0F37RJAG?= =?iso-8859-1?Q?ZBDKiYM4KyHamMNuxTFe4XMgGg4XR+k0rt5NXFMWPRDYwAfncdC/rWTUnv?= =?iso-8859-1?Q?Qn6Fy/Wm0XGe0rCt3xKunGT1xIYf7uOxhj6IVEto4PC9RHX9/TUuca/FNn?= =?iso-8859-1?Q?yl1ut7lFp1DM5hoFFalEzl3syEzXB2fAGiqxewYqVGSywDcoNGGwgiPUQA?= =?iso-8859-1?Q?LLLcjB0zvhmcBPy7M4CKhFZYviqT2Ts1QBPggFmww4UbIZx7/AewwIV0jm?= =?iso-8859-1?Q?rMhMYygO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charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB4086.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc73424d-5a3c-43cd-d91f-08daacea4e0f X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Oct 2022 07:12:35.7708 (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: p9bKrgs9v/MHUNBpeTOzCDuDit2E4xOdw9Icx2CZl+GeTetVw8lXYY0gBqMke9lF3qDoTccwDqpaajlF5wulhRtbWhQwhBMD93o+8FCWUhk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR18MB4730 X-Proofpoint-GUID: Xh1CJ2qZsSzzqtvgC95EnsWiE8CwqwjV X-Proofpoint-ORIG-GUID: Xh1CJ2qZsSzzqtvgC95EnsWiE8CwqwjV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-13_05,2022-10-12_01,2022-06-22_01 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 > -----Original Message----- > From: Morten Br=F8rup > Sent: Thursday, October 13, 2022 12:22 PM > To: Thomas Monjalon ; Jerin Jacob > ; Sachin Saxena ; > Hemant Agrawal ; Ori Kam > ; Liron Himi > Cc: Van Haaren, Harry ; Jerin Jacob > Kollanukkaran ; dev@dpdk.org; Li, WeiyuanX > ; Ferruh Yigit ; Andrew > Rybchenko ; > david.marchand@redhat.com > Subject: [EXT] xstats id type >=20 > External Email >=20 > ---------------------------------------------------------------------- > +TO: rawdev maintainers, regexdev maintainers >=20 > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > Sent: Wednesday, 12 October 2022 22.44 > > > > 12/10/2022 18:47, Jerin Jacob: > > > On Wed, Oct 12, 2022 at 9:58 PM Thomas Monjalon > > > wrote: > > > > > > > > 12/10/2022 18:16, Jerin Jacob: > > > > > On Wed, Oct 12, 2022 at 9:05 PM Morten Br=F8rup > > wrote: > > > > > > > > > > > > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > > > > > Sent: Wednesday, 12 October 2022 17.13 > > > > > > > > > > > > > > 12/10/2022 14:14, Van Haaren, Harry: > > > > > > > > From: Morten Br=F8rup > > > > > > > > > From: Van Haaren, Harry > > [mailto:harry.van.haaren@intel.com] > > > > > > > > > > From: Jerin Jacob > > > > > > > > > > > On Wed, Oct 12, 2022 at 1:40 PM Morten Br=F8rup wrote= : > > > > > > > > > > > > > > > > > > > > > > > > Hi Jerin (eventdev maintainer), > > > > > > > > > > > > > > > > > > > > > > + harry.van.haaren@intel.com as the changes in > > > > > > > drivers/event/sw. > > > > > > > > > > > > > > > > > > > > Thanks Jerin. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > While looking into bug #1101 [1], I noticed a mix > > of unsigned > > > > > > > int > > > > > > > > > > and uint32_t in > > > > > > > > > > > the test code, which will fail on 64-bit big endian > > CPUs. > > > > > > > > > > > > > > > > > > > > Aha; that we can fix. I am curious why this isn't found > > in > > > > > > > CI/reported > > > > > > > > > > before. > > > > > > > > > > > > > > > > > > We probably don't test any 64-bit *big endian* > > architectures. Just > > > > > > > a guess. > > > > > > > > > > > > > > > > Seems so yes. > > > > > > > > > > > > > > > > > > > > Specifically, rte_event_dev_xstats_reset() is > > called with the > > > > > > > "ids" > > > > > > > > > > parameter > > > > > > > > > > > pointing to an unsigned int [2], but that parameter > > is a > > > > > > > pointer to > > > > > > > > > > an uint32_t. > > > > > > > > > > > > > > > > > > > > > > > > I think the type of the ids array parameter to > > > > > > > > > > rte_event_dev_xstats_reset() should > > > > > > > > > > > be changed to unsigned int array, like in the other > > > > > > > > > > rte_event_dev_xxx() functions. > > > > > > > > > > > > > > > > > > > > In this case, we have the option to change the type of > > a variable > > > > > > > in a > > > > > > > > > > test-case, or change API and cause API/ABI breakage. > > > > > > > > > > > > > > > > > > Well.. yes, but I would phrase that last option: Change > > the > > > > > > > API/ABI, so related > > > > > > > > > functions consistently use the same type for the same > > variable, > > > > > > > instead of randomly > > > > > > > > > mixing uint64_t, uint32_t and unsigned int, depending on > > function. > > > > > > > > > > > > > > > > Aah ok; I see your point now; there is inconsistent usage > > of > > > > > > > uint32_t/unsigned int > > > > > > > > between the Eventdev APIs itself. Agree this is sub- > > optimal, and > > > > > > > would have been > > > > > > > > nice to have spotted before the Eventdev API was > > stabilized. > > > > > > > > > > > > > > > > > > > > > > > > > Unfortunately, these functions are not marked > > experimental, so > > > > > > > breaking API/ABI is > > > > > > > > > hard to do. :-( > > > > > > > > > > > > > > > > Agreed again. > > > > > > > > > > > > > > 22.11 is a breaking release, > > > > > > > and changing type in the API is not much impactful, > > > > > > > so that's something you can change now, > > > > > > > or be quiet forever :) > > > > > > > > > > > > Question: > > > > > > 1. Only change the "xstats id" type in the one eventdev > > function, which deviates from other eventdev functions, or > > > > > > 2. Change the "xstats id" type for all xstats functions across > > all device types, for consistency across device types? > > > > > > > > > > > > If 2, then what would be a good type? > > > > > > > > > > +1 for second option and the type as uint32_t > > > > > > > > > > > > > > > > > Ethdev uses uint64_t for xstats id, and (speaking without > > knowledge about its internals) that seems like overkill to me. Arrays > > of these are being used, so size does matter. > > > > > > > > uint64_t is not overkill if you consider having stats per queue > > with a predictable scheme. > > > > That's an improvement I would like to work on, > > > > > > You mean to use a bitmask hence uint64_t. > > > Currently it is mapped as arrays so 2^64 stats may not be needed. > > > > > > No strong opinion, I was just curious to understand "stats per queue > > > with a predictable scheme" and how uint64_t helps with that. > > > > Yes I mean some bits are used for the queue number. > > Something like in slide 11 of this presentation: > > https://urldefense.proofpoint.com/v2/url?u=3Dhttp- > 3A__fast.dpdk.org_events_slides_DPDK-2D2019-2D09-2DEthernet- > 5FStatistics.pdf&d=3DDwIFAw&c=3DnKjWec2b6R0mOyPaz7xtfQ&r=3D1cjuAHrGh74 > 5jHNmj2fD85sUMIJ2IPIDsIJzo6FN6Z0&m=3DApdcbroZzSNlcY1t4c8iv9HZk6YSJOA > Hpg93zuyIEEWa6xkViBTdoCA3iir_FCtW&s=3DwEMA0lnyrTmxmmDINhzOagGvV > Z3TcIrzfK5NbJHafdM&e=3D >=20 > With this presentation in mind, I strongly agree with Thomas that uint64_= t is > the best choice of type for xstats id. >=20 > A quick search shows that both eventdev and rawdev use "unsigned int", > except rte_event_dev_xstats_reset() and rte_rawdev_xstats_reset(), which > both use uint32_t. And regexdev uses uint16_t. Other device APIs don't ha= ve > xstats. Harry,=20 Are you working on a patch for this change? If not I will do it. Thomas, Are you ok to break the ABI without deprication notice i.e. make ID as u64 = for eventdev? Thanks, Pavan.