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

Function sfc_stats_get_dp_rx

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

Source from the content-addressed store, hash-verified

600}
601
602static void
603sfc_stats_get_dp_rx(struct sfc_adapter *sa, uint64_t *pkts, uint64_t *bytes)
604{
605 struct sfc_adapter_shared *sas = sfc_sa2shared(sa);
606 uint64_t pkts_sum = 0;
607 uint64_t bytes_sum = 0;
608 unsigned int i;
609
610 for (i = 0; i < sas->ethdev_rxq_count; ++i) {
611 struct sfc_rxq_info *rxq_info;
612
613 rxq_info = sfc_rxq_info_by_ethdev_qid(sas, i);
614 if (rxq_info->state & SFC_RXQ_INITIALIZED) {
615 union sfc_pkts_bytes qstats;
616
617 sfc_pkts_bytes_get(&rxq_info->dp->dpq.stats, &qstats);
618 pkts_sum += qstats.pkts -
619 sa->sw_stats.reset_rx_pkts[i];
620 bytes_sum += qstats.bytes -
621 sa->sw_stats.reset_rx_bytes[i];
622 }
623 }
624
625 *pkts = pkts_sum;
626 *bytes = bytes_sum;
627}
628
629static void
630sfc_stats_get_dp_tx(struct sfc_adapter *sa, uint64_t *pkts, uint64_t *bytes)

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