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 5808CA00C2; Wed, 12 Oct 2022 22:44:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3AAE74280B; Wed, 12 Oct 2022 22:44:34 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id 53E3A40156 for ; Wed, 12 Oct 2022 22:44:32 +0200 (CEST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id EB3C65C00C2; Wed, 12 Oct 2022 16:44:31 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 12 Oct 2022 16:44:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1665607471; x= 1665693871; bh=Xmrb3Ja+lkh6oVDvS23FI0dpanmpwDKSV/xs0niuat4=; b=c VTk/g043YItOfEAPhBvT6W4mrkRod552ihpWFPqkWh+iFw46GpqjU6zSw6ubAFAd L+5ikGh+YK7YZWYsPahsGcXIdJfSpUb7uP3VF0YGABLkBKYdC9W8IAO8gILQg+/Y 7GCsBzOHCRAbWwswbCcFD/cgcbHXB2wWoJ/BGK9ojxBtbKk/WFKOwqUAzz0LSv5P tFvyNx/lozATR6EbLr9WhINIJj6v4KarnJ3dtP0Y1swiDJMLBcyFIRvO5ehVTDZe KWxlAznIaUm8prVbYak4cg/+qo53T/kmDO6EbLfexJvfAfkM1bEbbHsNDthWNu0F zl6nP19ejgpjS1b5XvuGw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1665607471; x= 1665693871; bh=Xmrb3Ja+lkh6oVDvS23FI0dpanmpwDKSV/xs0niuat4=; b=Q gP8R9gSL1AbcJkKNtazHef9lvm2zD5wXB9/xaNnz6ynffHzS/qmPcmYmk/XFIXxT xNONGQwxE5H4zlfJiHp30bRQWcBbjDiz7EwQz5Bn1+GIF7GTEblTCgCuwpzJAayP EBF5rIw/ekr9BoKzqvTVGPD7gHVZG5GbIKbNRMQdeV1vO/DADHW34MROhhJWZgiF pOU2LHxcGyXVeLpzPp1pDcpAbd7/8Be+FLiplERDdvnnLLRrjVs+6iLS16Uqu7cx DEe47sckWU4IHNdUpQKEIifZi+XeQzN4HTboBlfGF9DhNwFBykvwFVgOtxVOrSxi w2PXHhr1ah2+XZEtVXnVg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeejkedgudehgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttddunecuhfhrohhmpefvhhho mhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqne cuggftrfgrthhtvghrnhepgeejiedvleehudfhuefgfeevgfehieetgeeigffggfffffei uefgueektdeffeevnecuffhomhgrihhnpeguphgukhdrohhrghenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 12 Oct 2022 16:44:30 -0400 (EDT) From: Thomas Monjalon To: Jerin Jacob Cc: Morten =?ISO-8859-1?Q?Br=F8rup?= , "Van Haaren, Harry" , Jerin Jacob , dev@dpdk.org, "Li, WeiyuanX" , Ferruh Yigit , Andrew Rybchenko , david.marchand@redhat.com Subject: Re: rte_event_dev_xstats_reset id type Date: Wed, 12 Oct 2022 22:44:29 +0200 Message-ID: <8405275.Sb9uPGUboI@thomas> In-Reply-To: References: <98CBD80474FA8B44BF855DF32C47DC35D873D4@smartserver.smartshare.dk> <6614700.R56niFO833@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" 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 12/10/2022 18:47, Jerin Jacob: > On Wed, Oct 12, 2022 at 9:58 PM Thomas Monjalon wro= te: > > > > 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 un= signed > > > > > 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 wi= th 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 va= riable > > > > > 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 variabl= e, > > > > > instead of randomly > > > > > > > mixing uint64_t, uint32_t and unsigned int, depending on func= tion. > > > > > > > > > > > > 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, w= hich 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 b= eing 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, >=20 > You mean to use a bitmask hence uint64_t. > Currently it is mapped as arrays so 2^64 stats may not be needed. >=20 > 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: http://fast.dpdk.org/events/slides/DPDK-2019-09-Ethernet_Statistics.pdf