1 diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
2 index 8d2530d..c55a9a8 100644
3 --- a/include/linux/pkt_sched.h
4 +++ b/include/linux/pkt_sched.h
5 @@ -850,4 +850,60 @@ struct tc_pie_xstats {
6 __u32 maxq; /* maximum queue size */
7 __u32 ecn_mark; /* packets marked with ecn*/
14 + TCA_CAKE_DIFFSERV_MODE,
28 +#define TCA_CAKE_MAX (__TCA_CAKE_MAX - 1)
30 +struct tc_cake_traffic_stats {
36 +#define TC_CAKE_MAX_TINS (8)
37 +struct tc_cake_xstats {
38 + __u16 version; /* == 4, increments when struct extended */
39 + __u8 max_tins; /* == TC_CAKE_MAX_TINS */
40 + __u8 tin_cnt; /* <= TC_CAKE_MAX_TINS */
42 + __u32 threshold_rate [TC_CAKE_MAX_TINS];
43 + __u32 target_us [TC_CAKE_MAX_TINS];
44 + struct tc_cake_traffic_stats sent [TC_CAKE_MAX_TINS];
45 + struct tc_cake_traffic_stats dropped [TC_CAKE_MAX_TINS];
46 + struct tc_cake_traffic_stats ecn_marked[TC_CAKE_MAX_TINS];
47 + struct tc_cake_traffic_stats backlog [TC_CAKE_MAX_TINS];
48 + __u32 interval_us [TC_CAKE_MAX_TINS];
49 + __u32 way_indirect_hits[TC_CAKE_MAX_TINS];
50 + __u32 way_misses [TC_CAKE_MAX_TINS];
51 + __u32 way_collisions [TC_CAKE_MAX_TINS];
52 + __u32 peak_delay_us [TC_CAKE_MAX_TINS]; /* ~= delay to bulk flows */
53 + __u32 avge_delay_us [TC_CAKE_MAX_TINS];
54 + __u32 base_delay_us [TC_CAKE_MAX_TINS]; /* ~= delay to sparse flows */
55 + __u16 sparse_flows [TC_CAKE_MAX_TINS];
56 + __u16 bulk_flows [TC_CAKE_MAX_TINS];
57 + __u16 unresponse_flows [TC_CAKE_MAX_TINS]; /* v4 - was u32 last_len */
58 + __u16 spare [TC_CAKE_MAX_TINS]; /* v4 - split last_len */
59 + __u32 max_skblen [TC_CAKE_MAX_TINS];
60 + __u32 capacity_estimate; /* version 2 */
61 + __u32 memory_limit; /* version 3 */
62 + __u32 memory_used; /* version 3 */
66 diff --git a/tc/Makefile b/tc/Makefile
67 index 56acbaa..d421b8e 100644
70 @@ -63,6 +63,7 @@ TCMODULES += q_codel.o
71 TCMODULES += q_fq_codel.o
74 +TCMODULES += q_cake.o
78 diff --git a/tc/q_cake.c b/tc/q_cake.c
80 index 0000000..acbe56c
85 + * Common Applications Kept Enhanced -- CAKE
87 + * Copyright (C) 2014-2015 Jonathan Morton <chromatix99@gmail.com>
89 + * Redistribution and use in source and binary forms, with or without
90 + * modification, are permitted provided that the following conditions
92 + * 1. Redistributions of source code must retain the above copyright
93 + * notice, this list of conditions, and the following disclaimer,
94 + * without modification.
95 + * 2. Redistributions in binary form must reproduce the above copyright
96 + * notice, this list of conditions and the following disclaimer in the
97 + * documentation and/or other materials provided with the distribution.
98 + * 3. The names of the authors may not be used to endorse or promote products
99 + * derived from this software without specific prior written permission.
101 + * Alternatively, provided that this notice is retained in full, this
102 + * software may be distributed under the terms of the GNU General
103 + * Public License ("GPL") version 2, in which case the provisions of the
104 + * GPL apply INSTEAD OF those given above.
106 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
107 + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
108 + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
109 + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
110 + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
111 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
112 + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
113 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
114 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
115 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
116 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
127 +#include <sys/socket.h>
128 +#include <netinet/in.h>
129 +#include <arpa/inet.h>
133 +#include "tc_util.h"
135 +static void explain(void)
138 +"Usage: ... cake [ bandwidth RATE | unlimited* | autorate_ingress ]\n"
139 +" [ rtt TIME | datacentre | lan | metro | regional |\n"
140 +" internet* | oceanic | satellite | interplanetary ]\n"
141 +" [ besteffort | diffserv8 | diffserv4 | diffserv-llt |\n"
143 +" [ flowblind | srchost | dsthost | hosts | flows |\n"
144 +" dual-srchost | dual-dsthost | triple-isolate* ]\n"
145 +" [ nat | nonat* ]\n"
146 +" [ wash | nowash * ]\n"
147 +" [ memlimit LIMIT ]\n"
148 +" [ ptm | atm | noatm* ] [ overhead N | conservative | raw* ]\n"
150 +" (* marks defaults)\n");
153 +static int cake_parse_opt(struct qdisc_util *qu, int argc, char **argv,
154 + struct nlmsghdr *n)
157 + unsigned bandwidth = 0;
158 + unsigned interval = 0;
159 + unsigned target = 0;
160 + unsigned diffserv = 0;
161 + unsigned memlimit = 0;
163 + bool overhead_set = false;
164 + bool overhead_override = false;
171 + struct rtattr *tail;
174 + if (strcmp(*argv, "bandwidth") == 0) {
176 + if (get_rate(&bandwidth, *argv)) {
177 + fprintf(stderr, "Illegal \"bandwidth\"\n");
182 + } else if (strcmp(*argv, "unlimited") == 0) {
186 + } else if (strcmp(*argv, "autorate_ingress") == 0) {
189 + } else if (strcmp(*argv, "rtt") == 0) {
191 + if (get_time(&interval, *argv)) {
192 + fprintf(stderr, "Illegal \"rtt\"\n");
195 + target = interval / 20;
198 + } else if (strcmp(*argv, "datacentre") == 0) {
201 + } else if (strcmp(*argv, "lan") == 0) {
204 + } else if (strcmp(*argv, "metro") == 0) {
207 + } else if (strcmp(*argv, "regional") == 0) {
210 + } else if (strcmp(*argv, "internet") == 0) {
213 + } else if (strcmp(*argv, "oceanic") == 0) {
216 + } else if (strcmp(*argv, "satellite") == 0) {
217 + interval = 1000000;
219 + } else if (strcmp(*argv, "interplanetary") == 0) {
220 + interval = 3600000000U;
223 + } else if (strcmp(*argv, "besteffort") == 0) {
225 + } else if (strcmp(*argv, "precedence") == 0) {
227 + } else if (strcmp(*argv, "diffserv8") == 0) {
229 + } else if (strcmp(*argv, "diffserv4") == 0) {
231 + } else if (strcmp(*argv, "diffserv") == 0) {
233 + } else if (strcmp(*argv, "diffserv-llt") == 0) {
235 + } else if (strcmp(*argv, "diffserv3") == 0) {
238 + } else if (strcmp(*argv, "nowash") == 0) {
240 + } else if (strcmp(*argv, "wash") == 0) {
243 + } else if (strcmp(*argv, "flowblind") == 0) {
245 + } else if (strcmp(*argv, "srchost") == 0) {
247 + } else if (strcmp(*argv, "dsthost") == 0) {
249 + } else if (strcmp(*argv, "hosts") == 0) {
251 + } else if (strcmp(*argv, "flows") == 0) {
253 + } else if (strcmp(*argv, "dual-srchost") == 0) {
255 + } else if (strcmp(*argv, "dual-dsthost") == 0) {
257 + } else if (strcmp(*argv, "triple-isolate") == 0) {
260 + } else if (strcmp(*argv, "nat") == 0) {
262 + } else if (strcmp(*argv, "nonat") == 0) {
265 + } else if (strcmp(*argv, "ptm") == 0) {
267 + } else if (strcmp(*argv, "atm") == 0) {
269 + } else if (strcmp(*argv, "noatm") == 0) {
272 + } else if (strcmp(*argv, "raw") == 0) {
275 + overhead_set = true;
276 + overhead_override = true;
277 + } else if (strcmp(*argv, "conservative") == 0) {
279 + * Deliberately over-estimate overhead:
280 + * one whole ATM cell plus ATM framing.
281 + * A safe choice if the actual overhead is unknown.
285 + overhead_set = true;
287 + /* Various ADSL framing schemes, all over ATM cells */
288 + } else if (strcmp(*argv, "ipoa-vcmux") == 0) {
291 + overhead_set = true;
292 + } else if (strcmp(*argv, "ipoa-llcsnap") == 0) {
295 + overhead_set = true;
296 + } else if (strcmp(*argv, "bridged-vcmux") == 0) {
299 + overhead_set = true;
300 + } else if (strcmp(*argv, "bridged-llcsnap") == 0) {
303 + overhead_set = true;
304 + } else if (strcmp(*argv, "pppoa-vcmux") == 0) {
307 + overhead_set = true;
308 + } else if (strcmp(*argv, "pppoa-llc") == 0) {
311 + overhead_set = true;
312 + } else if (strcmp(*argv, "pppoe-vcmux") == 0) {
315 + overhead_set = true;
316 + } else if (strcmp(*argv, "pppoe-llcsnap") == 0) {
319 + overhead_set = true;
321 + /* Typical VDSL2 framing schemes, both over PTM */
322 + /* PTM has 64b/65b coding which absorbs some bandwidth */
323 + } else if (strcmp(*argv, "pppoe-ptm") == 0) {
326 + overhead_set = true;
327 + } else if (strcmp(*argv, "bridged-ptm") == 0) {
330 + overhead_set = true;
332 + } else if (strcmp(*argv, "via-ethernet") == 0) {
334 + * We used to use this flag to manually compensate for
335 + * Linux including the Ethernet header on Ethernet-type
336 + * interfaces, but not on IP-type interfaces.
338 + * It is no longer needed, because Cake now adjusts for
339 + * that automatically, and is thus ignored.
341 + * It would be deleted entirely, but it appears in the
342 + * stats output when the automatic compensation is active.
345 + } else if (strcmp(*argv, "ethernet") == 0) {
346 + /* ethernet pre-amble & interframe gap & FCS
347 + * you may need to add vlan tag */
349 + overhead_set = true;
352 + /* Additional Ethernet-related overhead used by some ISPs */
353 + } else if (strcmp(*argv, "ether-vlan") == 0) {
354 + /* 802.1q VLAN tag - may be repeated */
356 + overhead_set = true;
359 + * DOCSIS cable shapers account for Ethernet frame with FCS,
360 + * but not interframe gap nor preamble.
362 + } else if (strcmp(*argv, "docsis") == 0) {
365 + overhead_set = true;
368 + } else if (strcmp(*argv, "overhead") == 0) {
371 + overhead = strtol(*argv, &p, 10);
372 + if(!p || *p || !*argv || overhead < -64 || overhead > 256) {
373 + fprintf(stderr, "Illegal \"overhead\", valid range is -64 to 256\\n");
376 + overhead_set = true;
378 + } else if (strcmp(*argv, "mpu") == 0) {
381 + mpu = strtol(*argv, &p, 10);
382 + if(!p || *p || !*argv || mpu < 0 || mpu > 256) {
383 + fprintf(stderr, "Illegal \"mpu\", valid range is 0 to 256\\n");
387 + } else if (strcmp(*argv, "memlimit") == 0) {
389 + if(get_size(&memlimit, *argv)) {
390 + fprintf(stderr, "Illegal value for \"memlimit\": \"%s\"\n", *argv);
394 + } else if (strcmp(*argv, "help") == 0) {
398 + fprintf(stderr, "What is \"%s\"?\n", *argv);
405 + tail = NLMSG_TAIL(n);
406 + addattr_l(n, 1024, TCA_OPTIONS, NULL, 0);
407 + if (bandwidth || unlimited)
408 + addattr_l(n, 1024, TCA_CAKE_BASE_RATE, &bandwidth, sizeof(bandwidth));
410 + addattr_l(n, 1024, TCA_CAKE_DIFFSERV_MODE, &diffserv, sizeof(diffserv));
412 + addattr_l(n, 1024, TCA_CAKE_ATM, &atm, sizeof(atm));
413 + if (flowmode != -1)
414 + addattr_l(n, 1024, TCA_CAKE_FLOW_MODE, &flowmode, sizeof(flowmode));
416 + addattr_l(n, 1024, TCA_CAKE_OVERHEAD, &overhead, sizeof(overhead));
417 + if (overhead_override) {
419 + addattr_l(n, 1024, TCA_CAKE_ETHERNET, &zero, sizeof(zero));
422 + addattr_l(n, 1024, TCA_CAKE_MPU, &mpu, sizeof(mpu));
424 + addattr_l(n, 1024, TCA_CAKE_RTT, &interval, sizeof(interval));
426 + addattr_l(n, 1024, TCA_CAKE_TARGET, &target, sizeof(target));
427 + if (autorate != -1)
428 + addattr_l(n, 1024, TCA_CAKE_AUTORATE, &autorate, sizeof(autorate));
430 + addattr_l(n, 1024, TCA_CAKE_MEMORY, &memlimit, sizeof(memlimit));
432 + addattr_l(n, 1024, TCA_CAKE_NAT, &nat, sizeof(nat));
434 + addattr_l(n, 1024, TCA_CAKE_WASH, &wash, sizeof(wash));
436 + tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
441 +static int cake_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
443 + struct rtattr *tb[TCA_CAKE_MAX + 1];
444 + unsigned bandwidth = 0;
445 + unsigned diffserv = 0;
446 + unsigned flowmode = 0;
447 + unsigned interval = 0;
448 + unsigned memlimit = 0;
462 + parse_rtattr_nested(tb, TCA_CAKE_MAX, opt);
464 + if (tb[TCA_CAKE_BASE_RATE] &&
465 + RTA_PAYLOAD(tb[TCA_CAKE_BASE_RATE]) >= sizeof(__u32)) {
466 + bandwidth = rta_getattr_u32(tb[TCA_CAKE_BASE_RATE]);
468 + fprintf(f, "bandwidth %s ", sprint_rate(bandwidth, b1));
470 + fprintf(f, "unlimited ");
472 + if (tb[TCA_CAKE_AUTORATE] &&
473 + RTA_PAYLOAD(tb[TCA_CAKE_AUTORATE]) >= sizeof(__u32)) {
474 + autorate = rta_getattr_u32(tb[TCA_CAKE_AUTORATE]);
476 + fprintf(f, "autorate_ingress ");
478 + fprintf(f, "(?autorate?) ");
480 + if (tb[TCA_CAKE_DIFFSERV_MODE] &&
481 + RTA_PAYLOAD(tb[TCA_CAKE_DIFFSERV_MODE]) >= sizeof(__u32)) {
482 + diffserv = rta_getattr_u32(tb[TCA_CAKE_DIFFSERV_MODE]);
485 + fprintf(f, "besteffort ");
488 + fprintf(f, "precedence ");
491 + fprintf(f, "diffserv8 ");
494 + fprintf(f, "diffserv4 ");
497 + fprintf(f, "diffserv-llt ");
500 + fprintf(f, "diffserv3 ");
503 + fprintf(f, "(?diffserv?) ");
507 + if (tb[TCA_CAKE_FLOW_MODE] &&
508 + RTA_PAYLOAD(tb[TCA_CAKE_FLOW_MODE]) >= sizeof(__u32)) {
509 + flowmode = rta_getattr_u32(tb[TCA_CAKE_FLOW_MODE]);
510 + nat = !!(flowmode & 64);
514 + fprintf(f, "flowblind ");
517 + fprintf(f, "srchost ");
520 + fprintf(f, "dsthost ");
523 + fprintf(f, "hosts ");
526 + fprintf(f, "flows ");
529 + fprintf(f, "dual-srchost ");
532 + fprintf(f, "dual-dsthost ");
535 + fprintf(f, "triple-isolate ");
538 + fprintf(f, "(?flowmode?) ");
543 + fprintf(f, "nat ");
545 + if (tb[TCA_CAKE_WASH] &&
546 + RTA_PAYLOAD(tb[TCA_CAKE_WASH]) >= sizeof(__u32)) {
547 + wash = rta_getattr_u32(tb[TCA_CAKE_WASH]);
549 + if (tb[TCA_CAKE_ATM] &&
550 + RTA_PAYLOAD(tb[TCA_CAKE_ATM]) >= sizeof(__u32)) {
551 + atm = rta_getattr_u32(tb[TCA_CAKE_ATM]);
553 + if (tb[TCA_CAKE_OVERHEAD] &&
554 + RTA_PAYLOAD(tb[TCA_CAKE_OVERHEAD]) >= sizeof(__u32)) {
555 + overhead = rta_getattr_u32(tb[TCA_CAKE_OVERHEAD]);
557 + if (tb[TCA_CAKE_MPU] &&
558 + RTA_PAYLOAD(tb[TCA_CAKE_MPU]) >= sizeof(__u32)) {
559 + mpu = rta_getattr_u32(tb[TCA_CAKE_MPU]);
561 + if (tb[TCA_CAKE_ETHERNET] &&
562 + RTA_PAYLOAD(tb[TCA_CAKE_ETHERNET]) >= sizeof(__u32)) {
563 + ethernet = rta_getattr_u32(tb[TCA_CAKE_ETHERNET]);
565 + if (tb[TCA_CAKE_RTT] &&
566 + RTA_PAYLOAD(tb[TCA_CAKE_RTT]) >= sizeof(__u32)) {
567 + interval = rta_getattr_u32(tb[TCA_CAKE_RTT]);
571 + fprintf(f,"wash ");
574 + fprintf(f, "rtt %s ", sprint_time(interval, b2));
576 + if (!atm && overhead == ethernet) {
577 + fprintf(f, "raw ");
580 + fprintf(f, "atm ");
582 + fprintf(f, "ptm ");
584 + fprintf(f, "noatm ");
586 + fprintf(f, "overhead %d ", overhead);
588 + // This is actually the *amount* of automatic compensation, but we only report
589 + // its presence as a boolean for now.
591 + fprintf(f, "via-ethernet ");
595 + fprintf(f, "mpu %d ", mpu);
599 + fprintf(f, "memlimit %s", sprint_size(memlimit, b1));
604 +static int cake_print_xstats(struct qdisc_util *qu, FILE *f,
605 + struct rtattr *xstats)
607 + /* fq_codel stats format borrowed */
608 + struct tc_fq_codel_xstats *st;
609 + struct tc_cake_xstats *stnc;
613 + if (xstats == NULL)
616 + if (RTA_PAYLOAD(xstats) < sizeof(st->type))
619 + st = RTA_DATA(xstats);
620 + stnc = RTA_DATA(xstats);
622 + if (st->type == TCA_FQ_CODEL_XSTATS_QDISC && RTA_PAYLOAD(xstats) >= sizeof(*st)) {
623 + fprintf(f, " maxpacket %u drop_overlimit %u new_flow_count %u ecn_mark %u",
624 + st->qdisc_stats.maxpacket,
625 + st->qdisc_stats.drop_overlimit,
626 + st->qdisc_stats.new_flow_count,
627 + st->qdisc_stats.ecn_mark);
628 + fprintf(f, "\n new_flows_len %u old_flows_len %u",
629 + st->qdisc_stats.new_flows_len,
630 + st->qdisc_stats.old_flows_len);
631 + } else if (st->type == TCA_FQ_CODEL_XSTATS_CLASS && RTA_PAYLOAD(xstats) >= sizeof(*st)) {
632 + fprintf(f, " deficit %d count %u lastcount %u ldelay %s",
633 + st->class_stats.deficit,
634 + st->class_stats.count,
635 + st->class_stats.lastcount,
636 + sprint_time(st->class_stats.ldelay, b1));
637 + if (st->class_stats.dropping) {
638 + fprintf(f, " dropping");
639 + if (st->class_stats.drop_next < 0)
640 + fprintf(f, " drop_next -%s",
641 + sprint_time(-st->class_stats.drop_next, b1));
643 + fprintf(f, " drop_next %s",
644 + sprint_time(st->class_stats.drop_next, b1));
646 + } else if (stnc->version >= 1 && stnc->version < 0xFF
647 + && stnc->max_tins == TC_CAKE_MAX_TINS
648 + && RTA_PAYLOAD(xstats) >= offsetof(struct tc_cake_xstats, capacity_estimate))
652 + if(stnc->version >= 3)
653 + fprintf(f, " memory used: %s of %s\n", sprint_size(stnc->memory_used, b1), sprint_size(stnc->memory_limit, b2));
655 + if(stnc->version >= 2)
656 + fprintf(f, " capacity estimate: %s\n", sprint_rate(stnc->capacity_estimate, b1));
658 + switch(stnc->tin_cnt) {
660 + fprintf(f, " Bulk Best Effort Voice\n");
664 + fprintf(f, " Bulk Best Effort Video Voice\n");
668 + fprintf(f, " Low Loss Best Effort Low Delay Bulk Net Control\n");
673 + for(i=0; i < stnc->tin_cnt; i++)
674 + fprintf(f, " Tin %u", i);
678 + fprintf(f, " thresh ");
679 + for(i=0; i < stnc->tin_cnt; i++)
680 + fprintf(f, "%12s", sprint_rate(stnc->threshold_rate[i], b1));
683 + fprintf(f, " target ");
684 + for(i=0; i < stnc->tin_cnt; i++)
685 + fprintf(f, "%12s", sprint_time(stnc->target_us[i], b1));
688 + fprintf(f, " interval");
689 + for(i=0; i < stnc->tin_cnt; i++)
690 + fprintf(f, "%12s", sprint_time(stnc->interval_us[i], b1));
693 + fprintf(f, " pk_delay");
694 + for(i=0; i < stnc->tin_cnt; i++)
695 + fprintf(f, "%12s", sprint_time(stnc->peak_delay_us[i], b1));
698 + fprintf(f, " av_delay");
699 + for(i=0; i < stnc->tin_cnt; i++)
700 + fprintf(f, "%12s", sprint_time(stnc->avge_delay_us[i], b1));
703 + fprintf(f, " sp_delay");
704 + for(i=0; i < stnc->tin_cnt; i++)
705 + fprintf(f, "%12s", sprint_time(stnc->base_delay_us[i], b1));
708 + fprintf(f, " pkts ");
709 + for(i=0; i < stnc->tin_cnt; i++)
710 + fprintf(f, "%12u", stnc->sent[i].packets);
713 + fprintf(f, " bytes ");
714 + for(i=0; i < stnc->tin_cnt; i++)
715 + fprintf(f, "%12llu", stnc->sent[i].bytes);
718 + fprintf(f, " way_inds");
719 + for(i=0; i < stnc->tin_cnt; i++)
720 + fprintf(f, "%12u", stnc->way_indirect_hits[i]);
723 + fprintf(f, " way_miss");
724 + for(i=0; i < stnc->tin_cnt; i++)
725 + fprintf(f, "%12u", stnc->way_misses[i]);
728 + fprintf(f, " way_cols");
729 + for(i=0; i < stnc->tin_cnt; i++)
730 + fprintf(f, "%12u", stnc->way_collisions[i]);
733 + fprintf(f, " drops ");
734 + for(i=0; i < stnc->tin_cnt; i++)
735 + fprintf(f, "%12u", stnc->dropped[i].packets);
738 + fprintf(f, " marks ");
739 + for(i=0; i < stnc->tin_cnt; i++)
740 + fprintf(f, "%12u", stnc->ecn_marked[i].packets);
743 + fprintf(f, " sp_flows");
744 + for(i=0; i < stnc->tin_cnt; i++)
745 + fprintf(f, "%12u", stnc->sparse_flows[i]);
748 + fprintf(f, " bk_flows");
749 + for(i=0; i < stnc->tin_cnt; i++)
750 + fprintf(f, "%12u", stnc->bulk_flows[i]);
753 + if(stnc->version >= 4) {
754 + fprintf(f, " un_flows");
755 + for(i=0; i < stnc->tin_cnt; i++)
756 + fprintf(f, "%12u", stnc->unresponse_flows[i]);
760 + fprintf(f, " max_len ");
761 + for(i=0; i < stnc->tin_cnt; i++)
762 + fprintf(f, "%12u", stnc->max_skblen[i]);
770 +struct qdisc_util cake_qdisc_util = {
772 + .parse_qopt = cake_parse_opt,
773 + .print_qopt = cake_print_opt,
774 + .print_xstats = cake_print_xstats,