[dpdk-dev] [PATCH v9 4/6] test/ring: modify perf test cases to use rte_ring_xxx_elem APIs
Honnappa Nagarahalli
Honnappa.Nagarahalli at arm.com
Sat Jan 18 17:28:07 CET 2020
<snip>
>
> On Wed, Jan 15, 2020 at 11:25:09PM -0600, Honnappa Nagarahalli wrote:
> > Adjust the performance test cases to test rte_ring_xxx_elem APIs.
> >
> > Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> > Reviewed-by: Gavin Hu <gavin.hu at arm.com>
> > ---
> > app/test/test_ring_perf.c | 454
> > +++++++++++++++++++++++---------------
> > 1 file changed, 273 insertions(+), 181 deletions(-)
> >
> > diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c
> > index 6c2aca483..8d1217951 100644
> > --- a/app/test/test_ring_perf.c
> > +++ b/app/test/test_ring_perf.c
>
> [...]
>
> > -static int
> > -test_ring_perf(void)
> > +/* Run all tests for a given element size */ static
> > +__rte_always_inline int test_ring_perf_esize(const int esize)
> > {
> > struct lcore_pair cores;
> > struct rte_ring *r = NULL;
> >
> > - r = rte_ring_create(RING_NAME, RING_SIZE, rte_socket_id(), 0);
> > + /*
> > + * Performance test for legacy/_elem APIs
> > + * SP-SC/MP-MC, single
> > + */
> > + r = test_ring_create(RING_NAME, esize, RING_SIZE, rte_socket_id(),
> > +0);
> > if (r == NULL)
> > return -1;
> >
> > - printf("### Testing single element and burst enq/deq ###\n");
> > - test_single_enqueue_dequeue(r);
> > - test_burst_enqueue_dequeue(r);
> > + printf("\n### Testing single element enq/deq ###\n");
> > + if (test_single_enqueue_dequeue(r, esize,
> > + TEST_RING_THREAD_SPSC |
> TEST_RING_ELEM_SINGLE) < 0)
> > + return -1;
>
> the ring is not freed on error (same below)
Will fix.
<snip>
More information about the dev
mailing list