search for: virtnet_stats_str_attr

Displaying 4 results from an estimated 4 matches for "virtnet_stats_str_attr".

2012 Jun 05
1
[net-next RFC PATCH] virtio_net: collect satistics and export through ethtool
...ivers/net/virtio_net.c @@ -41,6 +41,10 @@ module_param(gso, bool, 0444); #define VIRTNET_SEND_COMMAND_SG_MAX 2 #define VIRTNET_DRIVER_VERSION "1.0.0" +#define VIRTNET_STAT_OFF(m) offsetof(struct virtnet_stats, m) +#define VIRTNET_STAT(stat, i) (*((u64 *)((char *)stat + \ + virtnet_stats_str_attr[i].stat_offset))) + struct virtnet_stats { struct u64_stats_sync syncp; u64 tx_bytes; @@ -48,8 +52,33 @@ struct virtnet_stats { u64 rx_bytes; u64 rx_packets; + + u64 tx_kick; + u64 rx_kick; + u64 tx_callbacks; + u64 rx_callbacks; + u64 tx_queued_packets; + u64 tx_queued_bytes; +}; + +sta...
2012 Jun 05
1
[net-next RFC PATCH] virtio_net: collect satistics and export through ethtool
...ivers/net/virtio_net.c @@ -41,6 +41,10 @@ module_param(gso, bool, 0444); #define VIRTNET_SEND_COMMAND_SG_MAX 2 #define VIRTNET_DRIVER_VERSION "1.0.0" +#define VIRTNET_STAT_OFF(m) offsetof(struct virtnet_stats, m) +#define VIRTNET_STAT(stat, i) (*((u64 *)((char *)stat + \ + virtnet_stats_str_attr[i].stat_offset))) + struct virtnet_stats { struct u64_stats_sync syncp; u64 tx_bytes; @@ -48,8 +52,33 @@ struct virtnet_stats { u64 rx_bytes; u64 rx_packets; + + u64 tx_kick; + u64 rx_kick; + u64 tx_callbacks; + u64 rx_callbacks; + u64 tx_queued_packets; + u64 tx_queued_bytes; +}; + +sta...
2012 Jun 06
2
[V2 RFC net-next PATCH 1/2] virtio_net: convert the statistics into array
Currently, we store the statistics in the independent fields of virtnet_stats, this is not scalable when we want to add more counters. As suggested by Michael, this patch convert it to an array and use the enum as the index to access them. Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/net/virtio_net.c | 30 +++++++++++++++++------------- 1 files changed, 17
2012 Jun 06
2
[V2 RFC net-next PATCH 1/2] virtio_net: convert the statistics into array
Currently, we store the statistics in the independent fields of virtnet_stats, this is not scalable when we want to add more counters. As suggested by Michael, this patch convert it to an array and use the enum as the index to access them. Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/net/virtio_net.c | 30 +++++++++++++++++------------- 1 files changed, 17