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

Function ixgbevf_dev_xstats_get

dpdk/drivers/net/ixgbe/ixgbe_ethdev.c:3832–3856  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3830}
3831
3832static int
3833ixgbevf_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
3834 unsigned n)
3835{
3836 struct ixgbevf_hw_stats *hw_stats = (struct ixgbevf_hw_stats *)
3837 IXGBE_DEV_PRIVATE_TO_STATS(dev->data->dev_private);
3838 unsigned i;
3839
3840 if (n < IXGBEVF_NB_XSTATS)
3841 return IXGBEVF_NB_XSTATS;
3842
3843 ixgbevf_update_stats(dev);
3844
3845 if (!xstats)
3846 return 0;
3847
3848 /* Extended stats */
3849 for (i = 0; i < IXGBEVF_NB_XSTATS; i++) {
3850 xstats[i].id = i;
3851 xstats[i].value = *(uint64_t *)(((char *)hw_stats) +
3852 rte_ixgbevf_stats_strings[i].offset);
3853 }
3854
3855 return IXGBEVF_NB_XSTATS;
3856}
3857
3858static int
3859ixgbevf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)

Callers

nothing calls this directly

Calls 1

ixgbevf_update_statsFunction · 0.85

Tested by

no test coverage detected