DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
To: "Jerin Jacob" <jerinjacobk@gmail.com>,
	"Morten Brørup" <mb@smartsharesystems.com>
Cc: Jerin Jacob <jerinj@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>,
	"Li, WeiyuanX" <weiyuanx.li@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@amd.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: RE: rte_event_dev_xstats_reset id type
Date: Wed, 12 Oct 2022 10:29:44 +0000	[thread overview]
Message-ID: <BN0PR11MB57125A64B4A315DD22ED1FC8D7229@BN0PR11MB5712.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CALBAE1MSDYbKXEgafT9_j-mCt0p5PrpM8skgZx_O_L=1DPbsGQ@mail.gmail.com>

> -----Original Message-----
> From: Jerin Jacob <jerinjacobk@gmail.com>
> Sent: Wednesday, October 12, 2022 10:45 AM
> To: Morten Brørup <mb@smartsharesystems.com>; Van Haaren, Harry
> <harry.van.haaren@intel.com>
> Cc: Jerin Jacob <jerinj@marvell.com>; dev@dpdk.org; Li, WeiyuanX
> <weiyuanx.li@intel.com>; Thomas Monjalon <thomas@monjalon.net>; Ferruh Yigit
> <ferruh.yigit@amd.com>; Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Subject: Re: rte_event_dev_xstats_reset id type
> 
> On Wed, Oct 12, 2022 at 1:40 PM Morten Brørup <mb@smartsharesystems.com>
> 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.


> > 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.
Lets change the unit test code from "unsigned int" to uint32_t, and that will fix the issue?

From a quick review in the test code, there are 3x occurrences of "unsigned int id" being used.
I will send a patch to change them later today.


> > Or even better, use the same type for an "xstats id" across all device types. For
> ethdev devices, they are uint64_t, but I don't know why. (They are passed around as
> arrays, so they could be 32 bit. I guess that they were originally not used in arrays, so
> unsigned int seemed the logical choice.)
> >
> >
> > [1]: https://bugs.dpdk.org/show_bug.cgi?id=1101
> > [2]: https://git.dpdk.org/dpdk/tree/drivers/event/sw/sw_evdev_selftest.c#n1766
> >
> >
> > Med venlig hilsen / Kind regards,
> > -Morten Brørup

  reply	other threads:[~2022-10-12 10:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12  8:10 Morten Brørup
2022-10-12  9:45 ` Jerin Jacob
2022-10-12 10:29   ` Van Haaren, Harry [this message]
2022-10-12 10:41     ` Morten Brørup
2022-10-12 12:14       ` Van Haaren, Harry
2022-10-12 15:13         ` Thomas Monjalon
2022-10-12 15:35           ` Morten Brørup
2022-10-12 16:16             ` Jerin Jacob
2022-10-12 16:28               ` Thomas Monjalon
2022-10-12 16:47                 ` Jerin Jacob
2022-10-12 20:44                   ` Thomas Monjalon
2022-10-13  6:51                     ` xstats " Morten Brørup
2022-10-13  7:12                       ` Pavan Nikhilesh Bhagavatula
2022-10-13  8:26                         ` Thomas Monjalon
2022-10-13  8:33                           ` [EXT] " Pavan Nikhilesh Bhagavatula
2022-10-13  8:59                         ` Van Haaren, Harry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN0PR11MB57125A64B4A315DD22ED1FC8D7229@BN0PR11MB5712.namprd11.prod.outlook.com \
    --to=harry.van.haaren@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=jerinj@marvell.com \
    --cc=jerinjacobk@gmail.com \
    --cc=mb@smartsharesystems.com \
    --cc=thomas@monjalon.net \
    --cc=weiyuanx.li@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).