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

Function timed_lookups_multi

dpdk/app/test/test_efd_perf.c:238–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238static int
239timed_lookups_multi(struct efd_perf_params *params)
240{
241 unsigned int i, j, k, a;
242 efd_value_t result[RTE_EFD_BURST_MAX] = {0};
243 const void *keys_burst[RTE_EFD_BURST_MAX];
244 const uint64_t start_tsc = rte_rdtsc();
245
246 for (i = 0; i < NUM_LOOKUPS / KEYS_TO_ADD; i++) {
247 for (j = 0; j < KEYS_TO_ADD / RTE_EFD_BURST_MAX; j++) {
248 for (k = 0; k < RTE_EFD_BURST_MAX; k++)
249 keys_burst[k] = keys[j * RTE_EFD_BURST_MAX + k];
250
251 rte_efd_lookup_bulk(params->efd_table, test_socket_id,
252 RTE_EFD_BURST_MAX,
253 keys_burst, result);
254
255 for (k = 0; k < RTE_EFD_BURST_MAX; k++) {
256 uint32_t data_idx = j * RTE_EFD_BURST_MAX + k;
257 if (result[k] != data[data_idx]) {
258 printf("Value mismatch using "
259 "rte_efd_lookup_bulk: key #%d "
260 "(0x", i);
261 for (a = 0; a < params->key_size; a++)
262 printf("%02x",
263 keys[data_idx][a]);
264 printf(")\n");
265 printf(" Expected %d, got %d\n",
266 data[data_idx], result[k]);
267
268 return -1;
269 }
270 }
271 }
272 }
273
274 const uint64_t end_tsc = rte_rdtsc();
275 const uint64_t time_taken = end_tsc - start_tsc;
276
277 cycles[params->cycle][LOOKUP_MULTI] = time_taken / NUM_LOOKUPS;
278
279 return 0;
280}
281
282static int
283timed_deletes(struct efd_perf_params *params)

Callers 1

run_all_tbl_perf_testsFunction · 0.70

Calls 3

rte_efd_lookup_bulkFunction · 0.85
rte_rdtscFunction · 0.50
printfFunction · 0.50

Tested by

no test coverage detected