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

Function timed_lookups

dpdk/app/test/test_efd_perf.c:204–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204static int
205timed_lookups(struct efd_perf_params *params)
206{
207 unsigned int i, j, a;
208 const uint64_t start_tsc = rte_rdtsc();
209 efd_value_t ret_data;
210
211 for (i = 0; i < NUM_LOOKUPS / KEYS_TO_ADD; i++) {
212 for (j = 0; j < KEYS_TO_ADD; j++) {
213 ret_data = rte_efd_lookup(params->efd_table,
214 test_socket_id, keys[j]);
215 if (ret_data != data[j]) {
216 printf("Value mismatch using rte_efd_lookup: "
217 "key #%d (0x", i);
218 for (a = 0; a < params->key_size; a++)
219 printf("%02x", keys[i][a]);
220 printf(")\n");
221 printf(" Expected %d, got %d\n", data[i],
222 ret_data);
223
224 return -1;
225 }
226
227 }
228 }
229
230 const uint64_t end_tsc = rte_rdtsc();
231 const uint64_t time_taken = end_tsc - start_tsc;
232
233 cycles[params->cycle][LOOKUP] = time_taken / NUM_LOOKUPS;
234
235 return 0;
236}
237
238static int
239timed_lookups_multi(struct efd_perf_params *params)

Callers 1

run_all_tbl_perf_testsFunction · 0.70

Calls 3

rte_efd_lookupFunction · 0.85
rte_rdtscFunction · 0.50
printfFunction · 0.50

Tested by

no test coverage detected