History

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.

Srinivas Jampala committed 8 years ago

Commit 16f4faa1 parent 091311d1 file · +8 −7Browse files

Unified · Split

drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c+8−7
@@ -201,13 +201,14 @@ lio_vf_rep_get_stats64(struct net_device *dev, · 200 unmodified lines
201201 {
202202 struct lio_vf_rep_desc *vf_rep = netdev_priv(dev);
203203
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;
211212 }
212213
213214 static int

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t