search for: virtnet_tx_packet

Displaying 2 results from an estimated 2 matches for "virtnet_tx_packet".

Did you mean: virtnet_tx_packets
2012 Jun 06
2
[V2 RFC net-next PATCH 1/2] virtio_net: convert the statistics into array
.../virtio_net.c index 5214b1e..6e4aa6f 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -41,13 +41,17 @@ module_param(gso, bool, 0444); #define VIRTNET_SEND_COMMAND_SG_MAX 2 #define VIRTNET_DRIVER_VERSION "1.0.0" +enum virtnet_stats_type { + VIRTNET_TX_BYTES, + VIRTNET_TX_PACKETS, + VIRTNET_RX_BYTES, + VIRTNET_RX_PACKETS, + VIRTNET_NUM_STATS, +}; + struct virtnet_stats { struct u64_stats_sync syncp; - u64 tx_bytes; - u64 tx_packets; - - u64 rx_bytes; - u64 rx_packets; + u64 data[VIRTNET_NUM_STATS]; }; struct virtnet_info { @@ -301,8 +305,8 @@ static void receive_buf...
2012 Jun 06
2
[V2 RFC net-next PATCH 1/2] virtio_net: convert the statistics into array
.../virtio_net.c index 5214b1e..6e4aa6f 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -41,13 +41,17 @@ module_param(gso, bool, 0444); #define VIRTNET_SEND_COMMAND_SG_MAX 2 #define VIRTNET_DRIVER_VERSION "1.0.0" +enum virtnet_stats_type { + VIRTNET_TX_BYTES, + VIRTNET_TX_PACKETS, + VIRTNET_RX_BYTES, + VIRTNET_RX_PACKETS, + VIRTNET_NUM_STATS, +}; + struct virtnet_stats { struct u64_stats_sync syncp; - u64 tx_bytes; - u64 tx_packets; - - u64 rx_bytes; - u64 rx_packets; + u64 data[VIRTNET_NUM_STATS]; }; struct virtnet_info { @@ -301,8 +305,8 @@ static void receive_buf...