Lines Matching refs:x
203 static inline void sfq_link(struct sfq_sched_data *q, sfq_index x) in sfq_link() argument
206 struct sfq_slot *slot = &q->slots[x]; in sfq_link()
215 q->dep[qlen].next = x; /* sfq_dep_head(q, p)->next = x */ in sfq_link()
216 sfq_dep_head(q, n)->prev = x; in sfq_link()
219 #define sfq_unlink(q, x, n, p) \ argument
221 n = q->slots[x].dep.next; \
222 p = q->slots[x].dep.prev; \
228 static inline void sfq_dec(struct sfq_sched_data *q, sfq_index x) in sfq_dec() argument
233 sfq_unlink(q, x, n, p); in sfq_dec()
235 d = q->slots[x].qlen--; in sfq_dec()
238 sfq_link(q, x); in sfq_dec()
241 static inline void sfq_inc(struct sfq_sched_data *q, sfq_index x) in sfq_inc() argument
246 sfq_unlink(q, x, n, p); in sfq_inc()
248 d = ++q->slots[x].qlen; in sfq_inc()
251 sfq_link(q, x); in sfq_inc()
296 sfq_index x, d = q->cur_depth; in sfq_drop() local
303 x = q->dep[d].next; in sfq_drop()
304 slot = &q->slots[x]; in sfq_drop()
309 sfq_dec(q, x); in sfq_drop()
318 x = q->tail->next; in sfq_drop()
319 slot = &q->slots[x]; in sfq_drop()
350 sfq_index x, qlen; in sfq_enqueue() local
365 x = q->ht[hash]; in sfq_enqueue()
366 slot = &q->slots[x]; in sfq_enqueue()
367 if (x == SFQ_EMPTY_SLOT) { in sfq_enqueue()
368 x = q->dep[0].next; /* get a free slot */ in sfq_enqueue()
369 if (x >= SFQ_MAX_FLOWS) in sfq_enqueue()
371 q->ht[hash] = x; in sfq_enqueue()
372 slot = &q->slots[x]; in sfq_enqueue()
445 sfq_inc(q, x); in sfq_enqueue()
448 slot->next = x; in sfq_enqueue()
451 q->tail->next = x; in sfq_enqueue()
564 sfq_index x = q->ht[hash]; in sfq_rehash() local
566 slot = &q->slots[x]; in sfq_rehash()
567 if (x == SFQ_EMPTY_SLOT) { in sfq_rehash()
568 x = q->dep[0].next; /* get a free slot */ in sfq_rehash()
569 if (x >= SFQ_MAX_FLOWS) { in sfq_rehash()
577 q->ht[hash] = x; in sfq_rehash()
578 slot = &q->slots[x]; in sfq_rehash()
589 sfq_inc(q, x); in sfq_rehash()
592 slot->next = x; in sfq_rehash()
595 q->tail->next = x; in sfq_rehash()