Displaying 4 results from an estimated 4 matches for "virtnet_num_stat".
Did you mean:
virtnet_num_stats
2012 Jun 05
1
[net-next RFC PATCH] virtio_net: collect satistics and export through ethtool
...eued_bytes", VIRTNET_STAT_OFF(tx_queued_bytes)},
+ { "rx_bytes" , VIRTNET_STAT_OFF(rx_bytes)},
+ { "rx_packets", VIRTNET_STAT_OFF(rx_packets)},
+ { "rx_kick", VIRTNET_STAT_OFF(rx_kick)},
+ { "rx_callbacks", VIRTNET_STAT_OFF(rx_callbacks)},
};
+#define VIRTNET_NUM_STATS ARRAY_SIZE(virtnet_stats_str_attr)
+
struct virtnet_info {
struct virtio_device *vdev;
struct virtqueue *rvq, *svq, *cvq;
@@ -142,6 +171,11 @@ static struct page *get_a_page(struct virtnet_info *vi, gfp_t gfp_mask)
static void skb_xmit_done(struct virtqueue *svq)
{
struct virtnet_info *vi...
2012 Jun 05
1
[net-next RFC PATCH] virtio_net: collect satistics and export through ethtool
...eued_bytes", VIRTNET_STAT_OFF(tx_queued_bytes)},
+ { "rx_bytes" , VIRTNET_STAT_OFF(rx_bytes)},
+ { "rx_packets", VIRTNET_STAT_OFF(rx_packets)},
+ { "rx_kick", VIRTNET_STAT_OFF(rx_kick)},
+ { "rx_callbacks", VIRTNET_STAT_OFF(rx_callbacks)},
};
+#define VIRTNET_NUM_STATS ARRAY_SIZE(virtnet_stats_str_attr)
+
struct virtnet_info {
struct virtio_device *vdev;
struct virtqueue *rvq, *svq, *cvq;
@@ -142,6 +171,11 @@ static struct page *get_a_page(struct virtnet_info *vi, gfp_t gfp_mask)
static void skb_xmit_done(struct virtqueue *svq)
{
struct virtnet_info *vi...
2012 Jun 06
2
[V2 RFC net-next PATCH 1/2] virtio_net: convert the statistics into array
...rtio_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(struct net_device *dev, void *buf, unsigned int len)
hdr = s...
2012 Jun 06
2
[V2 RFC net-next PATCH 1/2] virtio_net: convert the statistics into array
...rtio_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(struct net_device *dev, void *buf, unsigned int len)
hdr = s...