diff options
author | Rick Jones <rick.jones2@hp.com> | 2011-10-19 04:10:59 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-24 02:07:21 -0400 |
commit | 8f9f4668b37bcc877156dd525a856055735c8d24 (patch) | |
tree | a9d0a7cc6729884564f5d2bfb8edbdcc678b3f1c /include/linux/virtio.h | |
parent | ca35a0ef85e8ed6df6d5ab01fb6c3530cca0c469 (diff) |
Add ethtool -g support to virtio_net
Add support for reporting ring sizes via ethtool -g to the virtio_net
driver.
Signed-off-by: Rick Jones <rick.jones2@hp.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/virtio.h')
-rw-r--r-- | include/linux/virtio.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 710885749605..851ebf1a4476 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h | |||
@@ -61,6 +61,9 @@ struct virtqueue { | |||
61 | * virtqueue_detach_unused_buf: detach first unused buffer | 61 | * virtqueue_detach_unused_buf: detach first unused buffer |
62 | * vq: the struct virtqueue we're talking about. | 62 | * vq: the struct virtqueue we're talking about. |
63 | * Returns NULL or the "data" token handed to add_buf | 63 | * Returns NULL or the "data" token handed to add_buf |
64 | * virtqueue_get_vring_size: return the size of the virtqueue's vring | ||
65 | * vq: the struct virtqueue containing the vring of interest. | ||
66 | * Returns the size of the vring. | ||
64 | * | 67 | * |
65 | * Locking rules are straightforward: the driver is responsible for | 68 | * Locking rules are straightforward: the driver is responsible for |
66 | * locking. No two operations may be invoked simultaneously, with the exception | 69 | * locking. No two operations may be invoked simultaneously, with the exception |
@@ -97,6 +100,8 @@ bool virtqueue_enable_cb_delayed(struct virtqueue *vq); | |||
97 | 100 | ||
98 | void *virtqueue_detach_unused_buf(struct virtqueue *vq); | 101 | void *virtqueue_detach_unused_buf(struct virtqueue *vq); |
99 | 102 | ||
103 | unsigned int virtqueue_get_vring_size(struct virtqueue *vq); | ||
104 | |||
100 | /** | 105 | /** |
101 | * virtio_device - representation of a device using virtio | 106 | * virtio_device - representation of a device using virtio |
102 | * @index: unique position on the virtio bus | 107 | * @index: unique position on the virtio bus |