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

Function sfc_update_diff_stat

dpdk/drivers/net/sfc/sfc_ethdev.c:672–677  ·  view source on GitHub ↗

* Some statistics are computed as A - B where A and B each increase * monotonically with some hardware counter(s) and the counters are read * asynchronously. * * If packet X is counted in A, but not counted in B yet, computed value is * greater than real. * * If packet X is not counted in A at the moment of reading the counter, * but counted in B at the moment of reading the counter, compu

Source from the content-addressed store, hash-verified

670 * the case when the MAC stats are zeroed as a result of a NIC reset.
671 */
672static void
673sfc_update_diff_stat(uint64_t *stat, uint64_t newval)
674{
675 if ((int64_t)(newval - *stat) > 0 || newval == 0)
676 *stat = newval;
677}
678
679static int
680sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)

Callers 1

sfc_stats_getFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected