Lines Matching refs:r
58 #define TEST_RING_VERIFY(exp, r, errst) do { \ argument
62 rte_ring_dump(stdout, (r)); \
75 test_ring_enqueue_zc_bulk(struct rte_ring *r, void * const *obj_table, in test_ring_enqueue_zc_bulk() argument
81 ret = rte_ring_enqueue_zc_bulk_start(r, n, &zcd, free_space); in test_ring_enqueue_zc_bulk()
85 rte_ring_enqueue_zc_finish(r, ret); in test_ring_enqueue_zc_bulk()
92 test_ring_enqueue_zc_bulk_elem(struct rte_ring *r, const void *obj_table, in test_ring_enqueue_zc_bulk_elem() argument
98 ret = rte_ring_enqueue_zc_bulk_elem_start(r, esize, n, in test_ring_enqueue_zc_bulk_elem()
103 rte_ring_enqueue_zc_finish(r, ret); in test_ring_enqueue_zc_bulk_elem()
110 test_ring_enqueue_zc_burst(struct rte_ring *r, void * const *obj_table, in test_ring_enqueue_zc_burst() argument
116 ret = rte_ring_enqueue_zc_burst_start(r, n, &zcd, free_space); in test_ring_enqueue_zc_burst()
120 rte_ring_enqueue_zc_finish(r, ret); in test_ring_enqueue_zc_burst()
127 test_ring_enqueue_zc_burst_elem(struct rte_ring *r, const void *obj_table, in test_ring_enqueue_zc_burst_elem() argument
133 ret = rte_ring_enqueue_zc_burst_elem_start(r, esize, n, in test_ring_enqueue_zc_burst_elem()
138 rte_ring_enqueue_zc_finish(r, ret); in test_ring_enqueue_zc_burst_elem()
145 test_ring_dequeue_zc_bulk(struct rte_ring *r, void **obj_table, in test_ring_dequeue_zc_bulk() argument
151 ret = rte_ring_dequeue_zc_bulk_start(r, n, &zcd, available); in test_ring_dequeue_zc_bulk()
155 rte_ring_dequeue_zc_finish(r, ret); in test_ring_dequeue_zc_bulk()
162 test_ring_dequeue_zc_bulk_elem(struct rte_ring *r, void *obj_table, in test_ring_dequeue_zc_bulk_elem() argument
168 ret = rte_ring_dequeue_zc_bulk_elem_start(r, esize, n, in test_ring_dequeue_zc_bulk_elem()
173 rte_ring_dequeue_zc_finish(r, ret); in test_ring_dequeue_zc_bulk_elem()
180 test_ring_dequeue_zc_burst(struct rte_ring *r, void **obj_table, in test_ring_dequeue_zc_burst() argument
186 ret = rte_ring_dequeue_zc_burst_start(r, n, &zcd, available); in test_ring_dequeue_zc_burst()
190 rte_ring_dequeue_zc_finish(r, ret); in test_ring_dequeue_zc_burst()
197 test_ring_dequeue_zc_burst_elem(struct rte_ring *r, void *obj_table, in test_ring_dequeue_zc_burst_elem() argument
203 ret = rte_ring_dequeue_zc_burst_elem_start(r, esize, n, in test_ring_dequeue_zc_burst_elem()
208 rte_ring_dequeue_zc_finish(r, ret); in test_ring_dequeue_zc_burst_elem()
219 unsigned int (*flegacy)(struct rte_ring *r,
222 unsigned int (*felem)(struct rte_ring *r, const void *obj_table,
227 unsigned int (*flegacy)(struct rte_ring *r,
230 unsigned int (*felem)(struct rte_ring *r, void *obj_table,
420 test_ring_enq_impl(struct rte_ring *r, void **obj, int esize, unsigned int n, in test_ring_enq_impl() argument
424 return test_enqdeq_impl[test_idx].enq.flegacy(r, obj, n, NULL); in test_ring_enq_impl()
426 return test_enqdeq_impl[test_idx].enq.felem(r, obj, esize, n, in test_ring_enq_impl()
431 test_ring_deq_impl(struct rte_ring *r, void **obj, int esize, unsigned int n, in test_ring_deq_impl() argument
435 return test_enqdeq_impl[test_idx].deq.flegacy(r, obj, n, NULL); in test_ring_deq_impl()
437 return test_enqdeq_impl[test_idx].deq.felem(r, obj, esize, n, in test_ring_deq_impl()
589 struct rte_ring *r; in test_ring_burst_bulk_tests1() local
601 r = test_ring_create("test_ring_burst_bulk_tests", esize[i], in test_ring_burst_bulk_tests1()
625 ret = test_ring_enq_impl(r, cur_src, esize[i], rand, in test_ring_burst_bulk_tests1()
627 TEST_RING_VERIFY(ret != 0, r, goto fail); in test_ring_burst_bulk_tests1()
629 ret = test_ring_deq_impl(r, cur_dst, esize[i], rand, in test_ring_burst_bulk_tests1()
631 TEST_RING_VERIFY(ret == rand, r, goto fail); in test_ring_burst_bulk_tests1()
634 ret = test_ring_enq_impl(r, cur_src, esize[i], rsz, in test_ring_burst_bulk_tests1()
636 TEST_RING_VERIFY(ret != 0, r, goto fail); in test_ring_burst_bulk_tests1()
638 TEST_RING_VERIFY(rte_ring_free_count(r) == 0, r, goto fail); in test_ring_burst_bulk_tests1()
639 TEST_RING_VERIFY(rsz == rte_ring_count(r), r, goto fail); in test_ring_burst_bulk_tests1()
640 TEST_RING_VERIFY(rte_ring_full(r), r, goto fail); in test_ring_burst_bulk_tests1()
641 TEST_RING_VERIFY(rte_ring_empty(r) == 0, r, goto fail); in test_ring_burst_bulk_tests1()
644 ret = test_ring_deq_impl(r, cur_dst, esize[i], rsz, in test_ring_burst_bulk_tests1()
646 TEST_RING_VERIFY(ret == (int)rsz, r, goto fail); in test_ring_burst_bulk_tests1()
648 TEST_RING_VERIFY(rsz == rte_ring_free_count(r), r, goto fail); in test_ring_burst_bulk_tests1()
649 TEST_RING_VERIFY(rte_ring_count(r) == 0, r, goto fail); in test_ring_burst_bulk_tests1()
650 TEST_RING_VERIFY(rte_ring_full(r) == 0, r, goto fail); in test_ring_burst_bulk_tests1()
651 TEST_RING_VERIFY(rte_ring_empty(r), r, goto fail); in test_ring_burst_bulk_tests1()
658 temp_sz) == 0, r, goto fail); in test_ring_burst_bulk_tests1()
662 rte_ring_free(r); in test_ring_burst_bulk_tests1()
665 r = NULL; in test_ring_burst_bulk_tests1()
672 rte_ring_free(r); in test_ring_burst_bulk_tests1()
686 struct rte_ring *r; in test_ring_burst_bulk_tests2() local
696 r = test_ring_create("test_ring_burst_bulk_tests", esize[i], in test_ring_burst_bulk_tests2()
714 ret = test_ring_enq_impl(r, cur_src, esize[i], 1, test_idx); in test_ring_burst_bulk_tests2()
715 TEST_RING_VERIFY(ret == 1, r, goto fail); in test_ring_burst_bulk_tests2()
719 ret = test_ring_enq_impl(r, cur_src, esize[i], 2, test_idx); in test_ring_burst_bulk_tests2()
720 TEST_RING_VERIFY(ret == 2, r, goto fail); in test_ring_burst_bulk_tests2()
724 ret = test_ring_enq_impl(r, cur_src, esize[i], MAX_BULK, in test_ring_burst_bulk_tests2()
726 TEST_RING_VERIFY(ret == MAX_BULK, r, goto fail); in test_ring_burst_bulk_tests2()
729 ret = test_ring_deq_impl(r, cur_dst, esize[i], 1, test_idx); in test_ring_burst_bulk_tests2()
730 TEST_RING_VERIFY(ret == 1, r, goto fail); in test_ring_burst_bulk_tests2()
734 ret = test_ring_deq_impl(r, cur_dst, esize[i], 2, test_idx); in test_ring_burst_bulk_tests2()
735 TEST_RING_VERIFY(ret == 2, r, goto fail); in test_ring_burst_bulk_tests2()
739 ret = test_ring_deq_impl(r, cur_dst, esize[i], MAX_BULK, in test_ring_burst_bulk_tests2()
741 TEST_RING_VERIFY(ret == MAX_BULK, r, goto fail); in test_ring_burst_bulk_tests2()
747 r, goto fail); in test_ring_burst_bulk_tests2()
750 rte_ring_free(r); in test_ring_burst_bulk_tests2()
753 r = NULL; in test_ring_burst_bulk_tests2()
760 rte_ring_free(r); in test_ring_burst_bulk_tests2()
773 struct rte_ring *r; in test_ring_burst_bulk_tests3() local
783 r = test_ring_create("test_ring_burst_bulk_tests", esize[i], in test_ring_burst_bulk_tests3()
802 ret = test_ring_enq_impl(r, cur_src, esize[i], MAX_BULK, in test_ring_burst_bulk_tests3()
804 TEST_RING_VERIFY(ret == MAX_BULK, r, goto fail); in test_ring_burst_bulk_tests3()
808 ret = test_ring_deq_impl(r, cur_dst, esize[i], MAX_BULK, in test_ring_burst_bulk_tests3()
810 TEST_RING_VERIFY(ret == MAX_BULK, r, goto fail); in test_ring_burst_bulk_tests3()
818 r, goto fail); in test_ring_burst_bulk_tests3()
821 rte_ring_free(r); in test_ring_burst_bulk_tests3()
824 r = NULL; in test_ring_burst_bulk_tests3()
831 rte_ring_free(r); in test_ring_burst_bulk_tests3()
844 struct rte_ring *r; in test_ring_burst_bulk_tests4() local
857 r = test_ring_create("test_ring_burst_bulk_tests", esize[i], in test_ring_burst_bulk_tests4()
876 ret = test_ring_enq_impl(r, cur_src, esize[i], MAX_BULK, in test_ring_burst_bulk_tests4()
878 TEST_RING_VERIFY(ret == MAX_BULK, r, goto fail); in test_ring_burst_bulk_tests4()
884 ret = test_ring_enq_impl(r, cur_src, esize[i], 2, test_idx); in test_ring_burst_bulk_tests4()
885 TEST_RING_VERIFY(ret == 2, r, goto fail); in test_ring_burst_bulk_tests4()
895 ret = test_ring_enq_impl(r, cur_src, esize[i], num_elems, in test_ring_burst_bulk_tests4()
897 TEST_RING_VERIFY(ret == MAX_BULK - 3, r, goto fail); in test_ring_burst_bulk_tests4()
901 TEST_RING_VERIFY(rte_ring_full(r) == 1, r, goto fail); in test_ring_burst_bulk_tests4()
904 ret = test_ring_enq_impl(r, cur_src, esize[i], MAX_BULK, in test_ring_burst_bulk_tests4()
906 TEST_RING_VERIFY(ret == 0, r, goto fail); in test_ring_burst_bulk_tests4()
910 ret = test_ring_deq_impl(r, cur_dst, esize[i], MAX_BULK, in test_ring_burst_bulk_tests4()
912 TEST_RING_VERIFY(ret == MAX_BULK, r, goto fail); in test_ring_burst_bulk_tests4()
918 ret = test_ring_deq_impl(r, cur_dst, esize[i], 2, test_idx); in test_ring_burst_bulk_tests4()
919 TEST_RING_VERIFY(ret == 2, r, goto fail); in test_ring_burst_bulk_tests4()
927 ret = test_ring_deq_impl(r, cur_dst, esize[i], num_elems, in test_ring_burst_bulk_tests4()
929 TEST_RING_VERIFY(ret == MAX_BULK - 3, r, goto fail); in test_ring_burst_bulk_tests4()
934 TEST_RING_VERIFY(rte_ring_empty(r) == 1, r, goto fail); in test_ring_burst_bulk_tests4()
939 r, goto fail); in test_ring_burst_bulk_tests4()
942 rte_ring_free(r); in test_ring_burst_bulk_tests4()
945 r = NULL; in test_ring_burst_bulk_tests4()
952 rte_ring_free(r); in test_ring_burst_bulk_tests4()