Date: Thu, 21 Aug 2014 13:27:05 +0000 (UTC) From: Bryan Venteicher <bryanv@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270270 - stable/10/sys/dev/virtio Message-ID: <201408211327.s7LDR5NQ071698@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bryanv Date: Thu Aug 21 13:27:05 2014 New Revision: 270270 URL: http://svnweb.freebsd.org/changeset/base/270270 Log: MFC r268480: Add accessor to get the number of free descriptors in the virtqueue Modified: stable/10/sys/dev/virtio/virtqueue.c stable/10/sys/dev/virtio/virtqueue.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/virtio/virtqueue.c ============================================================================== --- stable/10/sys/dev/virtio/virtqueue.c Thu Aug 21 13:04:34 2014 (r270269) +++ stable/10/sys/dev/virtio/virtqueue.c Thu Aug 21 13:27:05 2014 (r270270) @@ -375,6 +375,13 @@ virtqueue_size(struct virtqueue *vq) } int +virtqueue_nfree(struct virtqueue *vq) +{ + + return (vq->vq_free_cnt); +} + +int virtqueue_empty(struct virtqueue *vq) { Modified: stable/10/sys/dev/virtio/virtqueue.h ============================================================================== --- stable/10/sys/dev/virtio/virtqueue.h Thu Aug 21 13:04:34 2014 (r270269) +++ stable/10/sys/dev/virtio/virtqueue.h Thu Aug 21 13:27:05 2014 (r270270) @@ -86,6 +86,7 @@ vm_paddr_t virtqueue_paddr(struct virtqu int virtqueue_full(struct virtqueue *vq); int virtqueue_empty(struct virtqueue *vq); int virtqueue_size(struct virtqueue *vq); +int virtqueue_nfree(struct virtqueue *vq); int virtqueue_nused(struct virtqueue *vq); void virtqueue_notify(struct virtqueue *vq); void virtqueue_dump(struct virtqueue *vq);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408211327.s7LDR5NQ071698>