1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2020 Arm Limited
6 #include "test_ring_stress_impl.h"
7 #include <rte_ring_elem.h>
10 _st_ring_dequeue_bulk(struct rte_ring *r, void **obj, uint32_t n,
14 struct rte_ring_zc_data zcd;
16 m = rte_ring_dequeue_zc_bulk_start(r, n, &zcd, avail);
18 /* Copy the data from the ring */
19 test_ring_copy_from(&zcd, obj, -1, n);
20 rte_ring_dequeue_zc_finish(r, n);
26 static inline uint32_t
27 _st_ring_enqueue_bulk(struct rte_ring *r, void * const *obj, uint32_t n,
31 struct rte_ring_zc_data zcd;
33 m = rte_ring_enqueue_zc_bulk_start(r, n, &zcd, free);
35 /* Copy the data from the ring */
36 test_ring_copy_to(&zcd, obj, -1, n);
37 rte_ring_enqueue_zc_finish(r, n);
44 _st_ring_init(struct rte_ring *r, const char *name, uint32_t num)
46 return rte_ring_init(r, name, num,
47 RING_F_MP_HTS_ENQ | RING_F_MC_HTS_DEQ);
50 const struct test test_ring_mt_peek_stress_zc = {
52 .nb_case = RTE_DIM(tests),