@@ -822,7 +822,7 @@ static inline int octep_iq_full_check(struct octep_iq *iq)
822822 if (unlikely (IQ_INSTR_SPACE (iq ) >
823823 OCTEP_WAKE_QUEUE_THRESHOLD )) {
824824 netif_start_subqueue (iq -> netdev , iq -> q_no );
825- iq -> stats . restart_cnt ++ ;
825+ iq -> stats -> restart_cnt ++ ;
826826 return 0 ;
827827 }
828828
@@ -960,7 +960,7 @@ static netdev_tx_t octep_start_xmit(struct sk_buff *skb,
960960 wmb ();
961961 /* Ring Doorbell to notify the NIC of new packets */
962962 writel (iq -> fill_cnt , iq -> doorbell_reg );
963- iq -> stats . instr_posted += iq -> fill_cnt ;
963+ iq -> stats -> instr_posted += iq -> fill_cnt ;
964964 iq -> fill_cnt = 0 ;
965965 return NETDEV_TX_OK ;
966966
@@ -991,37 +991,24 @@ static netdev_tx_t octep_start_xmit(struct sk_buff *skb,
991991static void octep_get_stats64 (struct net_device * netdev ,
992992 struct rtnl_link_stats64 * stats )
993993{
994- u64 tx_packets , tx_bytes , rx_packets , rx_bytes ;
995994 struct octep_device * oct = netdev_priv (netdev );
995+ u64 tx_packets , tx_bytes , rx_packets , rx_bytes ;
996996 int q ;
997997
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-
1004998 tx_packets = 0 ;
1005999 tx_bytes = 0 ;
10061000 rx_packets = 0 ;
10071001 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 ;
10161007 }
10171008 stats -> tx_packets = tx_packets ;
10181009 stats -> tx_bytes = tx_bytes ;
10191010 stats -> rx_packets = rx_packets ;
10201011 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 ;
10251012}
10261013
10271014/**
0 commit comments