summaryrefslogtreecommitdiffstats
path: root/drivers/virtio
diff options
context:
space:
mode:
authorRick Jones <rick.jones2@hp.com>2011-10-19 08:10:59 +0000
committerDavid S. Miller <davem@davemloft.net>2011-10-24 02:07:21 -0400
commit8f9f4668b37bcc877156dd525a856055735c8d24 (patch)
treea9d0a7cc6729884564f5d2bfb8edbdcc678b3f1c /drivers/virtio
parentca35a0ef85e8ed6df6d5ab01fb6c3530cca0c469 (diff)
downloadop-kernel-dev-8f9f4668b37bcc877156dd525a856055735c8d24.zip
op-kernel-dev-8f9f4668b37bcc877156dd525a856055735c8d24.tar.gz
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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 68b91368..4acf888 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)
}
EXPORT_SYMBOL_GPL(vring_transport_features);
+/* return the size of the vring within the virtqueue */
+unsigned int virtqueue_get_vring_size(struct virtqueue *_vq)
+{
+
+ struct vring_virtqueue *vq = to_vvq(_vq);
+
+ return vq->vring.num;
+}
+EXPORT_SYMBOL_GPL(virtqueue_get_vring_size);
+
MODULE_LICENSE("GPL");
OpenPOWER on IntegriCloud