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

Function txgbevf_dev_xstats_get

dpdk/drivers/net/txgbe/txgbe_ethdev_vf.c:405–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

403}
404
405static int
406txgbevf_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
407 unsigned int n)
408{
409 struct txgbevf_hw_stats *hw_stats = (struct txgbevf_hw_stats *)
410 TXGBE_DEV_STATS(dev);
411 unsigned int i;
412
413 if (n < TXGBEVF_NB_XSTATS)
414 return TXGBEVF_NB_XSTATS;
415
416 txgbevf_update_stats(dev);
417
418 if (!xstats)
419 return 0;
420
421 /* Extended stats */
422 for (i = 0; i < TXGBEVF_NB_XSTATS; i++) {
423 xstats[i].id = i;
424 xstats[i].value = *(uint64_t *)(((char *)hw_stats) +
425 rte_txgbevf_stats_strings[i].offset);
426 }
427
428 return TXGBEVF_NB_XSTATS;
429}
430
431static int
432txgbevf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)

Callers

nothing calls this directly

Calls 1

txgbevf_update_statsFunction · 0.85

Tested by

no test coverage detected