Lines Matching refs:rq
97 static inline unsigned int vnic_rq_desc_avail(struct vnic_rq *rq) in vnic_rq_desc_avail() argument
100 return rq->ring.desc_avail; in vnic_rq_desc_avail()
103 static inline unsigned int vnic_rq_desc_used(struct vnic_rq *rq) in vnic_rq_desc_used() argument
106 return rq->ring.desc_count - rq->ring.desc_avail - 1; in vnic_rq_desc_used()
109 static inline void *vnic_rq_next_desc(struct vnic_rq *rq) in vnic_rq_next_desc() argument
111 return rq->to_use->desc; in vnic_rq_next_desc()
114 static inline unsigned int vnic_rq_next_index(struct vnic_rq *rq) in vnic_rq_next_index() argument
116 return rq->to_use->index; in vnic_rq_next_index()
119 static inline void vnic_rq_post(struct vnic_rq *rq, in vnic_rq_post() argument
124 struct vnic_rq_buf *buf = rq->to_use; in vnic_rq_post()
133 rq->to_use = buf; in vnic_rq_post()
134 rq->ring.desc_avail--; in vnic_rq_post()
150 iowrite32(buf->index, &rq->ctrl->posted_index); in vnic_rq_post()
154 static inline void vnic_rq_return_descs(struct vnic_rq *rq, unsigned int count) in vnic_rq_return_descs() argument
156 rq->ring.desc_avail += count; in vnic_rq_return_descs()
164 static inline void vnic_rq_service(struct vnic_rq *rq, in vnic_rq_service() argument
166 int desc_return, void (*buf_service)(struct vnic_rq *rq, in vnic_rq_service() argument
173 buf = rq->to_clean; in vnic_rq_service()
178 (*buf_service)(rq, cq_desc, buf, skipped, opaque); in vnic_rq_service()
181 rq->ring.desc_avail++; in vnic_rq_service()
183 rq->to_clean = buf->next; in vnic_rq_service()
188 buf = rq->to_clean; in vnic_rq_service()
192 static inline int vnic_rq_fill(struct vnic_rq *rq, in vnic_rq_fill() argument
193 int (*buf_fill)(struct vnic_rq *rq)) in vnic_rq_fill() argument
197 while (vnic_rq_desc_avail(rq) > 0) { in vnic_rq_fill()
199 err = (*buf_fill)(rq); in vnic_rq_fill()
207 void vnic_rq_free(struct vnic_rq *rq);
208 int vnic_rq_alloc(struct vnic_dev *vdev, struct vnic_rq *rq, unsigned int index,
210 void vnic_rq_init(struct vnic_rq *rq, unsigned int cq_index,
213 unsigned int vnic_rq_error_status(struct vnic_rq *rq);
214 void vnic_rq_enable(struct vnic_rq *rq);
215 int vnic_rq_disable(struct vnic_rq *rq);
216 void vnic_rq_clean(struct vnic_rq *rq,
217 void (*buf_clean)(struct vnic_rq *rq, struct vnic_rq_buf *buf));