Lines Matching refs:prio

100 	u32			prio;		/* these two are used only by leaves... */
272 * Make sure that class is not already on such list for given prio.
275 struct htb_class *cl, int prio)
282 c = rb_entry(parent, struct htb_class, node[prio]);
289 rb_link_node(&cl->node[prio], parent, p);
290 rb_insert_color(&cl->node[prio], root);
348 int prio = ffz(~mask);
349 mask &= ~(1 << prio);
350 htb_add_to_id_tree(&q->hlevel[cl->level].hprio[prio].row, cl, prio);
379 int prio = ffz(~mask);
380 struct htb_prio *hprio = &hlevel->hprio[prio];
382 mask &= ~(1 << prio);
383 if (hprio->ptr == cl->node + prio)
386 htb_safe_rb_erase(cl->node + prio, &hprio->row);
388 m |= 1 << prio;
408 unsigned int prio = ffz(~m);
410 if (WARN_ON_ONCE(prio >= ARRAY_SIZE(p->inner.clprio)))
412 m &= ~(1 << prio);
414 if (p->inner.clprio[prio].feed.rb_node)
418 mask &= ~(1 << prio);
420 htb_add_to_id_tree(&p->inner.clprio[prio].feed, cl, prio);
447 int prio = ffz(~m);
448 m &= ~(1 << prio);
450 if (p->inner.clprio[prio].ptr == cl->node + prio) {
455 p->inner.clprio[prio].last_ptr_id = cl->common.classid;
456 p->inner.clprio[prio].ptr = NULL;
459 htb_safe_rb_erase(cl->node + prio,
460 &p->inner.clprio[prio].feed);
462 if (!p->inner.clprio[prio].feed.rb_node)
463 mask |= 1 << prio;
555 * for the prio. It can be called on already active leaf safely.
563 cl->prio_activity = 1 << cl->prio;
741 /* Returns class->node+prio from id-tree where classe's id is >= id. NULL
744 static struct rb_node *htb_id_find_next_upper(int prio, struct rb_node *n,
750 rb_entry(n, struct htb_class, node[prio]);
769 static struct htb_class *htb_lookup_leaf(struct htb_prio *hprio, const int prio)
789 htb_id_find_next_upper(prio, sp->root, *sp->pid);
810 cl = rb_entry(*sp->pptr, struct htb_class, node[prio]);
813 clp = &cl->inner.clprio[prio];
824 * you are sure that there is active class at prio/level
826 static struct sk_buff *htb_dequeue_tree(struct htb_sched *q, const int prio,
832 struct htb_prio *hprio = &hlevel->hprio[prio];
835 start = cl = htb_lookup_leaf(hprio, prio);
852 if ((q->row_mask[level] & (1 << prio)) == 0)
855 next = htb_lookup_leaf(hprio, prio);
868 htb_next_rb_node(level ? &cl->parent->inner.clprio[prio].ptr:
869 &q->hlevel[0].hprio[prio].ptr);
870 cl = htb_lookup_leaf(hprio, prio);
879 htb_next_rb_node(level ? &cl->parent->inner.clprio[prio].ptr :
880 &q->hlevel[0].hprio[prio].ptr);
900 /* try to dequeue direct packets as high prio (!) to minimize cpu work */
934 int prio = ffz(m);
936 m |= 1 << prio;
937 skb = htb_dequeue_tree(q, prio, level);
1101 opt.prio = cl->prio;
1341 int prio;
1393 for (prio = 0; prio < TC_HTB_NUMPRIO; prio++)
1394 RB_CLEAR_NODE(&cl->node[prio]);
1477 if ((cl->prio = hopt->prio) >= TC_HTB_NUMPRIO)
1478 cl->prio = TC_HTB_NUMPRIO - 1;