@@ -822,7 +822,7 @@ static inline int octep_iq_full_check(struct octep_iq *iq)
822
822
if (unlikely (IQ_INSTR_SPACE (iq ) >
823
823
OCTEP_WAKE_QUEUE_THRESHOLD )) {
824
824
netif_start_subqueue (iq -> netdev , iq -> q_no );
825
- iq -> stats . restart_cnt ++ ;
825
+ iq -> stats -> restart_cnt ++ ;
826
826
return 0 ;
827
827
}
828
828
@@ -960,7 +960,7 @@ static netdev_tx_t octep_start_xmit(struct sk_buff *skb,
960
960
wmb ();
961
961
/* Ring Doorbell to notify the NIC of new packets */
962
962
writel (iq -> fill_cnt , iq -> doorbell_reg );
963
- iq -> stats . instr_posted += iq -> fill_cnt ;
963
+ iq -> stats -> instr_posted += iq -> fill_cnt ;
964
964
iq -> fill_cnt = 0 ;
965
965
return NETDEV_TX_OK ;
966
966
@@ -991,37 +991,24 @@ static netdev_tx_t octep_start_xmit(struct sk_buff *skb,
991
991
static void octep_get_stats64 (struct net_device * netdev ,
992
992
struct rtnl_link_stats64 * stats )
993
993
{
994
- u64 tx_packets , tx_bytes , rx_packets , rx_bytes ;
995
994
struct octep_device * oct = netdev_priv (netdev );
995
+ u64 tx_packets , tx_bytes , rx_packets , rx_bytes ;
996
996
int q ;
997
997
998
- if (netif_running (netdev ))
999
- octep_ctrl_net_get_if_stats (oct ,
1000
- OCTEP_CTRL_NET_INVALID_VFID ,
1001
- & oct -> iface_rx_stats ,
1002
- & oct -> iface_tx_stats );
1003
-
1004
998
tx_packets = 0 ;
1005
999
tx_bytes = 0 ;
1006
1000
rx_packets = 0 ;
1007
1001
rx_bytes = 0 ;
1008
- for (q = 0 ; q < oct -> num_oqs ; q ++ ) {
1009
- struct octep_iq * iq = oct -> iq [q ];
1010
- struct octep_oq * oq = oct -> oq [q ];
1011
-
1012
- tx_packets += iq -> stats .instr_completed ;
1013
- tx_bytes += iq -> stats .bytes_sent ;
1014
- rx_packets += oq -> stats .packets ;
1015
- rx_bytes += oq -> stats .bytes ;
1002
+ for (q = 0 ; q < OCTEP_MAX_QUEUES ; q ++ ) {
1003
+ tx_packets += oct -> stats_iq [q ].instr_completed ;
1004
+ tx_bytes += oct -> stats_iq [q ].bytes_sent ;
1005
+ rx_packets += oct -> stats_oq [q ].packets ;
1006
+ rx_bytes += oct -> stats_oq [q ].bytes ;
1016
1007
}
1017
1008
stats -> tx_packets = tx_packets ;
1018
1009
stats -> tx_bytes = tx_bytes ;
1019
1010
stats -> rx_packets = rx_packets ;
1020
1011
stats -> rx_bytes = rx_bytes ;
1021
- stats -> multicast = oct -> iface_rx_stats .mcast_pkts ;
1022
- stats -> rx_errors = oct -> iface_rx_stats .err_pkts ;
1023
- stats -> collisions = oct -> iface_tx_stats .xscol ;
1024
- stats -> tx_fifo_errors = oct -> iface_tx_stats .undflw ;
1025
1012
}
1026
1013
1027
1014
/**
0 commit comments