• Home
  • Raw
  • Download

Lines Matching refs:cl

319 			   struct qfq_class *cl)  in qfq_add_to_agg()  argument
321 cl->agg = agg; in qfq_add_to_agg()
324 if (cl->qdisc->q.qlen > 0) { /* adding an active class */ in qfq_add_to_agg()
325 list_add_tail(&cl->alist, &agg->active); in qfq_add_to_agg()
327 cl && q->in_serv_agg != agg) /* agg was inactive */ in qfq_add_to_agg()
347 static void qfq_deactivate_class(struct qfq_sched *q, struct qfq_class *cl) in qfq_deactivate_class() argument
349 struct qfq_aggregate *agg = cl->agg; in qfq_deactivate_class()
352 list_del(&cl->alist); /* remove from RR queue of the aggregate */ in qfq_deactivate_class()
358 static void qfq_rm_from_agg(struct qfq_sched *q, struct qfq_class *cl) in qfq_rm_from_agg() argument
360 struct qfq_aggregate *agg = cl->agg; in qfq_rm_from_agg()
362 cl->agg = NULL; in qfq_rm_from_agg()
371 static void qfq_deact_rm_from_agg(struct qfq_sched *q, struct qfq_class *cl) in qfq_deact_rm_from_agg() argument
373 if (cl->qdisc->q.qlen > 0) /* class is active */ in qfq_deact_rm_from_agg()
374 qfq_deactivate_class(q, cl); in qfq_deact_rm_from_agg()
376 qfq_rm_from_agg(q, cl); in qfq_deact_rm_from_agg()
380 static int qfq_change_agg(struct Qdisc *sch, struct qfq_class *cl, u32 weight, in qfq_change_agg() argument
397 qfq_deact_rm_from_agg(q, cl); in qfq_change_agg()
398 qfq_add_to_agg(q, new_agg, cl); in qfq_change_agg()
408 struct qfq_class *cl = (struct qfq_class *)*arg; in qfq_change_class() local
446 if (cl != NULL && in qfq_change_class()
447 lmax == cl->agg->lmax && in qfq_change_class()
448 weight == cl->agg->class_weight) in qfq_change_class()
451 delta_w = weight - (cl ? cl->agg->class_weight : 0); in qfq_change_class()
459 if (cl != NULL) { /* modify existing class */ in qfq_change_class()
461 err = gen_replace_estimator(&cl->bstats, NULL, in qfq_change_class()
462 &cl->rate_est, in qfq_change_class()
474 cl = kzalloc(sizeof(struct qfq_class), GFP_KERNEL); in qfq_change_class()
475 if (cl == NULL) in qfq_change_class()
478 cl->common.classid = classid; in qfq_change_class()
479 cl->deficit = lmax; in qfq_change_class()
481 cl->qdisc = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, in qfq_change_class()
483 if (cl->qdisc == NULL) in qfq_change_class()
484 cl->qdisc = &noop_qdisc; in qfq_change_class()
487 err = gen_new_estimator(&cl->bstats, NULL, in qfq_change_class()
488 &cl->rate_est, in qfq_change_class()
496 if (cl->qdisc != &noop_qdisc) in qfq_change_class()
497 qdisc_hash_add(cl->qdisc, true); in qfq_change_class()
507 gen_kill_estimator(&cl->rate_est); in qfq_change_class()
514 qfq_deact_rm_from_agg(q, cl); in qfq_change_class()
516 qdisc_class_hash_insert(&q->clhash, &cl->common); in qfq_change_class()
517 qfq_add_to_agg(q, new_agg, cl); in qfq_change_class()
521 *arg = (unsigned long)cl; in qfq_change_class()
525 qdisc_put(cl->qdisc); in qfq_change_class()
526 kfree(cl); in qfq_change_class()
530 static void qfq_destroy_class(struct Qdisc *sch, struct qfq_class *cl) in qfq_destroy_class() argument
534 qfq_rm_from_agg(q, cl); in qfq_destroy_class()
535 gen_kill_estimator(&cl->rate_est); in qfq_destroy_class()
536 qdisc_put(cl->qdisc); in qfq_destroy_class()
537 kfree(cl); in qfq_destroy_class()
543 struct qfq_class *cl = (struct qfq_class *)arg; in qfq_delete_class() local
545 if (cl->filter_cnt > 0) in qfq_delete_class()
550 qdisc_purge_queue(cl->qdisc); in qfq_delete_class()
551 qdisc_class_hash_remove(&q->clhash, &cl->common); in qfq_delete_class()
555 qfq_destroy_class(sch, cl); in qfq_delete_class()
564 static struct tcf_block *qfq_tcf_block(struct Qdisc *sch, unsigned long cl, in qfq_tcf_block() argument
569 if (cl) in qfq_tcf_block()
578 struct qfq_class *cl = qfq_find_class(sch, classid); in qfq_bind_tcf() local
580 if (cl != NULL) in qfq_bind_tcf()
581 cl->filter_cnt++; in qfq_bind_tcf()
583 return (unsigned long)cl; in qfq_bind_tcf()
588 struct qfq_class *cl = (struct qfq_class *)arg; in qfq_unbind_tcf() local
590 cl->filter_cnt--; in qfq_unbind_tcf()
597 struct qfq_class *cl = (struct qfq_class *)arg; in qfq_graft_class() local
601 cl->common.classid, NULL); in qfq_graft_class()
606 *old = qdisc_replace(sch, new, &cl->qdisc); in qfq_graft_class()
612 struct qfq_class *cl = (struct qfq_class *)arg; in qfq_class_leaf() local
614 return cl->qdisc; in qfq_class_leaf()
620 struct qfq_class *cl = (struct qfq_class *)arg; in qfq_dump_class() local
624 tcm->tcm_handle = cl->common.classid; in qfq_dump_class()
625 tcm->tcm_info = cl->qdisc->handle; in qfq_dump_class()
630 if (nla_put_u32(skb, TCA_QFQ_WEIGHT, cl->agg->class_weight) || in qfq_dump_class()
631 nla_put_u32(skb, TCA_QFQ_LMAX, cl->agg->lmax)) in qfq_dump_class()
643 struct qfq_class *cl = (struct qfq_class *)arg; in qfq_dump_class_stats() local
648 xstats.weight = cl->agg->class_weight; in qfq_dump_class_stats()
649 xstats.lmax = cl->agg->lmax; in qfq_dump_class_stats()
652 d, NULL, &cl->bstats) < 0 || in qfq_dump_class_stats()
653 gnet_stats_copy_rate_est(d, &cl->rate_est) < 0 || in qfq_dump_class_stats()
654 qdisc_qstats_copy(d, cl->qdisc) < 0) in qfq_dump_class_stats()
663 struct qfq_class *cl; in qfq_walk() local
670 hlist_for_each_entry(cl, &q->clhash.hash[i], common.hnode) { in qfq_walk()
675 if (arg->fn(sch, (unsigned long)cl, arg) < 0) { in qfq_walk()
688 struct qfq_class *cl; in qfq_classify() local
695 cl = qfq_find_class(sch, skb->priority); in qfq_classify()
696 if (cl != NULL) in qfq_classify()
697 return cl; in qfq_classify()
715 cl = (struct qfq_class *)res.class; in qfq_classify()
716 if (cl == NULL) in qfq_classify()
717 cl = qfq_find_class(sch, res.classid); in qfq_classify()
718 return cl; in qfq_classify()
983 struct qfq_class *cl, unsigned int len) in agg_dequeue() argument
985 struct sk_buff *skb = qdisc_dequeue_peeked(cl->qdisc); in agg_dequeue()
990 cl->deficit -= (int) len; in agg_dequeue()
992 if (cl->qdisc->q.qlen == 0) /* no more packets, remove from list */ in agg_dequeue()
993 list_del(&cl->alist); in agg_dequeue()
994 else if (cl->deficit < qdisc_pkt_len(cl->qdisc->ops->peek(cl->qdisc))) { in agg_dequeue()
995 cl->deficit += agg->lmax; in agg_dequeue()
996 list_move_tail(&cl->alist, &agg->active); in agg_dequeue()
1003 struct qfq_class **cl, in qfq_peek_skb() argument
1008 *cl = list_first_entry(&agg->active, struct qfq_class, alist); in qfq_peek_skb()
1009 skb = (*cl)->qdisc->ops->peek((*cl)->qdisc); in qfq_peek_skb()
1094 struct qfq_class *cl; in qfq_dequeue() local
1103 skb = qfq_peek_skb(in_serv_agg, &cl, &len); in qfq_dequeue()
1140 skb = qfq_peek_skb(in_serv_agg, &cl, &len); in qfq_dequeue()
1147 skb = agg_dequeue(in_serv_agg, cl, len); in qfq_dequeue()
1222 struct qfq_class *cl; in qfq_enqueue() local
1227 cl = qfq_classify(skb, sch, &err); in qfq_enqueue()
1228 if (cl == NULL) { in qfq_enqueue()
1234 pr_debug("qfq_enqueue: cl = %x\n", cl->common.classid); in qfq_enqueue()
1236 if (unlikely(cl->agg->lmax < len)) { in qfq_enqueue()
1238 cl->agg->lmax, len, cl->common.classid); in qfq_enqueue()
1239 err = qfq_change_agg(sch, cl, cl->agg->class_weight, len); in qfq_enqueue()
1241 cl->qstats.drops++; in qfq_enqueue()
1247 first = !cl->qdisc->q.qlen; in qfq_enqueue()
1248 err = qdisc_enqueue(skb, cl->qdisc, to_free); in qfq_enqueue()
1252 cl->qstats.drops++; in qfq_enqueue()
1258 cl->bstats.bytes += len; in qfq_enqueue()
1259 cl->bstats.packets += gso_segs; in qfq_enqueue()
1263 agg = cl->agg; in qfq_enqueue()
1266 if (unlikely(skb == cl->qdisc->ops->peek(cl->qdisc)) && in qfq_enqueue()
1268 == cl && cl->deficit < len) in qfq_enqueue()
1269 list_move_tail(&cl->alist, &agg->active); in qfq_enqueue()
1275 cl->deficit = agg->lmax; in qfq_enqueue()
1276 list_add_tail(&cl->alist, &agg->active); in qfq_enqueue()
1278 if (list_first_entry(&agg->active, struct qfq_class, alist) != cl || in qfq_enqueue()
1425 struct qfq_class *cl = (struct qfq_class *)arg; in qfq_qlen_notify() local
1427 qfq_deactivate_class(q, cl); in qfq_qlen_notify()
1472 struct qfq_class *cl; in qfq_reset_qdisc() local
1476 hlist_for_each_entry(cl, &q->clhash.hash[i], common.hnode) { in qfq_reset_qdisc()
1477 if (cl->qdisc->q.qlen > 0) in qfq_reset_qdisc()
1478 qfq_deactivate_class(q, cl); in qfq_reset_qdisc()
1480 qdisc_reset(cl->qdisc); in qfq_reset_qdisc()
1488 struct qfq_class *cl; in qfq_destroy_qdisc() local
1495 hlist_for_each_entry_safe(cl, next, &q->clhash.hash[i], in qfq_destroy_qdisc()
1497 qfq_destroy_class(sch, cl); in qfq_destroy_qdisc()