sch_qfq.c (50dc9a8572aa4d7cdc56670228fcde40289ed289) | sch_qfq.c (29cbcd85828372333aa87542c51f2b2b0fd4380c) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * net/sched/sch_qfq.c Quick Fair Queueing Plus Scheduler. 4 * 5 * Copyright (c) 2009 Fabio Checconi, Luigi Rizzo, and Paolo Valente. 6 * Copyright (c) 2012 Paolo Valente. 7 */ 8 --- 437 unchanged lines hidden (view full) --- 446 return -EINVAL; 447 } 448 449 if (cl != NULL) { /* modify existing class */ 450 if (tca[TCA_RATE]) { 451 err = gen_replace_estimator(&cl->bstats, NULL, 452 &cl->rate_est, 453 NULL, | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * net/sched/sch_qfq.c Quick Fair Queueing Plus Scheduler. 4 * 5 * Copyright (c) 2009 Fabio Checconi, Luigi Rizzo, and Paolo Valente. 6 * Copyright (c) 2012 Paolo Valente. 7 */ 8 --- 437 unchanged lines hidden (view full) --- 446 return -EINVAL; 447 } 448 449 if (cl != NULL) { /* modify existing class */ 450 if (tca[TCA_RATE]) { 451 err = gen_replace_estimator(&cl->bstats, NULL, 452 &cl->rate_est, 453 NULL, |
454 qdisc_root_sleeping_running(sch), | 454 true, |
455 tca[TCA_RATE]); 456 if (err) 457 return err; 458 } 459 existing = true; 460 goto set_change_agg; 461 } 462 --- 10 unchanged lines hidden (view full) --- 473 classid, NULL); 474 if (cl->qdisc == NULL) 475 cl->qdisc = &noop_qdisc; 476 477 if (tca[TCA_RATE]) { 478 err = gen_new_estimator(&cl->bstats, NULL, 479 &cl->rate_est, 480 NULL, | 455 tca[TCA_RATE]); 456 if (err) 457 return err; 458 } 459 existing = true; 460 goto set_change_agg; 461 } 462 --- 10 unchanged lines hidden (view full) --- 473 classid, NULL); 474 if (cl->qdisc == NULL) 475 cl->qdisc = &noop_qdisc; 476 477 if (tca[TCA_RATE]) { 478 err = gen_new_estimator(&cl->bstats, NULL, 479 &cl->rate_est, 480 NULL, |
481 qdisc_root_sleeping_running(sch), | 481 true, |
482 tca[TCA_RATE]); 483 if (err) 484 goto destroy_class; 485 } 486 487 if (cl->qdisc != &noop_qdisc) 488 qdisc_hash_add(cl->qdisc, true); 489 --- 145 unchanged lines hidden (view full) --- 635 struct qfq_class *cl = (struct qfq_class *)arg; 636 struct tc_qfq_stats xstats; 637 638 memset(&xstats, 0, sizeof(xstats)); 639 640 xstats.weight = cl->agg->class_weight; 641 xstats.lmax = cl->agg->lmax; 642 | 482 tca[TCA_RATE]); 483 if (err) 484 goto destroy_class; 485 } 486 487 if (cl->qdisc != &noop_qdisc) 488 qdisc_hash_add(cl->qdisc, true); 489 --- 145 unchanged lines hidden (view full) --- 635 struct qfq_class *cl = (struct qfq_class *)arg; 636 struct tc_qfq_stats xstats; 637 638 memset(&xstats, 0, sizeof(xstats)); 639 640 xstats.weight = cl->agg->class_weight; 641 xstats.lmax = cl->agg->lmax; 642 |
643 if (gnet_stats_copy_basic(qdisc_root_sleeping_running(sch), 644 d, NULL, &cl->bstats) < 0 || | 643 if (gnet_stats_copy_basic(d, NULL, &cl->bstats, true) < 0 || |
645 gnet_stats_copy_rate_est(d, &cl->rate_est) < 0 || 646 qdisc_qstats_copy(d, cl->qdisc) < 0) 647 return -1; 648 649 return gnet_stats_copy_app(d, &xstats, sizeof(xstats)); 650} 651 652static void qfq_walk(struct Qdisc *sch, struct qdisc_walker *arg) --- 874 unchanged lines hidden --- | 644 gnet_stats_copy_rate_est(d, &cl->rate_est) < 0 || 645 qdisc_qstats_copy(d, cl->qdisc) < 0) 646 return -1; 647 648 return gnet_stats_copy_app(d, &xstats, sizeof(xstats)); 649} 650 651static void qfq_walk(struct Qdisc *sch, struct qdisc_walker *arg) --- 874 unchanged lines hidden --- |