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

Function rte_latencystats_get

dpdk/lib/latencystats/rte_latencystats.c:373–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371}
372
373int
374rte_latencystats_get(struct rte_metric_value *values, uint16_t size)
375{
376 if (size < NUM_LATENCY_STATS || values == NULL)
377 return NUM_LATENCY_STATS;
378
379 if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
380 const struct rte_memzone *mz;
381 mz = rte_memzone_lookup(MZ_RTE_LATENCY_STATS);
382 if (mz == NULL) {
383 RTE_LOG(ERR, LATENCY_STATS,
384 "Latency stats memzone not found\n");
385 return -ENOMEM;
386 }
387 glob_stats = mz->addr;
388 }
389
390 /* Retrieve latency stats */
391 rte_latencystats_fill_values(values);
392
393 return NUM_LATENCY_STATS;
394}

Callers 1

test_latencystats_getFunction · 0.85

Calls 3

rte_eal_process_typeFunction · 0.85
rte_memzone_lookupFunction · 0.85

Tested by 1

test_latencystats_getFunction · 0.68