Lines Matching refs:wq
86 static inline unsigned int vnic_wq_desc_avail(struct vnic_wq *wq) in vnic_wq_desc_avail() argument
89 return wq->ring.desc_avail; in vnic_wq_desc_avail()
92 static inline unsigned int vnic_wq_desc_used(struct vnic_wq *wq) in vnic_wq_desc_used() argument
95 return wq->ring.desc_count - wq->ring.desc_avail - 1; in vnic_wq_desc_used()
98 static inline void *vnic_wq_next_desc(struct vnic_wq *wq) in vnic_wq_next_desc() argument
100 return wq->to_use->desc; in vnic_wq_next_desc()
103 static inline void vnic_wq_post(struct vnic_wq *wq, in vnic_wq_post() argument
107 struct vnic_wq_buf *buf = wq->to_use; in vnic_wq_post()
122 iowrite32(buf->index, &wq->ctrl->posted_index); in vnic_wq_post()
124 wq->to_use = buf; in vnic_wq_post()
126 wq->ring.desc_avail--; in vnic_wq_post()
129 static inline void vnic_wq_service(struct vnic_wq *wq, in vnic_wq_service() argument
131 void (*buf_service)(struct vnic_wq *wq, in vnic_wq_service() argument
137 buf = wq->to_clean; in vnic_wq_service()
140 (*buf_service)(wq, cq_desc, buf, opaque); in vnic_wq_service()
142 wq->ring.desc_avail++; in vnic_wq_service()
144 wq->to_clean = buf->next; in vnic_wq_service()
149 buf = wq->to_clean; in vnic_wq_service()
153 void vnic_wq_free(struct vnic_wq *wq);
154 int vnic_wq_alloc(struct vnic_dev *vdev, struct vnic_wq *wq, unsigned int index,
156 int vnic_wq_devcmd2_alloc(struct vnic_dev *vdev, struct vnic_wq *wq,
158 void vnic_wq_init_start(struct vnic_wq *wq, unsigned int cq_index,
162 void vnic_wq_init(struct vnic_wq *wq, unsigned int cq_index,
165 unsigned int vnic_wq_error_status(struct vnic_wq *wq);
166 void vnic_wq_enable(struct vnic_wq *wq);
167 int vnic_wq_disable(struct vnic_wq *wq);
168 void vnic_wq_clean(struct vnic_wq *wq,
169 void (*buf_clean)(struct vnic_wq *wq, struct vnic_wq_buf *buf));