nfp: add ethtool statistics for representors
authorJakub Kicinski <jakub.kicinski@netronome.com>
Fri, 18 Aug 2017 22:48:20 +0000 (15:48 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 19 Aug 2017 05:39:28 +0000 (22:39 -0700)
commit899a37ade8c6dd1619d510c1e3b4b99d508272a9
tree1bf9f81966174ba74cb31454832c414e00eea6ed
parentef0ec676a7181d418bb9051ccfe1cd13a1f47ab2
nfp: add ethtool statistics for representors

Representors may be associated with both VFs or more importantly
with physical ports.  Allow vNIC and MAC statistics to be read
with ethtool -S on representors.  In case of vNICs we reuse
the vNIC statistic helper, we just need to swap RX and TX to
give statistics the "switch perspective."

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
drivers/net/ethernet/netronome/nfp/nfp_port.h