Lines Matching refs:cq
78 void vnic_cq_free(struct vnic_cq *cq);
79 void vnic_cq_init(struct vnic_cq *cq, unsigned int flow_control_enable,
84 void vnic_cq_clean(struct vnic_cq *cq);
85 int vnic_cq_mem_size(struct vnic_cq *cq, unsigned int desc_count,
88 static inline unsigned int vnic_cq_service(struct vnic_cq *cq,
99 cq_desc = (struct cq_desc *)((u8 *)cq->ring.descs +
100 cq->ring.desc_size * cq->to_clean);
104 while (color != cq->last_color) {
105 if ((*q_service)(cq->vdev, cq_desc, type,
109 cq->to_clean++;
110 if (cq->to_clean == cq->ring.desc_count) {
111 cq->to_clean = 0;
112 cq->last_color = cq->last_color ? 0 : 1;
115 cq_desc = (struct cq_desc *)((u8 *)cq->ring.descs +
116 cq->ring.desc_size * cq->to_clean);
128 static inline unsigned int vnic_cq_work(struct vnic_cq *cq,
137 to_clean = cq->to_clean;
138 last_color = cq->last_color;
139 cq_desc = (struct cq_desc *)((u8 *)cq->ring.descs +
140 cq->ring.desc_size * to_clean);
146 if (to_clean == cq->ring.desc_count) {
151 cq_desc = (struct cq_desc *)((u8 *)cq->ring.descs +
152 cq->ring.desc_size * to_clean);