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 /drivers/virtio | |
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 'drivers/virtio')
-rw-r--r-- | drivers/virtio/virtio_ring.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 68b9136847af..4acf88884f9b 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c | |||
@@ -529,4 +529,14 @@ void vring_transport_features(struct virtio_device *vdev) | |||
529 | } | 529 | } |
530 | EXPORT_SYMBOL_GPL(vring_transport_features); | 530 | EXPORT_SYMBOL_GPL(vring_transport_features); |
531 | 531 | ||
532 | /* return the size of the vring within the virtqueue */ | ||
533 | unsigned int virtqueue_get_vring_size(struct virtqueue *_vq) | ||
534 | { | ||
535 | |||
536 | struct vring_virtqueue *vq = to_vvq(_vq); | ||
537 | |||
538 | return vq->vring.num; | ||
539 | } | ||
540 | EXPORT_SYMBOL_GPL(virtqueue_get_vring_size); | ||
541 | |||
532 | MODULE_LICENSE("GPL"); | 542 | MODULE_LICENSE("GPL"); |