| 403 | } |
| 404 | |
| 405 | static int |
| 406 | txgbevf_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 | |
| 431 | static int |
| 432 | txgbevf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) |
nothing calls this directly
no test coverage detected