Re: [dpdk-dev] [PATCH v6 1/6] lib/eal: implement the family of rte bit operation APIs

2020-01-06 Thread Honnappa Nagarahalli
> > > > > > > > > > > > > > > > > > > On Sat, 21 Dec 2019 16:07:23 + Honnappa Nagarahalli > > > > > > wrote: > > > > > > > > > > > > > Converting these into macros will help remove the size based > > > > > > > duplication > > > > of > > > > > > APIs. I came up with the following macro: > > >

Re: [dpdk-dev] [PATCH v6 1/6] lib/eal: implement the family of rte bit operation APIs

2020-01-06 Thread Stephen Hemminger
On Tue, 7 Jan 2020 00:44:51 + Honnappa Nagarahalli wrote: > > > > > > > > > > > > > > > > On Sat, 21 Dec 2019 16:07:23 + Honnappa Nagarahalli > > > > > wrote: > > > > > > > > > > > Converting these into macros will help remove the size based > > > > > > duplication > > > of > >

Re: [dpdk-dev] [PATCH v6 1/6] lib/eal: implement the family of rte bit operation APIs

2020-01-06 Thread Honnappa Nagarahalli
> > > > > > > > > > > On Sat, 21 Dec 2019 16:07:23 + Honnappa Nagarahalli > > > > wrote: > > > > > > > > > Converting these into macros will help remove the size based > > > > > duplication > > of > > > > APIs. I came up with the following macro: > > > > > > > > > > #define RTE_GET_BIT(nr, v

Re: [dpdk-dev] [PATCH v6 1/6] lib/eal: implement the family of rte bit operation APIs

2020-01-06 Thread Honnappa Nagarahalli
> > > > > > > > On Sat, 21 Dec 2019 16:07:23 + > > > Honnappa Nagarahalli wrote: > > > > > > > Converting these into macros will help remove the size based > duplication of > > > APIs. I came up with the following macro: > > > > > > > > #define RTE_GET_BIT(nr, var, ret, memorder) \ ({ \ > > >

Re: [dpdk-dev] [PATCH v6 1/6] lib/eal: implement the family of rte bit operation APIs

2019-12-29 Thread Gavin Hu
Hi Stephen, Honnappa, > -Original Message- > From: Stephen Hemminger > Sent: Tuesday, December 24, 2019 12:37 AM > To: Honnappa Nagarahalli > Cc: Joyce Kong ; tho...@monjalon.net; > david.march...@redhat.com; m...@smartsharesystems.com; > jer...@marvell.com; bruce.richard...@intel.com; r

Re: [dpdk-dev] [PATCH v6 1/6] lib/eal: implement the family of rte bit operation APIs

2019-12-23 Thread Stephen Hemminger
On Mon, 23 Dec 2019 05:04:12 + Honnappa Nagarahalli wrote: > > > > > > On Sat, 21 Dec 2019 16:07:23 + > > Honnappa Nagarahalli wrote: > > > > > Converting these into macros will help remove the size based duplication > > > of > > APIs. I came up with the following macro: > > >

Re: [dpdk-dev] [PATCH v6 1/6] lib/eal: implement the family of rte bit operation APIs

2019-12-23 Thread Jerin Jacob
On Sat, Dec 21, 2019 at 9:37 PM Honnappa Nagarahalli wrote: > > > +__rte_experimental > > > +static inline uint32_t > > > +rte_get_bit32_relaxed(unsigned int nr, uint32_t *addr) { > > Why not pass the memory order as a parameter? It would reduce the number > > of API calls by half. > I think thes

Re: [dpdk-dev] [PATCH v6 1/6] lib/eal: implement the family of rte bit operation APIs

2019-12-22 Thread Honnappa Nagarahalli
> > On Sat, 21 Dec 2019 16:07:23 + > Honnappa Nagarahalli wrote: > > > Converting these into macros will help remove the size based duplication of > APIs. I came up with the following macro: > > > > #define RTE_GET_BIT(nr, var, ret, memorder) \ ({ \ > > if (sizeof(var) == sizeof(uint32_t

Re: [dpdk-dev] [PATCH v6 1/6] lib/eal: implement the family of rte bit operation APIs

2019-12-22 Thread Honnappa Nagarahalli
> > On Sat, 21 Dec 2019 16:07:23 + > Honnappa Nagarahalli wrote: > > > Converting these into macros will help remove the size based duplication of > APIs. I came up with the following macro: > > > > #define RTE_GET_BIT(nr, var, ret, memorder) \ ({ \ > > if (sizeof(var) == sizeof(uint32

Re: [dpdk-dev] [PATCH v6 1/6] lib/eal: implement the family of rte bit operation APIs

2019-12-21 Thread Stephen Hemminger
On Sat, 21 Dec 2019 16:07:23 + Honnappa Nagarahalli wrote: > Converting these into macros will help remove the size based duplication of > APIs. I came up with the following macro: > > #define RTE_GET_BIT(nr, var, ret, memorder) \ > ({ \ > if (sizeof(var) == sizeof(uint32_t)) { \ >

Re: [dpdk-dev] [PATCH v6 1/6] lib/eal: implement the family of rte bit operation APIs

2019-12-21 Thread Stephen Hemminger
On Sat, 21 Dec 2019 16:07:23 + Honnappa Nagarahalli wrote: > Converting these into macros will help remove the size based duplication of > APIs. I came up with the following macro: > > #define RTE_GET_BIT(nr, var, ret, memorder) \ > ({ \ > if (sizeof(var) == sizeof(uint32_t)) { \ >

Re: [dpdk-dev] [PATCH v6 1/6] lib/eal: implement the family of rte bit operation APIs

2019-12-21 Thread Honnappa Nagarahalli
> > Subject: [PATCH v6 1/6] lib/eal: implement the family of rte bit > > operation APIs > > > > There are a lot functions of bit operations scattered and duplicated > > in PMDs, consolidating them into a common API family is necessary. > > Furthermore, when the bit operation is applied to the IO

Re: [dpdk-dev] [PATCH v6 1/6] lib/eal: implement the family of rte bit operation APIs

2019-12-19 Thread Honnappa Nagarahalli
Hi Joyce, These APIs seem to be written considering the PMD requirements. Is there a need to expose these to applications (external to DPDK?). > -Original Message- > From: Joyce Kong > Sent: Wednesday, December 18, 2019 12:00 AM > To: tho...@monjalon.net; step...@networkplumber.o

[dpdk-dev] [PATCH v6 1/6] lib/eal: implement the family of rte bit operation APIs

2019-12-17 Thread Joyce Kong
There are a lot functions of bit operations scattered and duplicated in PMDs, consolidating them into a common API family is necessary. Furthermore, when the bit operation is applied to the IO devices, use __ATOMIC_ACQ_REL to ensure the ordering for io bit operation. Signed-off-by: Joyce Kong Rev