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

Function rte_latencystats_update

dpdk/lib/latencystats/rte_latencystats.c:89–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 sizeof(lat_stats_strings[0]))
88
89int32_t
90rte_latencystats_update(void)
91{
92 unsigned int i;
93 float *stats_ptr = NULL;
94 uint64_t values[NUM_LATENCY_STATS] = {0};
95 int ret;
96
97 for (i = 0; i < NUM_LATENCY_STATS; i++) {
98 stats_ptr = RTE_PTR_ADD(glob_stats,
99 lat_stats_strings[i].offset);
100 values[i] = (uint64_t)floor((*stats_ptr)/
101 latencystat_cycles_per_ns());
102 }
103
104 ret = rte_metrics_update_values(RTE_METRICS_GLOBAL,
105 latency_stats_index,
106 values, NUM_LATENCY_STATS);
107 if (ret < 0)
108 RTE_LOG(INFO, LATENCY_STATS, "Failed to push the stats\n");
109
110 return ret;
111}
112
113static void
114rte_latencystats_fill_values(struct rte_metric_value *values)

Callers 2

test_latency_updateFunction · 0.85
run_pkt_fwd_on_lcoreFunction · 0.85

Calls 2

Tested by 2

test_latency_updateFunction · 0.68
run_pkt_fwd_on_lcoreFunction · 0.68