net: rocker: Add support for retrieving port level statistics
authorDavid Ahern <dsahern@gmail.com>
Fri, 30 Jan 2015 03:59:33 +0000 (20:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Feb 2015 07:17:39 +0000 (23:17 -0800)
commit9766e97af1b901ffbb36fcc648e50626d926bb24
treed60975a3c7a7e594d975cad182d8e59c7cc94f2c
parentfe3ef6165388f28e2b26d55a19721bf12cb9de2f
net: rocker: Add support for retrieving port level statistics

Add support for retrieving port level statistics from device.
Hook is added for ethtool's stats functionality. For example,

$ ethtool -S eth3
NIC statistics:
     rx_packets: 12
     rx_bytes: 2790
     rx_dropped: 0
     rx_errors: 0
     tx_packets: 8
     tx_bytes: 728
     tx_dropped: 0
     tx_errors: 0

Signed-off-by: David Ahern <dsahern@gmail.com>
Acked-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/rocker/rocker.c
drivers/net/ethernet/rocker/rocker.h