#define A_MPS_STAT_RX_BG_3_LB_TRUNC_FRAME_L 0x96b8
#define A_MPS_STAT_RX_BG_3_LB_TRUNC_FRAME_H 0x96bc
+#define A_MPS_VF_STAT_TX_VF_BCAST_BYTES_L 0x80
#define A_MPS_VF_STAT_TX_VF_BCAST_FRAMES_L 0x88
+#define A_MPS_VF_STAT_TX_VF_MCAST_BYTES_L 0x90
#define A_MPS_VF_STAT_TX_VF_MCAST_FRAMES_L 0x98
+#define A_MPS_VF_STAT_TX_VF_UCAST_BYTES_L 0xa0
#define A_MPS_VF_STAT_TX_VF_UCAST_FRAMES_L 0xa8
#define A_MPS_VF_STAT_TX_VF_DROP_FRAMES_L 0xb0
#define A_MPS_VF_STAT_RX_VF_BCAST_FRAMES_L 0xd0
/*
* Translate firmware statistics into host native statistics.
*/
+ p->tx_octets = be64_to_cpu(fwstats.tx_bcast_bytes) +
+ be64_to_cpu(fwstats.tx_mcast_bytes) +
+ be64_to_cpu(fwstats.tx_ucast_bytes);
p->tx_bcast_frames = be64_to_cpu(fwstats.tx_bcast_frames);
p->tx_mcast_frames = be64_to_cpu(fwstats.tx_mcast_frames);
p->tx_ucast_frames = be64_to_cpu(fwstats.tx_ucast_frames);
#define GET_STAT(name) \
t4_read_reg64(adapter, \
T4VF_MPS_BASE_ADDR + A_MPS_VF_STAT_##name##_L)
+ p->tx_octets = GET_STAT(TX_VF_BCAST_BYTES) +
+ GET_STAT(TX_VF_MCAST_BYTES) +
+ GET_STAT(TX_VF_UCAST_BYTES);
p->tx_bcast_frames = GET_STAT(TX_VF_BCAST_FRAMES);
p->tx_mcast_frames = GET_STAT(TX_VF_MCAST_FRAMES);
p->tx_ucast_frames = GET_STAT(TX_VF_UCAST_FRAMES);
/* TX Stats */
eth_stats->opackets = ps.tx_bcast_frames + ps.tx_mcast_frames +
ps.tx_ucast_frames;
+ eth_stats->obytes = ps.tx_octets;
eth_stats->oerrors = ps.tx_drop;
for (i = 0; i < pi->n_rx_qsets; i++) {