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 5AA57A0543; Wed, 12 Oct 2022 18:16:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4029940156; Wed, 12 Oct 2022 18:16:45 +0200 (CEST) Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) by mails.dpdk.org (Postfix) with ESMTP id 94A2140041 for ; Wed, 12 Oct 2022 18:16:43 +0200 (CEST) Received: by mail-qk1-f179.google.com with SMTP id o2so3561386qkk.10 for ; Wed, 12 Oct 2022 09:16:43 -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=dKWLxLtD2VnspXYlGFBN7J98wNpSIFTrCw6AIpJ9mhA=; b=ccLvMNFvSxtVUxe/nv8gBRurQa3nPikEwYHcb7kAGkqZ7bJNsfFf9jM1T5+eQ9BV/q pCWdwMfYI/vOrhgV9m2WDVOB3I5EsAtHUqmFmFBgKMY0jfbc/CSyP+ks9ehgum4rvF5U TwCWztZET177Us8PhFtU5swPzqNssqO2aq7v3762Ob1vNh/332D9JumCqXfPsncz2QYi ImrB/OcF/cX9dPGR592BcBNtQ2UPm1GYxig1rFjAk4OxoKWB+/yg/bJthuMfWw+V16Im 7CebjynPiuJ/j/Qf4iwgPIT89jedNxyIALG2DuzOOpxBePC198i0NhDFDsUzAewHfqRv ZCog== 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=dKWLxLtD2VnspXYlGFBN7J98wNpSIFTrCw6AIpJ9mhA=; b=Mbdaq8/5ECgM0/hkHOh8ouWnu90NA1qmGPM+1TPtN2vsmRjuee3by25Y96vPjiq7mY dhoo/LozCPWj9obwHv9EsLzW9GM57lSOj/kRoq8CgCyLKY7I+74r2swi1jb63dIbufhm czRxS/7QVTFMwrrT//8H4kLpZMD2fqCCoQbCAnnbDaSkJsw2hybTuNjKYjdhp5rRNzC0 Wopgwhs5hyDe52t1H7QkwBXUMKwksDwcWEET+/Hgurc6DX2qh2EUXw67elNQZVgFno9K CVk7awlCgr6VG9eY+ygNStgx6oAHeKtkQDDSuD+CbTF7Ntdfzn/cxvfbn4OQAtjv03Cl HdsA== X-Gm-Message-State: ACrzQf0FYVgfhGDBX1dJU4OtXTf2KXaY+9CAXKXNiiodFyBDIo7b7OoY /lS8jT/JxJhl+LMwoNbP8UH0jJOk09yHe6xWcmk= X-Google-Smtp-Source: AMsMyM7wmrCVb8hfcX/L2gyEzMx+jKWlEUlV+kUyEhin/yO7kcIbw7plKzONbOqcIajjduDGv3ZBPEmHYKnPKamx7JQ= X-Received: by 2002:a37:a4f:0:b0:6ee:9292:4db8 with SMTP id 76-20020a370a4f000000b006ee92924db8mr4087157qkk.494.1665591402943; Wed, 12 Oct 2022 09:16:42 -0700 (PDT) MIME-Version: 1.0 References: <98CBD80474FA8B44BF855DF32C47DC35D873D4@smartserver.smartshare.dk> <98CBD80474FA8B44BF855DF32C47DC35D873D6@smartserver.smartshare.dk> <8864071.MhkbZ0Pkbq@thomas> <98CBD80474FA8B44BF855DF32C47DC35D873D8@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D873D8@smartserver.smartshare.dk> From: Jerin Jacob Date: Wed, 12 Oct 2022 21:46:16 +0530 Message-ID: Subject: Re: rte_event_dev_xstats_reset id type To: =?UTF-8?Q?Morten_Br=C3=B8rup?= Cc: Thomas Monjalon , "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: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 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 d= eviates 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 u= sed, so size does matter. >