- if (vport->ops->get_stats) {
- struct rtnl_link_stats64 dev_stats;
- int err;
-
- err = vport_call_get_stats(vport, &dev_stats);
- if (err)
- return err;
-
- stats->rx_errors += dev_stats.rx_errors;
- stats->tx_errors += dev_stats.tx_errors;
- stats->rx_dropped += dev_stats.rx_dropped;
- stats->tx_dropped += dev_stats.tx_dropped;
- stats->multicast += dev_stats.multicast;
- stats->collisions += dev_stats.collisions;
- stats->rx_length_errors += dev_stats.rx_length_errors;
- stats->rx_over_errors += dev_stats.rx_over_errors;
- stats->rx_crc_errors += dev_stats.rx_crc_errors;
- stats->rx_frame_errors += dev_stats.rx_frame_errors;
- stats->rx_fifo_errors += dev_stats.rx_fifo_errors;
- stats->rx_missed_errors += dev_stats.rx_missed_errors;
- stats->tx_aborted_errors += dev_stats.tx_aborted_errors;
- stats->tx_carrier_errors += dev_stats.tx_carrier_errors;
- stats->tx_fifo_errors += dev_stats.tx_fifo_errors;
- stats->tx_heartbeat_errors += dev_stats.tx_heartbeat_errors;
- stats->tx_window_errors += dev_stats.tx_window_errors;
- stats->rx_compressed += dev_stats.rx_compressed;
- stats->tx_compressed += dev_stats.tx_compressed;
- }
-