Lines Matching refs:head
157 size_t head = q->tx_head;
160 if (q->tx_hwb && *q->tx_hwb == head) {
164 d = q->tx_ring[head];
169 if (!q->tx_isctx[head]) {
174 q->tx_head = (head + 1) % q->tx_size;
181 size_t head = q->tx_head;
187 d = q->tx_ring[head];
188 *opaque = q->tx_opaque[head];
191 q->tx_head = (head + 1) % q->tx_size;
202 size_t head = q->tx_head;
206 if (tail >= head) {
207 return size - (tail - head) - 1; // TODO: could this be off by 1?
209 return size - (tail + size - head) - 1; // TODO: off by 1?
279 size_t head;
285 head = q->rx_head;
286 d = q->rx_ring[head];
287 ctx = q->rx_context + head;
318 ctx_next = q->rx_context + ((head + 1) % q->rx_size);
322 q->rx_head = (head + 1) % q->rx_size;
330 size_t head;
339 head = q->rx_head;
340 d = q->rx_ring[head];
341 ctx = q->rx_context + head;
358 head = ctx - q->rx_context;
359 d = q->rx_ring[head];
376 q->rx_head = (head + 1) % q->rx_size;
393 size_t head = q->rx_head;
397 if (tail >= head) {
398 return size - (tail - head) - 1; // TODO: could this be off by 1?
400 return size - (tail + size - head) - 1; // TODO: off by 1?