• Home
  • Raw
  • Download

Lines Matching refs:cl

313 			   struct qfq_class *cl)  in qfq_add_to_agg()  argument
315 cl->agg = agg; in qfq_add_to_agg()
318 if (cl->qdisc->q.qlen > 0) { /* adding an active class */ in qfq_add_to_agg()
319 list_add_tail(&cl->alist, &agg->active); in qfq_add_to_agg()
321 cl && q->in_serv_agg != agg) /* agg was inactive */ in qfq_add_to_agg()
341 static void qfq_deactivate_class(struct qfq_sched *q, struct qfq_class *cl) in qfq_deactivate_class() argument
343 struct qfq_aggregate *agg = cl->agg; in qfq_deactivate_class()
346 list_del(&cl->alist); /* remove from RR queue of the aggregate */ in qfq_deactivate_class()
352 static void qfq_rm_from_agg(struct qfq_sched *q, struct qfq_class *cl) in qfq_rm_from_agg() argument
354 struct qfq_aggregate *agg = cl->agg; in qfq_rm_from_agg()
356 cl->agg = NULL; in qfq_rm_from_agg()
365 static void qfq_deact_rm_from_agg(struct qfq_sched *q, struct qfq_class *cl) in qfq_deact_rm_from_agg() argument
367 if (cl->qdisc->q.qlen > 0) /* class is active */ in qfq_deact_rm_from_agg()
368 qfq_deactivate_class(q, cl); in qfq_deact_rm_from_agg()
370 qfq_rm_from_agg(q, cl); in qfq_deact_rm_from_agg()
374 static int qfq_change_agg(struct Qdisc *sch, struct qfq_class *cl, u32 weight, in qfq_change_agg() argument
386 qfq_deact_rm_from_agg(q, cl); in qfq_change_agg()
387 qfq_add_to_agg(q, new_agg, cl); in qfq_change_agg()
397 struct qfq_class *cl = (struct qfq_class *)*arg; in qfq_change_class() local
437 if (cl != NULL && in qfq_change_class()
438 lmax == cl->agg->lmax && in qfq_change_class()
439 weight == cl->agg->class_weight) in qfq_change_class()
442 delta_w = weight - (cl ? cl->agg->class_weight : 0); in qfq_change_class()
450 if (cl != NULL) { /* modify existing class */ in qfq_change_class()
452 err = gen_replace_estimator(&cl->bstats, NULL, in qfq_change_class()
453 &cl->rate_est, in qfq_change_class()
465 cl = kzalloc(sizeof(struct qfq_class), GFP_KERNEL); in qfq_change_class()
466 if (cl == NULL) in qfq_change_class()
469 cl->common.classid = classid; in qfq_change_class()
470 cl->deficit = lmax; in qfq_change_class()
472 cl->qdisc = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, in qfq_change_class()
474 if (cl->qdisc == NULL) in qfq_change_class()
475 cl->qdisc = &noop_qdisc; in qfq_change_class()
478 err = gen_new_estimator(&cl->bstats, NULL, in qfq_change_class()
479 &cl->rate_est, in qfq_change_class()
487 if (cl->qdisc != &noop_qdisc) in qfq_change_class()
488 qdisc_hash_add(cl->qdisc, true); in qfq_change_class()
498 gen_kill_estimator(&cl->rate_est); in qfq_change_class()
505 qfq_deact_rm_from_agg(q, cl); in qfq_change_class()
507 qdisc_class_hash_insert(&q->clhash, &cl->common); in qfq_change_class()
508 qfq_add_to_agg(q, new_agg, cl); in qfq_change_class()
512 *arg = (unsigned long)cl; in qfq_change_class()
516 qdisc_put(cl->qdisc); in qfq_change_class()
517 kfree(cl); in qfq_change_class()
521 static void qfq_destroy_class(struct Qdisc *sch, struct qfq_class *cl) in qfq_destroy_class() argument
525 qfq_rm_from_agg(q, cl); in qfq_destroy_class()
526 gen_kill_estimator(&cl->rate_est); in qfq_destroy_class()
527 qdisc_put(cl->qdisc); in qfq_destroy_class()
528 kfree(cl); in qfq_destroy_class()
534 struct qfq_class *cl = (struct qfq_class *)arg; in qfq_delete_class() local
536 if (cl->filter_cnt > 0) in qfq_delete_class()
541 qdisc_purge_queue(cl->qdisc); in qfq_delete_class()
542 qdisc_class_hash_remove(&q->clhash, &cl->common); in qfq_delete_class()
546 qfq_destroy_class(sch, cl); in qfq_delete_class()
555 static struct tcf_block *qfq_tcf_block(struct Qdisc *sch, unsigned long cl, in qfq_tcf_block() argument
560 if (cl) in qfq_tcf_block()
569 struct qfq_class *cl = qfq_find_class(sch, classid); in qfq_bind_tcf() local
571 if (cl != NULL) in qfq_bind_tcf()
572 cl->filter_cnt++; in qfq_bind_tcf()
574 return (unsigned long)cl; in qfq_bind_tcf()
579 struct qfq_class *cl = (struct qfq_class *)arg; in qfq_unbind_tcf() local
581 cl->filter_cnt--; in qfq_unbind_tcf()
588 struct qfq_class *cl = (struct qfq_class *)arg; in qfq_graft_class() local
592 cl->common.classid, NULL); in qfq_graft_class()
597 *old = qdisc_replace(sch, new, &cl->qdisc); in qfq_graft_class()
603 struct qfq_class *cl = (struct qfq_class *)arg; in qfq_class_leaf() local
605 return cl->qdisc; in qfq_class_leaf()
611 struct qfq_class *cl = (struct qfq_class *)arg; in qfq_dump_class() local
615 tcm->tcm_handle = cl->common.classid; in qfq_dump_class()
616 tcm->tcm_info = cl->qdisc->handle; in qfq_dump_class()
621 if (nla_put_u32(skb, TCA_QFQ_WEIGHT, cl->agg->class_weight) || in qfq_dump_class()
622 nla_put_u32(skb, TCA_QFQ_LMAX, cl->agg->lmax)) in qfq_dump_class()
634 struct qfq_class *cl = (struct qfq_class *)arg; in qfq_dump_class_stats() local
639 xstats.weight = cl->agg->class_weight; in qfq_dump_class_stats()
640 xstats.lmax = cl->agg->lmax; in qfq_dump_class_stats()
643 d, NULL, &cl->bstats) < 0 || in qfq_dump_class_stats()
644 gnet_stats_copy_rate_est(d, &cl->rate_est) < 0 || in qfq_dump_class_stats()
645 qdisc_qstats_copy(d, cl->qdisc) < 0) in qfq_dump_class_stats()
654 struct qfq_class *cl; in qfq_walk() local
661 hlist_for_each_entry(cl, &q->clhash.hash[i], common.hnode) { in qfq_walk()
666 if (arg->fn(sch, (unsigned long)cl, arg) < 0) { in qfq_walk()
679 struct qfq_class *cl; in qfq_classify() local
686 cl = qfq_find_class(sch, skb->priority); in qfq_classify()
687 if (cl != NULL) in qfq_classify()
688 return cl; in qfq_classify()
706 cl = (struct qfq_class *)res.class; in qfq_classify()
707 if (cl == NULL) in qfq_classify()
708 cl = qfq_find_class(sch, res.classid); in qfq_classify()
709 return cl; in qfq_classify()
974 struct qfq_class *cl, unsigned int len) in agg_dequeue() argument
976 qdisc_dequeue_peeked(cl->qdisc); in agg_dequeue()
978 cl->deficit -= (int) len; in agg_dequeue()
980 if (cl->qdisc->q.qlen == 0) /* no more packets, remove from list */ in agg_dequeue()
981 list_del(&cl->alist); in agg_dequeue()
982 else if (cl->deficit < qdisc_pkt_len(cl->qdisc->ops->peek(cl->qdisc))) { in agg_dequeue()
983 cl->deficit += agg->lmax; in agg_dequeue()
984 list_move_tail(&cl->alist, &agg->active); in agg_dequeue()
989 struct qfq_class **cl, in qfq_peek_skb() argument
994 *cl = list_first_entry(&agg->active, struct qfq_class, alist); in qfq_peek_skb()
995 skb = (*cl)->qdisc->ops->peek((*cl)->qdisc); in qfq_peek_skb()
1080 struct qfq_class *cl; in qfq_dequeue() local
1089 skb = qfq_peek_skb(in_serv_agg, &cl, &len); in qfq_dequeue()
1126 skb = qfq_peek_skb(in_serv_agg, &cl, &len); in qfq_dequeue()
1135 agg_dequeue(in_serv_agg, cl, len); in qfq_dequeue()
1201 struct qfq_class *cl; in qfq_enqueue() local
1206 cl = qfq_classify(skb, sch, &err); in qfq_enqueue()
1207 if (cl == NULL) { in qfq_enqueue()
1213 pr_debug("qfq_enqueue: cl = %x\n", cl->common.classid); in qfq_enqueue()
1215 if (unlikely(cl->agg->lmax < len)) { in qfq_enqueue()
1217 cl->agg->lmax, len, cl->common.classid); in qfq_enqueue()
1218 err = qfq_change_agg(sch, cl, cl->agg->class_weight, len); in qfq_enqueue()
1220 cl->qstats.drops++; in qfq_enqueue()
1226 first = !cl->qdisc->q.qlen; in qfq_enqueue()
1227 err = qdisc_enqueue(skb, cl->qdisc, to_free); in qfq_enqueue()
1231 cl->qstats.drops++; in qfq_enqueue()
1237 cl->bstats.bytes += len; in qfq_enqueue()
1238 cl->bstats.packets += gso_segs; in qfq_enqueue()
1242 agg = cl->agg; in qfq_enqueue()
1245 if (unlikely(skb == cl->qdisc->ops->peek(cl->qdisc)) && in qfq_enqueue()
1247 == cl && cl->deficit < len) in qfq_enqueue()
1248 list_move_tail(&cl->alist, &agg->active); in qfq_enqueue()
1254 cl->deficit = agg->lmax; in qfq_enqueue()
1255 list_add_tail(&cl->alist, &agg->active); in qfq_enqueue()
1257 if (list_first_entry(&agg->active, struct qfq_class, alist) != cl || in qfq_enqueue()
1404 struct qfq_class *cl = (struct qfq_class *)arg; in qfq_qlen_notify() local
1406 qfq_deactivate_class(q, cl); in qfq_qlen_notify()
1451 struct qfq_class *cl; in qfq_reset_qdisc() local
1455 hlist_for_each_entry(cl, &q->clhash.hash[i], common.hnode) { in qfq_reset_qdisc()
1456 if (cl->qdisc->q.qlen > 0) in qfq_reset_qdisc()
1457 qfq_deactivate_class(q, cl); in qfq_reset_qdisc()
1459 qdisc_reset(cl->qdisc); in qfq_reset_qdisc()
1469 struct qfq_class *cl; in qfq_destroy_qdisc() local
1476 hlist_for_each_entry_safe(cl, next, &q->clhash.hash[i], in qfq_destroy_qdisc()
1478 qfq_destroy_class(sch, cl); in qfq_destroy_qdisc()