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

Function txgbevf_dev_stats_get

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

Source from the content-addressed store, hash-verified

429}
430
431static int
432txgbevf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
433{
434 struct txgbevf_hw_stats *hw_stats = (struct txgbevf_hw_stats *)
435 TXGBE_DEV_STATS(dev);
436 uint32_t i;
437
438 txgbevf_update_stats(dev);
439
440 if (stats == NULL)
441 return -EINVAL;
442
443 stats->ipackets = 0;
444 stats->ibytes = 0;
445 stats->opackets = 0;
446 stats->obytes = 0;
447
448 for (i = 0; i < 8; i++) {
449 stats->ipackets += hw_stats->qp[i].vfgprc;
450 stats->ibytes += hw_stats->qp[i].vfgorc;
451 stats->opackets += hw_stats->qp[i].vfgptc;
452 stats->obytes += hw_stats->qp[i].vfgotc;
453 }
454
455 return 0;
456}
457
458static int
459txgbevf_dev_stats_reset(struct rte_eth_dev *dev)

Callers 1

txgbevf_dev_stats_resetFunction · 0.85

Calls 1

txgbevf_update_statsFunction · 0.85

Tested by

no test coverage detected