nfp: fix port stats for mac representors
authorPieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Sat, 2 Dec 2017 05:37:23 +0000 (21:37 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:07:59 +0000 (11:07 +0100)
commit4bbd45c38ed6d0ded82ab453a1395f110814c389
tree35548c904968a9677f6288d2bf996164f762c818
parent45f9e44667c135f629c8e965a788b4f9030289f1
nfp: fix port stats for mac representors

[ Upstream commit 42d779ffc186f6dd26271fc60a7417cb51aca93e ]

Previously we swapped the tx_packets, tx_bytes and tx_dropped counters
with rx_packets, rx_bytes and rx_dropped counters, respectively. This
behaviour is correct and expected for VF representors but it should not
be swapped for physical port mac representors.

Fixes: eadfa4c3be99 ("nfp: add stats and xmit helpers for representors")
Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c