- ovs_strlcpy(ovsr.devname, netdev_get_name(netdev), sizeof ovsr.devname);
-
- ovsr.stats.rx_packets = stats->rx_packets;
- ovsr.stats.tx_packets = stats->tx_packets;
- ovsr.stats.rx_bytes = stats->rx_bytes;
- ovsr.stats.tx_bytes = stats->tx_bytes;
- ovsr.stats.rx_errors = stats->rx_errors;
- ovsr.stats.tx_errors = stats->tx_errors;
- ovsr.stats.rx_dropped = stats->rx_dropped;
- ovsr.stats.tx_dropped = stats->tx_dropped;
- ovsr.stats.multicast = stats->multicast;
- ovsr.stats.collisions = stats->collisions;
- ovsr.stats.rx_length_errors = stats->rx_length_errors;
- ovsr.stats.rx_over_errors = stats->rx_over_errors;
- ovsr.stats.rx_crc_errors = stats->rx_crc_errors;
- ovsr.stats.rx_frame_errors = stats->rx_frame_errors;
- ovsr.stats.rx_fifo_errors = stats->rx_fifo_errors;
- ovsr.stats.rx_missed_errors = stats->rx_missed_errors;
- ovsr.stats.tx_aborted_errors = stats->tx_aborted_errors;
- ovsr.stats.tx_carrier_errors = stats->tx_carrier_errors;
- ovsr.stats.tx_fifo_errors = stats->tx_fifo_errors;
- ovsr.stats.tx_heartbeat_errors = stats->tx_heartbeat_errors;
- ovsr.stats.tx_window_errors = stats->tx_window_errors;
-
- err = netdev_vport_do_ioctl(ODP_VPORT_STATS_SET, &ovsr);
+ rtnl_stats.rx_packets = stats->rx_packets;
+ rtnl_stats.tx_packets = stats->tx_packets;
+ rtnl_stats.rx_bytes = stats->rx_bytes;
+ rtnl_stats.tx_bytes = stats->tx_bytes;
+ rtnl_stats.rx_errors = stats->rx_errors;
+ rtnl_stats.tx_errors = stats->tx_errors;
+ rtnl_stats.rx_dropped = stats->rx_dropped;
+ rtnl_stats.tx_dropped = stats->tx_dropped;
+ rtnl_stats.multicast = stats->multicast;
+ rtnl_stats.collisions = stats->collisions;
+ rtnl_stats.rx_length_errors = stats->rx_length_errors;
+ rtnl_stats.rx_over_errors = stats->rx_over_errors;
+ rtnl_stats.rx_crc_errors = stats->rx_crc_errors;
+ rtnl_stats.rx_frame_errors = stats->rx_frame_errors;
+ rtnl_stats.rx_fifo_errors = stats->rx_fifo_errors;
+ rtnl_stats.rx_missed_errors = stats->rx_missed_errors;
+ rtnl_stats.tx_aborted_errors = stats->tx_aborted_errors;
+ rtnl_stats.tx_carrier_errors = stats->tx_carrier_errors;
+ rtnl_stats.tx_fifo_errors = stats->tx_fifo_errors;
+ rtnl_stats.tx_heartbeat_errors = stats->tx_heartbeat_errors;
+ rtnl_stats.tx_window_errors = stats->tx_window_errors;
+
+ dpif_linux_vport_init(&vport);
+ vport.cmd = ODP_VPORT_SET;
+ vport.name = netdev_get_name(netdev);
+ vport.stats = &rtnl_stats;
+
+ err = dpif_linux_vport_transact(&vport, NULL, NULL);