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

Function WORKER_DEFINE

dpdk/app/test/test_trace_perf.c:118–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116#define VOID_FP app_dpdk_test_fp()
117
118WORKER_DEFINE(GENERIC_VOID)
119WORKER_DEFINE(GENERIC_U64)
120WORKER_DEFINE(GENERIC_INT)
121WORKER_DEFINE(GENERIC_FLOAT)
122WORKER_DEFINE(GENERIC_DOUBLE)
123WORKER_DEFINE(GENERIC_STR)
124WORKER_DEFINE(VOID_FP)
125
126static void
127run_test(const char *str, lcore_function_t f, struct test_data *data, size_t sz)
128{
129 unsigned int id, worker = 0;
130
131 memset(data, 0, sz);
132 data->nb_workers = rte_lcore_count() - 1;
133 RTE_LCORE_FOREACH_WORKER(id)
134 rte_eal_remote_launch(f, &data->ldata[worker++], id);
135
136 wait_till_workers_are_ready(data);
137 rte_delay_ms(100); /* Wait for some time to accumulate the stats */
138 signal_workers_to_finish(data);
139
140 RTE_LCORE_FOREACH_WORKER(id)
141 rte_eal_wait_lcore(id);
142
143 measure_perf(str, data);
144}
145
146static int
147test_trace_perf(void)

Callers

nothing calls this directly

Calls 7

memsetFunction · 0.85
rte_lcore_countFunction · 0.85
rte_delay_msFunction · 0.85
signal_workers_to_finishFunction · 0.85
run_testFunction · 0.70
measure_perfFunction · 0.70

Tested by

no test coverage detected