mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-15 15:06:42 +00:00
Add more virtqueue getter methods
MFC after: 2 weeks
This commit is contained in:
parent
985ed053e3
commit
88126356cf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329602
@ -369,6 +369,33 @@ virtqueue_paddr(struct virtqueue *vq)
|
||||
return (vtophys(vq->vq_ring_mem));
|
||||
}
|
||||
|
||||
vm_paddr_t
|
||||
virtqueue_desc_paddr(struct virtqueue *vq)
|
||||
{
|
||||
|
||||
return (vtophys(vq->vq_ring.desc));
|
||||
}
|
||||
|
||||
vm_paddr_t
|
||||
virtqueue_avail_paddr(struct virtqueue *vq)
|
||||
{
|
||||
|
||||
return (vtophys(vq->vq_ring.avail));
|
||||
}
|
||||
|
||||
vm_paddr_t
|
||||
virtqueue_used_paddr(struct virtqueue *vq)
|
||||
{
|
||||
|
||||
return (vtophys(vq->vq_ring.used));
|
||||
}
|
||||
|
||||
uint16_t
|
||||
virtqueue_index(struct virtqueue *vq)
|
||||
{
|
||||
return (vq->vq_queue_index);
|
||||
}
|
||||
|
||||
int
|
||||
virtqueue_size(struct virtqueue *vq)
|
||||
{
|
||||
|
@ -84,7 +84,11 @@ void virtqueue_disable_intr(struct virtqueue *vq);
|
||||
|
||||
/* Get physical address of the virtqueue ring. */
|
||||
vm_paddr_t virtqueue_paddr(struct virtqueue *vq);
|
||||
vm_paddr_t virtqueue_desc_paddr(struct virtqueue *vq);
|
||||
vm_paddr_t virtqueue_avail_paddr(struct virtqueue *vq);
|
||||
vm_paddr_t virtqueue_used_paddr(struct virtqueue *vq);
|
||||
|
||||
uint16_t virtqueue_index(struct virtqueue *vq);
|
||||
int virtqueue_full(struct virtqueue *vq);
|
||||
int virtqueue_empty(struct virtqueue *vq);
|
||||
int virtqueue_size(struct virtqueue *vq);
|
||||
|
Loading…
Reference in New Issue
Block a user