Lines Matching refs:num
78 unsigned int num; member
125 #define vring_used_event(vr) ((vr)->avail->ring[(vr)->num])
126 #define vring_avail_event(vr) (*(__virtio16 *)&(vr)->used->ring[(vr)->num])
128 static inline void vring_init(struct vring *vr, unsigned int num, void *p, in vring_init() argument
131 vr->num = num; in vring_init()
133 vr->avail = p + num * sizeof(struct vring_desc); in vring_init()
134 vr->used = (void *)(((uintptr_t)&vr->avail->ring[num] + in vring_init()
138 static inline unsigned int vring_size(unsigned int num, unsigned long align) in vring_size() argument
140 return ((sizeof(struct vring_desc) * num + in vring_size()
141 sizeof(__virtio16) * (3 + num) + align - 1) & ~(align - 1)) + in vring_size()
142 sizeof(__virtio16) * 3 + sizeof(struct vring_used_elem) * num; in vring_size()
229 struct virtqueue *vring_create_virtqueue(unsigned int index, unsigned int num,