Lines Matching refs:stats
31 struct nfp_repr_pcpu_stats *stats; in nfp_repr_inc_tx_stats() local
35 this_cpu_inc(repr->stats->tx_drops); in nfp_repr_inc_tx_stats()
39 stats = this_cpu_ptr(repr->stats); in nfp_repr_inc_tx_stats()
40 u64_stats_update_begin(&stats->syncp); in nfp_repr_inc_tx_stats()
41 stats->tx_packets++; in nfp_repr_inc_tx_stats()
42 stats->tx_bytes += len; in nfp_repr_inc_tx_stats()
43 u64_stats_update_end(&stats->syncp); in nfp_repr_inc_tx_stats()
49 struct nfp_repr_pcpu_stats *stats; in nfp_repr_inc_rx_stats() local
51 stats = this_cpu_ptr(repr->stats); in nfp_repr_inc_rx_stats()
52 u64_stats_update_begin(&stats->syncp); in nfp_repr_inc_rx_stats()
53 stats->rx_packets++; in nfp_repr_inc_rx_stats()
54 stats->rx_bytes += len; in nfp_repr_inc_rx_stats()
55 u64_stats_update_end(&stats->syncp); in nfp_repr_inc_rx_stats()
60 struct rtnl_link_stats64 *stats) in nfp_repr_phy_port_get_stats64() argument
64 stats->tx_packets = readq(mem + NFP_MAC_STATS_TX_FRAMES_TRANSMITTED_OK); in nfp_repr_phy_port_get_stats64()
65 stats->tx_bytes = readq(mem + NFP_MAC_STATS_TX_OUT_OCTETS); in nfp_repr_phy_port_get_stats64()
66 stats->tx_dropped = readq(mem + NFP_MAC_STATS_TX_OUT_ERRORS); in nfp_repr_phy_port_get_stats64()
68 stats->rx_packets = readq(mem + NFP_MAC_STATS_RX_FRAMES_RECEIVED_OK); in nfp_repr_phy_port_get_stats64()
69 stats->rx_bytes = readq(mem + NFP_MAC_STATS_RX_IN_OCTETS); in nfp_repr_phy_port_get_stats64()
70 stats->rx_dropped = readq(mem + NFP_MAC_STATS_RX_IN_ERRORS); in nfp_repr_phy_port_get_stats64()
75 struct rtnl_link_stats64 *stats) in nfp_repr_vnic_get_stats64() argument
80 stats->tx_packets = readq(port->vnic + NFP_NET_CFG_STATS_RX_FRAMES); in nfp_repr_vnic_get_stats64()
81 stats->tx_bytes = readq(port->vnic + NFP_NET_CFG_STATS_RX_OCTETS); in nfp_repr_vnic_get_stats64()
82 stats->tx_dropped = readq(port->vnic + NFP_NET_CFG_STATS_RX_DISCARDS); in nfp_repr_vnic_get_stats64()
84 stats->rx_packets = readq(port->vnic + NFP_NET_CFG_STATS_TX_FRAMES); in nfp_repr_vnic_get_stats64()
85 stats->rx_bytes = readq(port->vnic + NFP_NET_CFG_STATS_TX_OCTETS); in nfp_repr_vnic_get_stats64()
86 stats->rx_dropped = readq(port->vnic + NFP_NET_CFG_STATS_TX_DISCARDS); in nfp_repr_vnic_get_stats64()
90 nfp_repr_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats) in nfp_repr_get_stats64() argument
101 nfp_repr_phy_port_get_stats64(repr->port, stats); in nfp_repr_get_stats64()
105 nfp_repr_vnic_get_stats64(repr->port, stats); in nfp_repr_get_stats64()
125 struct rtnl_link_stats64 *stats) in nfp_repr_get_host_stats64() argument
135 repr_stats = per_cpu_ptr(repr->stats, i); in nfp_repr_get_host_stats64()
145 stats->tx_bytes += tbytes; in nfp_repr_get_host_stats64()
146 stats->tx_packets += tpkts; in nfp_repr_get_host_stats64()
147 stats->tx_dropped += tdrops; in nfp_repr_get_host_stats64()
148 stats->rx_bytes += rbytes; in nfp_repr_get_host_stats64()
149 stats->rx_packets += rpkts; in nfp_repr_get_host_stats64()
157 void *stats) in nfp_repr_get_offload_stats() argument
161 return nfp_repr_get_host_stats64(dev, stats); in nfp_repr_get_offload_stats()
416 free_percpu(repr->stats); in __nfp_repr_free()
441 repr->stats = netdev_alloc_pcpu_stats(struct nfp_repr_pcpu_stats); in nfp_repr_alloc_mqs()
442 if (!repr->stats) in nfp_repr_alloc_mqs()