| 627 | } |
| 628 | |
| 629 | static void |
| 630 | sfc_stats_get_dp_tx(struct sfc_adapter *sa, uint64_t *pkts, uint64_t *bytes) |
| 631 | { |
| 632 | struct sfc_adapter_shared *sas = sfc_sa2shared(sa); |
| 633 | uint64_t pkts_sum = 0; |
| 634 | uint64_t bytes_sum = 0; |
| 635 | unsigned int i; |
| 636 | |
| 637 | for (i = 0; i < sas->ethdev_txq_count; ++i) { |
| 638 | struct sfc_txq_info *txq_info; |
| 639 | |
| 640 | txq_info = sfc_txq_info_by_ethdev_qid(sas, i); |
| 641 | if (txq_info->state & SFC_TXQ_INITIALIZED) { |
| 642 | union sfc_pkts_bytes qstats; |
| 643 | |
| 644 | sfc_pkts_bytes_get(&txq_info->dp->dpq.stats, &qstats); |
| 645 | pkts_sum += qstats.pkts - |
| 646 | sa->sw_stats.reset_tx_pkts[i]; |
| 647 | bytes_sum += qstats.bytes - |
| 648 | sa->sw_stats.reset_tx_bytes[i]; |
| 649 | } |
| 650 | } |
| 651 | |
| 652 | *pkts = pkts_sum; |
| 653 | *bytes = bytes_sum; |
| 654 | } |
| 655 | |
| 656 | /* |
| 657 | * Some statistics are computed as A - B where A and B each increase |
no test coverage detected