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

Function sfc_stats_get_dp_tx

dpdk/drivers/net/sfc/sfc_ethdev.c:629–654  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627}
628
629static void
630sfc_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

Callers 1

sfc_stats_getFunction · 0.85

Calls 3

sfc_sa2sharedFunction · 0.85
sfc_pkts_bytes_getFunction · 0.85

Tested by

no test coverage detected