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

Function fs_dev_stats_save

dpdk/drivers/net/failsafe/failsafe_ether.c:320–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318}
319
320static void
321fs_dev_stats_save(struct sub_device *sdev)
322{
323 struct rte_eth_stats stats;
324 int err;
325
326 /* Attempt to read current stats. */
327 err = rte_eth_stats_get(PORT_ID(sdev), &stats);
328 if (err) {
329 uint64_t timestamp = sdev->stats_snapshot.timestamp;
330
331 WARN("Could not access latest statistics from sub-device %d.",
332 SUB_ID(sdev));
333 if (timestamp != 0)
334 WARN("Using latest snapshot taken before %"PRIu64" seconds.",
335 (rte_rdtsc() - timestamp) / rte_get_tsc_hz());
336 }
337 failsafe_stats_increment
338 (&PRIV(fs_dev(sdev))->stats_accumulator,
339 err ? &sdev->stats_snapshot.stats : &stats);
340 memset(&sdev->stats_snapshot, 0, sizeof(sdev->stats_snapshot));
341}
342
343static inline int
344fs_rxtx_clean(struct sub_device *sdev)

Callers 1

failsafe_dev_removeFunction · 0.85

Calls 6

rte_eth_stats_getFunction · 0.85
rte_get_tsc_hzFunction · 0.85
failsafe_stats_incrementFunction · 0.85
fs_devFunction · 0.85
memsetFunction · 0.85
rte_rdtscFunction · 0.50

Tested by

no test coverage detected