Re: [dpdk-dev] [PATCH v7 02/17] lib/ring: apis to support configurable element size

2020-01-13 Thread Ananyev, Konstantin
> > > > > > > > > > > > > + > > > > > > > > > > > > +static __rte_always_inline void > > > > > > > > > > > > +enqueue_elems_128(struct rte_ring *r, uint32_t > > > > > > > > > > > > +prod_head, const void *obj_table, uint32_t n) { > > > > > > > > > > > > +unsigned int i; const uint32_t size = >

Re: [dpdk-dev] [PATCH v7 02/17] lib/ring: apis to support configurable element size

2020-01-09 Thread Honnappa Nagarahalli
> > > > > > > > > > > + > > > > > > > > > > > +static __rte_always_inline void > > > > > > > > > > > +enqueue_elems_128(struct rte_ring *r, uint32_t > > > > > > > > > > > +prod_head, const void *obj_table, uint32_t n) { > > > > > > > > > > > +unsigned int i; const uint32_t size = > > > > > > > > >

Re: [dpdk-dev] [PATCH v7 02/17] lib/ring: apis to support configurable element size

2020-01-08 Thread Ananyev, Konstantin
> > > > > > > > > > > + > > > > > > > > > > +static __rte_always_inline void > > > > > > > > > > +enqueue_elems_128(struct rte_ring *r, uint32_t > > > > > > > > > > +prod_head, const void *obj_table, uint32_t n) { > > > > > > > > > > +unsigned int i; const uint32_t size = > > > > > > > > > > +r

Re: [dpdk-dev] [PATCH v7 02/17] lib/ring: apis to support configurable element size

2020-01-08 Thread Honnappa Nagarahalli
> > > > > > > > > + > > > > > > > > > +static __rte_always_inline void > > > > > > > > > +enqueue_elems_128(struct rte_ring *r, uint32_t > > > > > > > > > +prod_head, const void *obj_table, uint32_t n) { > > > > > > > > > +unsigned int i; const uint32_t size = > > > > > > > > > +r->size; uint32_t

Re: [dpdk-dev] [PATCH v7 02/17] lib/ring: apis to support configurable element size

2020-01-08 Thread Ananyev, Konstantin
> > > > > > > > > + > > > > > > > > +static __rte_always_inline void enqueue_elems_128(struct > > > > > > > > +rte_ring *r, uint32_t prod_head, const void *obj_table, > > > > > > > > +uint32_t n) { unsigned int i; const uint32_t size = > > > > > > > > +r->size; uint32_t idx = prod_head & r->mas

Re: [dpdk-dev] [PATCH v7 02/17] lib/ring: apis to support configurable element size

2020-01-07 Thread Honnappa Nagarahalli
> > > > > > > + > > > > > > > +static __rte_always_inline void enqueue_elems_128(struct > > > > > > > +rte_ring *r, uint32_t prod_head, const void *obj_table, > > > > > > > +uint32_t n) { unsigned int i; const uint32_t size = > > > > > > > +r->size; uint32_t idx = prod_head & r->mask; __uint128_t

Re: [dpdk-dev] [PATCH v7 02/17] lib/ring: apis to support configurable element size

2020-01-07 Thread Ananyev, Konstantin
> > > > > > > + > > > > > > +static __rte_always_inline void enqueue_elems_128(struct > > > > > > +rte_ring *r, uint32_t prod_head, const void *obj_table, > > > > > > +uint32_t n) { unsigned int i; const uint32_t size = r->size; > > > > > > +uint32_t idx = prod_head & r->mask; __uint128_t *ring

Re: [dpdk-dev] [PATCH v7 02/17] lib/ring: apis to support configurable element size

2020-01-07 Thread Honnappa Nagarahalli
> > > > > + > > > > > +static __rte_always_inline void enqueue_elems_128(struct > > > > > +rte_ring *r, uint32_t prod_head, const void *obj_table, > > > > > +uint32_t n) { unsigned int i; const uint32_t size = r->size; > > > > > +uint32_t idx = prod_head & r->mask; __uint128_t *ring = > > > > > +(

Re: [dpdk-dev] [PATCH v7 02/17] lib/ring: apis to support configurable element size

2020-01-07 Thread Ananyev, Konstantin
> > > > > + > > > > +static __rte_always_inline void > > > > +enqueue_elems_128(struct rte_ring *r, uint32_t prod_head, const > > > > +void *obj_table, uint32_t n) { unsigned int i; const uint32_t size > > > > += r->size; uint32_t idx = prod_head & r->mask; __uint128_t *ring = > > > > +(__uint12

Re: [dpdk-dev] [PATCH v7 02/17] lib/ring: apis to support configurable element size

2020-01-06 Thread Honnappa Nagarahalli
> > > + > > > +static __rte_always_inline void > > > +enqueue_elems_128(struct rte_ring *r, uint32_t prod_head, const > > > +void *obj_table, uint32_t n) { unsigned int i; const uint32_t size > > > += r->size; uint32_t idx = prod_head & r->mask; __uint128_t *ring = > > > +(__uint128_t *)&r[1]; con

Re: [dpdk-dev] [PATCH v7 02/17] lib/ring: apis to support configurable element size

2020-01-06 Thread Honnappa Nagarahalli
> > diff --git a/lib/librte_ring/rte_ring_elem.h > > b/lib/librte_ring/rte_ring_elem.h new file mode 100644 index > > 0..fc7fe127c > > --- /dev/null > > +++ b/lib/librte_ring/rte_ring_elem.h > > @@ -0,0 +1,1002 @@ > > + > > +static __rte_always_inline void > > +enqueue_elems_128(struct

Re: [dpdk-dev] [PATCH v7 02/17] lib/ring: apis to support configurable element size

2020-01-02 Thread Ananyev, Konstantin
> diff --git a/lib/librte_ring/rte_ring_elem.h b/lib/librte_ring/rte_ring_elem.h > new file mode 100644 > index 0..fc7fe127c > --- /dev/null > +++ b/lib/librte_ring/rte_ring_elem.h > @@ -0,0 +1,1002 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * > + * Copyright (c) 2019 Arm Limited

[dpdk-dev] [PATCH v7 02/17] lib/ring: apis to support configurable element size

2019-12-19 Thread Honnappa Nagarahalli
Current APIs assume ring elements to be pointers. However, in many use cases, the size can be different. Add new APIs to support configurable ring element sizes. Signed-off-by: Honnappa Nagarahalli Reviewed-by: Dharmik Thakkar Reviewed-by: Gavin Hu Reviewed-by: Ruifeng Wang --- lib/librte_rin