> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Ananyev,
> Konstantin
> Sent: Thursday, May 14, 2020 6:47 PM
> >
> > > > -static inline unsigned
> > > > +static inline unsigned int
> > > > rte_ring_count(const struct rte_ring *r)
> > > > {
> > > > uint32_t prod_tail = r->prod.tail;
>
> > > -static inline unsigned
> > > +static inline unsigned int
> > > rte_ring_count(const struct rte_ring *r)
> > > {
> > > uint32_t prod_tail = r->prod.tail;
> > > uint32_t cons_tail = r->cons.tail;
> > > uint32_t count = (prod_tail - cons_tail) & r->mask;
> > > - return (count > r->c
> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Ananyev,
> Konstantin
> Sent: Thursday, May 14, 2020 2:24 PM
>
>
> Hi Morten,
>
> > Testing if the ring is empty is as simple as comparing the producer
> and
> > consumer pointers.
> > In theory, this optimization reduces the number of poten
Hi Morten,
> Testing if the ring is empty is as simple as comparing the producer and
> consumer pointers.
> In theory, this optimization reduces the number of potential cache misses
> from 3 to 2 by not having to read r->mask in rte_ring_count().
>
> It is not possible to enqueue more elements t
Testing if the ring is empty is as simple as comparing the producer and
consumer pointers.
In theory, this optimization reduces the number of potential cache misses
from 3 to 2 by not having to read r->mask in rte_ring_count().
It is not possible to enqueue more elements than the capacity of a rin
Testing if the ring is empty is as simple as comparing the producer and
consumer pointers.
In theory, this optimization reduces the number of potential cache misses
from 3 to 2 by not having to read r->mask in rte_ring_count().
It is not possible to enqueue more elements than the capacity of a rin
Testing if the ring is empty is as simple as comparing the producer
and\nconsumer pointers.\nIn theory, this optimization reduces the number of
potential cache misses\nfrom 3 to 2 by not having to read r->mask in
rte_ring_count().\n\nIt is not possible to enqueue more elements than the
capacit
7 matches
Mail list logo