MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_empty_dequeue

Function test_empty_dequeue

dpdk/app/test/test_ring_perf.c:143–159  ·  view source on GitHub ↗

Get cycle counts for dequeuing from an empty ring. Should be 2 or 3 cycles */

Source from the content-addressed store, hash-verified

141
142/* Get cycle counts for dequeuing from an empty ring. Should be 2 or 3 cycles */
143static void
144test_empty_dequeue(struct rte_ring *r, const int esize,
145 const unsigned int api_type)
146{
147 const unsigned int iter_shift = 26;
148 const unsigned int iterations = 1 << iter_shift;
149 unsigned int i = 0;
150 void *burst[MAX_BURST];
151
152 const uint64_t start = rte_rdtsc();
153 for (i = 0; i < iterations; i++)
154 test_ring_dequeue(r, burst, esize, bulk_sizes[0], api_type);
155 const uint64_t end = rte_rdtsc();
156
157 test_ring_print_test_string(api_type, esize, bulk_sizes[0],
158 ((double)(end - start)) / iterations);
159}
160
161/*
162 * for the separate enqueue and dequeue threads they take in one param

Callers 1

test_ring_perf_esizeFunction · 0.70

Calls 3

test_ring_dequeueFunction · 0.85
rte_rdtscFunction · 0.50

Tested by

no test coverage detected