Commit 16f4faa4 authored by Srinivas Jampala's avatar Srinivas Jampala Committed by David S. Miller

liquidio: Swap VF representor Tx and Rx statistics

Swap VF representor tx and rx interface statistics since it is a
virtual switchdev port and tx for VM should be rx for VF representor
and vice-versa.
Signed-off-by: default avatarSrinivas Jampala <srinivasa.jampala@cavium.com>
Acked-by: default avatarDerek Chickles <derek.chickles@cavium.com>
Signed-off-by: default avatarFelix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 091311de
...@@ -201,13 +201,14 @@ lio_vf_rep_get_stats64(struct net_device *dev, ...@@ -201,13 +201,14 @@ lio_vf_rep_get_stats64(struct net_device *dev,
{ {
struct lio_vf_rep_desc *vf_rep = netdev_priv(dev); struct lio_vf_rep_desc *vf_rep = netdev_priv(dev);
stats64->tx_packets = vf_rep->stats.tx_packets; /* Swap tx and rx stats as VF rep is a switch port */
stats64->tx_bytes = vf_rep->stats.tx_bytes; stats64->tx_packets = vf_rep->stats.rx_packets;
stats64->tx_dropped = vf_rep->stats.tx_dropped; stats64->tx_bytes = vf_rep->stats.rx_bytes;
stats64->tx_dropped = vf_rep->stats.rx_dropped;
stats64->rx_packets = vf_rep->stats.rx_packets;
stats64->rx_bytes = vf_rep->stats.rx_bytes; stats64->rx_packets = vf_rep->stats.tx_packets;
stats64->rx_dropped = vf_rep->stats.rx_dropped; stats64->rx_bytes = vf_rep->stats.tx_bytes;
stats64->rx_dropped = vf_rep->stats.tx_dropped;
} }
static int static int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment