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 1CABAA0543; Wed, 12 Oct 2022 18:48:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0FA5940041; Wed, 12 Oct 2022 18:48:15 +0200 (CEST) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by mails.dpdk.org (Postfix) with ESMTP id DA6424003C for ; Wed, 12 Oct 2022 18:48:13 +0200 (CEST) Received: by mail-qt1-f180.google.com with SMTP id g11so5904953qts.1 for ; Wed, 12 Oct 2022 09:48:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=OmjwTDXo3S7BXp3OH4MWXOUJp97J4SyQfGeK/zMEF8Y=; b=qLqnXWaFTPfIz/WLIeiRJTzcP2y/jtClZgcwqsmMCdWRKxHLkgyu01tjTyY9PmY/jb XCLAMV6KRRFvfme28AMts900x0noJkK4LxWlJE4P0r7zSe6CTJ9dyTPKIFueeMm5coo4 PuhyuyuexsisvPBzIaR2EPNU8HIXVx2nHmoghK1JfPbhbeT5N0VfwCVDjdqEd9V434yF swzfXv6Vnn3DmXC4zsmIYIramzQp4t1oD+b8MBpwJiT0tAycXQ71ldydoTY9WC0zJ2eU Oj9gy+p5Z94BRUi4oYgRE/j057MvYUFU2gV6rElsPDTga9phBL7E1Q7wF2nkYsh7z4Sk 1JrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OmjwTDXo3S7BXp3OH4MWXOUJp97J4SyQfGeK/zMEF8Y=; b=1bAfiA9IiOXHD4U7enfpr/FQjmS+mfeuXU0zbaq4n1q1f5YaPMH8QvGBegohYngCiA D9YmkIVWf5zEZV2nqE8N/zjjBbQlSXmYFrsse2X/I/NnScgZ/jq3l6ekybuUOzeXDW9a /QdT5Nu8JfMtFbFC9lRN5WXoQN+H2f67UKUFWUtcuwj8PmjlYQsi61lELS1yctiW3r/l plAD2rMuiIAASnXWJ6YOy1Hc6QUJNzcEfJqukaSBt6NfoIXjP8GFmx97iO3CAKi1KIRi Uv8WyJ9aaDXKHkwP8k6Ms6jVhU/s7Q4o8fC4LcRP8Muf/jbQ27/Uq3wTj9U0oNNTpNnC ND1Q== X-Gm-Message-State: ACrzQf2AZ4J6VkjIWtotw6RdMgxl4NPwf8RrIYTKwaqWKrvZKRO/Oirt btUwml4vLpa11qLfxgQ8GcKh1SSwpWR25qg84v8= X-Google-Smtp-Source: AMsMyM54ygHX6zos3ESVmBD/MowWkLW5O5h2tQ0sAal+zSk1wosTjHXSOD4O3qYijOB+HS3n2kiTHOdYD8fqP/vac/I= X-Received: by 2002:ac8:7d13:0:b0:35c:e54e:9c8 with SMTP id g19-20020ac87d13000000b0035ce54e09c8mr24224456qtb.320.1665593293254; Wed, 12 Oct 2022 09:48:13 -0700 (PDT) MIME-Version: 1.0 References: <98CBD80474FA8B44BF855DF32C47DC35D873D4@smartserver.smartshare.dk> <98CBD80474FA8B44BF855DF32C47DC35D873D8@smartserver.smartshare.dk> <6614700.R56niFO833@thomas> In-Reply-To: <6614700.R56niFO833@thomas> From: Jerin Jacob Date: Wed, 12 Oct 2022 22:17:47 +0530 Message-ID: Subject: Re: rte_event_dev_xstats_reset id type To: Thomas Monjalon Cc: =?UTF-8?Q?Morten_Br=C3=B8rup?= , "Van Haaren, Harry" , Jerin Jacob , dev@dpdk.org, "Li, WeiyuanX" , Ferruh Yigit , Andrew Rybchenko , david.marchand@redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 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=C3=B8rup 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=C3=B8rup > > > > > > From: Van Haaren, Harry [mailto:harry.van.haaren@intel.com] > > > > > > > From: Jerin Jacob > > > > > > > > On Wed, Oct 12, 2022 at 1:40 PM Morten Br=C3=B8rup 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 unsi= gned > > > > 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. J= ust > > > > 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 vari= able > > > > 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 functi= on. > > > > > > > > > > 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, whi= ch deviates from other eventdev functions, or > > > 2. Change the "xstats id" type for all xstats functions across all de= vice 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 a= bout its internals) that seems like overkill to me. Arrays of these are bei= ng used, so size does matter. > > uint64_t is not overkill if you consider having stats per queue with a pr= edictable 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. > so I would like to keep uint64_t please. > >