Lines Matching refs:wq
86 struct vnic_wq wq; member
90 static inline unsigned int vnic_wq_desc_avail(struct vnic_wq *wq) in vnic_wq_desc_avail() argument
93 return wq->ring.desc_avail; in vnic_wq_desc_avail()
96 static inline unsigned int vnic_wq_desc_used(struct vnic_wq *wq) in vnic_wq_desc_used() argument
99 return wq->ring.desc_count - wq->ring.desc_avail - 1; in vnic_wq_desc_used()
102 static inline void *vnic_wq_next_desc(struct vnic_wq *wq) in vnic_wq_next_desc() argument
104 return wq->to_use->desc; in vnic_wq_next_desc()
107 static inline void vnic_wq_doorbell(struct vnic_wq *wq) in vnic_wq_doorbell() argument
115 iowrite32(wq->to_use->index, &wq->ctrl->posted_index); in vnic_wq_doorbell()
118 static inline void vnic_wq_post(struct vnic_wq *wq, in vnic_wq_post() argument
124 struct vnic_wq_buf *buf = wq->to_use; in vnic_wq_post()
136 wq->to_use = buf; in vnic_wq_post()
138 wq->ring.desc_avail -= desc_skip_cnt; in vnic_wq_post()
141 static inline void vnic_wq_service(struct vnic_wq *wq, in vnic_wq_service() argument
143 void (*buf_service)(struct vnic_wq *wq, in vnic_wq_service() argument
149 buf = wq->to_clean; in vnic_wq_service()
152 (*buf_service)(wq, cq_desc, buf, opaque); in vnic_wq_service()
154 wq->ring.desc_avail++; in vnic_wq_service()
156 wq->to_clean = buf->next; in vnic_wq_service()
161 buf = wq->to_clean; in vnic_wq_service()
165 void vnic_wq_free(struct vnic_wq *wq);
166 int vnic_wq_alloc(struct vnic_dev *vdev, struct vnic_wq *wq, unsigned int index,
168 void vnic_wq_init(struct vnic_wq *wq, unsigned int cq_index,
171 unsigned int vnic_wq_error_status(struct vnic_wq *wq);
172 void vnic_wq_enable(struct vnic_wq *wq);
173 int vnic_wq_disable(struct vnic_wq *wq);
174 void vnic_wq_clean(struct vnic_wq *wq,
175 void (*buf_clean)(struct vnic_wq *wq, struct vnic_wq_buf *buf));
176 int enic_wq_devcmd2_alloc(struct vnic_dev *vdev, struct vnic_wq *wq,
178 void enic_wq_init_start(struct vnic_wq *wq, unsigned int cq_index,