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.
Unified · Split
| @@ -201,13 +201,14 @@ lio_vf_rep_get_stats64(struct net_device *dev, · 200 unmodified lines | ||
| 201 | 201 | { |
| 202 | 202 | struct lio_vf_rep_desc *vf_rep = netdev_priv(dev); |
| 203 | 203 | |
| 204 | − stats64->tx_packets = vf_rep->stats.tx_packets; | |
| 205 | − stats64->tx_bytes = vf_rep->stats.tx_bytes; | |
| 206 | − stats64->tx_dropped = vf_rep->stats.tx_dropped; | |
| 207 | − | |
| 208 | − stats64->rx_packets = vf_rep->stats.rx_packets; | |
| 209 | − stats64->rx_bytes = vf_rep->stats.rx_bytes; | |
| 210 | − stats64->rx_dropped = vf_rep->stats.rx_dropped; | |
| 204 | + /* Swap tx and rx stats as VF rep is a switch port */ | |
| 205 | + stats64->tx_packets = vf_rep->stats.rx_packets; | |
| 206 | + stats64->tx_bytes = vf_rep->stats.rx_bytes; | |
| 207 | + stats64->tx_dropped = vf_rep->stats.rx_dropped; | |
| 208 | + | |
| 209 | + stats64->rx_packets = vf_rep->stats.tx_packets; | |
| 210 | + stats64->rx_bytes = vf_rep->stats.tx_bytes; | |
| 211 | + stats64->rx_dropped = vf_rep->stats.tx_dropped; | |
| 211 | 212 | } |
| 212 | 213 | |
| 213 | 214 | static int |