1 --- a/include/linux/pkt_sched.h
2 +++ b/include/linux/pkt_sched.h
3 @@ -871,4 +871,63 @@ struct tc_pie_xstats {
4 __u32 maxq; /* maximum queue size */
5 __u32 ecn_mark; /* packets marked with ecn*/
12 + TCA_CAKE_DIFFSERV_MODE,
25 + TCA_CAKE_ACK_FILTER,
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; /* == 5, 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]; /* ~= bulk flow delay */
53 + __u32 avge_delay_us[TC_CAKE_MAX_TINS];
54 + __u32 base_delay_us[TC_CAKE_MAX_TINS]; /* ~= sparse flows delay */
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 */
63 + struct tc_cake_traffic_stats ack_drops[TC_CAKE_MAX_TINS]; /* v5 */
69 @@ -69,6 +69,7 @@ TCMODULES += q_codel.o
70 TCMODULES += q_fq_codel.o
73 +TCMODULES += q_cake.o
75 TCMODULES += q_clsact.o
81 + * Common Applications Kept Enhanced -- CAKE
83 + * Copyright (C) 2014-2015 Jonathan Morton <chromatix99@gmail.com>
85 + * Redistribution and use in source and binary forms, with or without
86 + * modification, are permitted provided that the following conditions
88 + * 1. Redistributions of source code must retain the above copyright
89 + * notice, this list of conditions, and the following disclaimer,
90 + * without modification.
91 + * 2. Redistributions in binary form must reproduce the above copyright
92 + * notice, this list of conditions and the following disclaimer in the
93 + * documentation and/or other materials provided with the distribution.
94 + * 3. The names of the authors may not be used to endorse or promote products
95 + * derived from this software without specific prior written permission.
97 + * Alternatively, provided that this notice is retained in full, this
98 + * software may be distributed under the terms of the GNU General
99 + * Public License ("GPL") version 2, in which case the provisions of the
100 + * GPL apply INSTEAD OF those given above.
102 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
103 + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
104 + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
105 + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
106 + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
107 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
108 + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
109 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
110 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
111 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
112 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
123 +#include <sys/socket.h>
124 +#include <netinet/in.h>
125 +#include <arpa/inet.h>
129 +#include "tc_util.h"
131 +static void explain(void)
134 +"Usage: ... cake [ bandwidth RATE | unlimited* | autorate_ingress ]\n"
135 +" [ rtt TIME | datacentre | lan | metro | regional |\n"
136 +" internet* | oceanic | satellite | interplanetary ]\n"
137 +" [ besteffort | diffserv8 | diffserv4 | diffserv-llt |\n"
139 +" [ flowblind | srchost | dsthost | hosts | flows |\n"
140 +" dual-srchost | dual-dsthost | triple-isolate* ]\n"
141 +" [ nat | nonat* ]\n"
142 +" [ wash | nowash * ]\n"
143 +" [ memlimit LIMIT ]\n"
144 +" [ ptm | atm | noatm* ] [ overhead N | conservative | raw* ]\n"
146 +" (* marks defaults)\n");
149 +static int cake_parse_opt(struct qdisc_util *qu, int argc, char **argv,
150 + struct nlmsghdr *n)
153 + unsigned bandwidth = 0;
154 + unsigned interval = 0;
155 + unsigned target = 0;
156 + unsigned diffserv = 0;
157 + unsigned memlimit = 0;
159 + bool overhead_set = false;
160 + bool overhead_override = false;
167 + struct rtattr *tail;
170 + if (strcmp(*argv, "bandwidth") == 0) {
172 + if (get_rate(&bandwidth, *argv)) {
173 + fprintf(stderr, "Illegal \"bandwidth\"\n");
178 + } else if (strcmp(*argv, "unlimited") == 0) {
182 + } else if (strcmp(*argv, "autorate_ingress") == 0) {
185 + } else if (strcmp(*argv, "rtt") == 0) {
187 + if (get_time(&interval, *argv)) {
188 + fprintf(stderr, "Illegal \"rtt\"\n");
191 + target = interval / 20;
194 + } else if (strcmp(*argv, "datacentre") == 0) {
197 + } else if (strcmp(*argv, "lan") == 0) {
200 + } else if (strcmp(*argv, "metro") == 0) {
203 + } else if (strcmp(*argv, "regional") == 0) {
206 + } else if (strcmp(*argv, "internet") == 0) {
209 + } else if (strcmp(*argv, "oceanic") == 0) {
212 + } else if (strcmp(*argv, "satellite") == 0) {
213 + interval = 1000000;
215 + } else if (strcmp(*argv, "interplanetary") == 0) {
216 + interval = 3600000000U;
219 + } else if (strcmp(*argv, "besteffort") == 0) {
221 + } else if (strcmp(*argv, "precedence") == 0) {
223 + } else if (strcmp(*argv, "diffserv8") == 0) {
225 + } else if (strcmp(*argv, "diffserv4") == 0) {
227 + } else if (strcmp(*argv, "diffserv") == 0) {
229 + } else if (strcmp(*argv, "diffserv-llt") == 0) {
231 + } else if (strcmp(*argv, "diffserv3") == 0) {
234 + } else if (strcmp(*argv, "nowash") == 0) {
236 + } else if (strcmp(*argv, "wash") == 0) {
239 + } else if (strcmp(*argv, "flowblind") == 0) {
241 + } else if (strcmp(*argv, "srchost") == 0) {
243 + } else if (strcmp(*argv, "dsthost") == 0) {
245 + } else if (strcmp(*argv, "hosts") == 0) {
247 + } else if (strcmp(*argv, "flows") == 0) {
249 + } else if (strcmp(*argv, "dual-srchost") == 0) {
251 + } else if (strcmp(*argv, "dual-dsthost") == 0) {
253 + } else if (strcmp(*argv, "triple-isolate") == 0) {
256 + } else if (strcmp(*argv, "nat") == 0) {
258 + } else if (strcmp(*argv, "nonat") == 0) {
261 + } else if (strcmp(*argv, "ptm") == 0) {
263 + } else if (strcmp(*argv, "atm") == 0) {
265 + } else if (strcmp(*argv, "noatm") == 0) {
268 + } else if (strcmp(*argv, "raw") == 0) {
271 + overhead_set = true;
272 + overhead_override = true;
273 + } else if (strcmp(*argv, "conservative") == 0) {
275 + * Deliberately over-estimate overhead:
276 + * one whole ATM cell plus ATM framing.
277 + * A safe choice if the actual overhead is unknown.
281 + overhead_set = true;
283 + /* Various ADSL framing schemes, all over ATM cells */
284 + } else if (strcmp(*argv, "ipoa-vcmux") == 0) {
287 + overhead_set = true;
288 + } else if (strcmp(*argv, "ipoa-llcsnap") == 0) {
291 + overhead_set = true;
292 + } else if (strcmp(*argv, "bridged-vcmux") == 0) {
295 + overhead_set = true;
296 + } else if (strcmp(*argv, "bridged-llcsnap") == 0) {
299 + overhead_set = true;
300 + } else if (strcmp(*argv, "pppoa-vcmux") == 0) {
303 + overhead_set = true;
304 + } else if (strcmp(*argv, "pppoa-llc") == 0) {
307 + overhead_set = true;
308 + } else if (strcmp(*argv, "pppoe-vcmux") == 0) {
311 + overhead_set = true;
312 + } else if (strcmp(*argv, "pppoe-llcsnap") == 0) {
315 + overhead_set = true;
317 + /* Typical VDSL2 framing schemes, both over PTM */
318 + /* PTM has 64b/65b coding which absorbs some bandwidth */
319 + } else if (strcmp(*argv, "pppoe-ptm") == 0) {
322 + overhead_set = true;
323 + } else if (strcmp(*argv, "bridged-ptm") == 0) {
326 + overhead_set = true;
328 + } else if (strcmp(*argv, "via-ethernet") == 0) {
330 + * We used to use this flag to manually compensate for
331 + * Linux including the Ethernet header on Ethernet-type
332 + * interfaces, but not on IP-type interfaces.
334 + * It is no longer needed, because Cake now adjusts for
335 + * that automatically, and is thus ignored.
337 + * It would be deleted entirely, but it appears in the
338 + * stats output when the automatic compensation is active.
341 + } else if (strcmp(*argv, "ethernet") == 0) {
342 + /* ethernet pre-amble & interframe gap & FCS
343 + * you may need to add vlan tag */
345 + overhead_set = true;
348 + /* Additional Ethernet-related overhead used by some ISPs */
349 + } else if (strcmp(*argv, "ether-vlan") == 0) {
350 + /* 802.1q VLAN tag - may be repeated */
352 + overhead_set = true;
355 + * DOCSIS cable shapers account for Ethernet frame with FCS,
356 + * but not interframe gap nor preamble.
358 + } else if (strcmp(*argv, "docsis") == 0) {
361 + overhead_set = true;
364 + } else if (strcmp(*argv, "overhead") == 0) {
367 + overhead = strtol(*argv, &p, 10);
368 + if(!p || *p || !*argv || overhead < -64 || overhead > 256) {
369 + fprintf(stderr, "Illegal \"overhead\", valid range is -64 to 256\\n");
372 + overhead_set = true;
374 + } else if (strcmp(*argv, "mpu") == 0) {
377 + mpu = strtol(*argv, &p, 10);
378 + if(!p || *p || !*argv || mpu < 0 || mpu > 256) {
379 + fprintf(stderr, "Illegal \"mpu\", valid range is 0 to 256\\n");
383 + } else if (strcmp(*argv, "memlimit") == 0) {
385 + if(get_size(&memlimit, *argv)) {
386 + fprintf(stderr, "Illegal value for \"memlimit\": \"%s\"\n", *argv);
390 + } else if (strcmp(*argv, "help") == 0) {
394 + fprintf(stderr, "What is \"%s\"?\n", *argv);
401 + tail = NLMSG_TAIL(n);
402 + addattr_l(n, 1024, TCA_OPTIONS, NULL, 0);
403 + if (bandwidth || unlimited)
404 + addattr_l(n, 1024, TCA_CAKE_BASE_RATE, &bandwidth, sizeof(bandwidth));
406 + addattr_l(n, 1024, TCA_CAKE_DIFFSERV_MODE, &diffserv, sizeof(diffserv));
408 + addattr_l(n, 1024, TCA_CAKE_ATM, &atm, sizeof(atm));
409 + if (flowmode != -1)
410 + addattr_l(n, 1024, TCA_CAKE_FLOW_MODE, &flowmode, sizeof(flowmode));
412 + addattr_l(n, 1024, TCA_CAKE_OVERHEAD, &overhead, sizeof(overhead));
413 + if (overhead_override) {
415 + addattr_l(n, 1024, TCA_CAKE_ETHERNET, &zero, sizeof(zero));
418 + addattr_l(n, 1024, TCA_CAKE_MPU, &mpu, sizeof(mpu));
420 + addattr_l(n, 1024, TCA_CAKE_RTT, &interval, sizeof(interval));
422 + addattr_l(n, 1024, TCA_CAKE_TARGET, &target, sizeof(target));
423 + if (autorate != -1)
424 + addattr_l(n, 1024, TCA_CAKE_AUTORATE, &autorate, sizeof(autorate));
426 + addattr_l(n, 1024, TCA_CAKE_MEMORY, &memlimit, sizeof(memlimit));
428 + addattr_l(n, 1024, TCA_CAKE_NAT, &nat, sizeof(nat));
430 + addattr_l(n, 1024, TCA_CAKE_WASH, &wash, sizeof(wash));
432 + tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
437 +static int cake_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
439 + struct rtattr *tb[TCA_CAKE_MAX + 1];
440 + unsigned bandwidth = 0;
441 + unsigned diffserv = 0;
442 + unsigned flowmode = 0;
443 + unsigned interval = 0;
444 + unsigned memlimit = 0;
458 + parse_rtattr_nested(tb, TCA_CAKE_MAX, opt);
460 + if (tb[TCA_CAKE_BASE_RATE] &&
461 + RTA_PAYLOAD(tb[TCA_CAKE_BASE_RATE]) >= sizeof(__u32)) {
462 + bandwidth = rta_getattr_u32(tb[TCA_CAKE_BASE_RATE]);
464 + fprintf(f, "bandwidth %s ", sprint_rate(bandwidth, b1));
466 + fprintf(f, "unlimited ");
468 + if (tb[TCA_CAKE_AUTORATE] &&
469 + RTA_PAYLOAD(tb[TCA_CAKE_AUTORATE]) >= sizeof(__u32)) {
470 + autorate = rta_getattr_u32(tb[TCA_CAKE_AUTORATE]);
472 + fprintf(f, "autorate_ingress ");
474 + fprintf(f, "(?autorate?) ");
476 + if (tb[TCA_CAKE_DIFFSERV_MODE] &&
477 + RTA_PAYLOAD(tb[TCA_CAKE_DIFFSERV_MODE]) >= sizeof(__u32)) {
478 + diffserv = rta_getattr_u32(tb[TCA_CAKE_DIFFSERV_MODE]);
481 + fprintf(f, "besteffort ");
484 + fprintf(f, "precedence ");
487 + fprintf(f, "diffserv8 ");
490 + fprintf(f, "diffserv4 ");
493 + fprintf(f, "diffserv-llt ");
496 + fprintf(f, "diffserv3 ");
499 + fprintf(f, "(?diffserv?) ");
503 + if (tb[TCA_CAKE_FLOW_MODE] &&
504 + RTA_PAYLOAD(tb[TCA_CAKE_FLOW_MODE]) >= sizeof(__u32)) {
505 + flowmode = rta_getattr_u32(tb[TCA_CAKE_FLOW_MODE]);
506 + nat = !!(flowmode & 64);
510 + fprintf(f, "flowblind ");
513 + fprintf(f, "srchost ");
516 + fprintf(f, "dsthost ");
519 + fprintf(f, "hosts ");
522 + fprintf(f, "flows ");
525 + fprintf(f, "dual-srchost ");
528 + fprintf(f, "dual-dsthost ");
531 + fprintf(f, "triple-isolate ");
534 + fprintf(f, "(?flowmode?) ");
539 + fprintf(f, "nat ");
541 + if (tb[TCA_CAKE_WASH] &&
542 + RTA_PAYLOAD(tb[TCA_CAKE_WASH]) >= sizeof(__u32)) {
543 + wash = rta_getattr_u32(tb[TCA_CAKE_WASH]);
545 + if (tb[TCA_CAKE_ATM] &&
546 + RTA_PAYLOAD(tb[TCA_CAKE_ATM]) >= sizeof(__u32)) {
547 + atm = rta_getattr_u32(tb[TCA_CAKE_ATM]);
549 + if (tb[TCA_CAKE_OVERHEAD] &&
550 + RTA_PAYLOAD(tb[TCA_CAKE_OVERHEAD]) >= sizeof(__u32)) {
551 + overhead = rta_getattr_u32(tb[TCA_CAKE_OVERHEAD]);
553 + if (tb[TCA_CAKE_MPU] &&
554 + RTA_PAYLOAD(tb[TCA_CAKE_MPU]) >= sizeof(__u32)) {
555 + mpu = rta_getattr_u32(tb[TCA_CAKE_MPU]);
557 + if (tb[TCA_CAKE_ETHERNET] &&
558 + RTA_PAYLOAD(tb[TCA_CAKE_ETHERNET]) >= sizeof(__u32)) {
559 + ethernet = rta_getattr_u32(tb[TCA_CAKE_ETHERNET]);
561 + if (tb[TCA_CAKE_RTT] &&
562 + RTA_PAYLOAD(tb[TCA_CAKE_RTT]) >= sizeof(__u32)) {
563 + interval = rta_getattr_u32(tb[TCA_CAKE_RTT]);
567 + fprintf(f,"wash ");
570 + fprintf(f, "rtt %s ", sprint_time(interval, b2));
572 + if (!atm && overhead == ethernet) {
573 + fprintf(f, "raw ");
576 + fprintf(f, "atm ");
578 + fprintf(f, "ptm ");
580 + fprintf(f, "noatm ");
582 + fprintf(f, "overhead %d ", overhead);
584 + // This is actually the *amount* of automatic compensation, but we only report
585 + // its presence as a boolean for now.
587 + fprintf(f, "via-ethernet ");
591 + fprintf(f, "mpu %d ", mpu);
595 + fprintf(f, "memlimit %s", sprint_size(memlimit, b1));
600 +static int cake_print_xstats(struct qdisc_util *qu, FILE *f,
601 + struct rtattr *xstats)
603 + /* fq_codel stats format borrowed */
604 + struct tc_fq_codel_xstats *st;
605 + struct tc_cake_xstats *stnc;
609 + if (xstats == NULL)
612 + if (RTA_PAYLOAD(xstats) < sizeof(st->type))
615 + st = RTA_DATA(xstats);
616 + stnc = RTA_DATA(xstats);
618 + if (st->type == TCA_FQ_CODEL_XSTATS_QDISC && RTA_PAYLOAD(xstats) >= sizeof(*st)) {
619 + fprintf(f, " maxpacket %u drop_overlimit %u new_flow_count %u ecn_mark %u",
620 + st->qdisc_stats.maxpacket,
621 + st->qdisc_stats.drop_overlimit,
622 + st->qdisc_stats.new_flow_count,
623 + st->qdisc_stats.ecn_mark);
624 + fprintf(f, "\n new_flows_len %u old_flows_len %u",
625 + st->qdisc_stats.new_flows_len,
626 + st->qdisc_stats.old_flows_len);
627 + } else if (st->type == TCA_FQ_CODEL_XSTATS_CLASS && RTA_PAYLOAD(xstats) >= sizeof(*st)) {
628 + fprintf(f, " deficit %d count %u lastcount %u ldelay %s",
629 + st->class_stats.deficit,
630 + st->class_stats.count,
631 + st->class_stats.lastcount,
632 + sprint_time(st->class_stats.ldelay, b1));
633 + if (st->class_stats.dropping) {
634 + fprintf(f, " dropping");
635 + if (st->class_stats.drop_next < 0)
636 + fprintf(f, " drop_next -%s",
637 + sprint_time(-st->class_stats.drop_next, b1));
639 + fprintf(f, " drop_next %s",
640 + sprint_time(st->class_stats.drop_next, b1));
642 + } else if (stnc->version >= 1 && stnc->version < 0xFF
643 + && stnc->max_tins == TC_CAKE_MAX_TINS
644 + && RTA_PAYLOAD(xstats) >= offsetof(struct tc_cake_xstats, capacity_estimate))
648 + if(stnc->version >= 3)
649 + fprintf(f, " memory used: %s of %s\n", sprint_size(stnc->memory_used, b1), sprint_size(stnc->memory_limit, b2));
651 + if(stnc->version >= 2)
652 + fprintf(f, " capacity estimate: %s\n", sprint_rate(stnc->capacity_estimate, b1));
654 + switch(stnc->tin_cnt) {
656 + fprintf(f, " Bulk Best Effort Voice\n");
660 + fprintf(f, " Bulk Best Effort Video Voice\n");
664 + fprintf(f, " Low Loss Best Effort Low Delay Bulk Net Control\n");
669 + for(i=0; i < stnc->tin_cnt; i++)
670 + fprintf(f, " Tin %u", i);
674 + fprintf(f, " thresh ");
675 + for(i=0; i < stnc->tin_cnt; i++)
676 + fprintf(f, "%12s", sprint_rate(stnc->threshold_rate[i], b1));
679 + fprintf(f, " target ");
680 + for(i=0; i < stnc->tin_cnt; i++)
681 + fprintf(f, "%12s", sprint_time(stnc->target_us[i], b1));
684 + fprintf(f, " interval");
685 + for(i=0; i < stnc->tin_cnt; i++)
686 + fprintf(f, "%12s", sprint_time(stnc->interval_us[i], b1));
689 + fprintf(f, " pk_delay");
690 + for(i=0; i < stnc->tin_cnt; i++)
691 + fprintf(f, "%12s", sprint_time(stnc->peak_delay_us[i], b1));
694 + fprintf(f, " av_delay");
695 + for(i=0; i < stnc->tin_cnt; i++)
696 + fprintf(f, "%12s", sprint_time(stnc->avge_delay_us[i], b1));
699 + fprintf(f, " sp_delay");
700 + for(i=0; i < stnc->tin_cnt; i++)
701 + fprintf(f, "%12s", sprint_time(stnc->base_delay_us[i], b1));
704 + fprintf(f, " pkts ");
705 + for(i=0; i < stnc->tin_cnt; i++)
706 + fprintf(f, "%12u", stnc->sent[i].packets);
709 + fprintf(f, " bytes ");
710 + for(i=0; i < stnc->tin_cnt; i++)
711 + fprintf(f, "%12llu", stnc->sent[i].bytes);
714 + fprintf(f, " way_inds");
715 + for(i=0; i < stnc->tin_cnt; i++)
716 + fprintf(f, "%12u", stnc->way_indirect_hits[i]);
719 + fprintf(f, " way_miss");
720 + for(i=0; i < stnc->tin_cnt; i++)
721 + fprintf(f, "%12u", stnc->way_misses[i]);
724 + fprintf(f, " way_cols");
725 + for(i=0; i < stnc->tin_cnt; i++)
726 + fprintf(f, "%12u", stnc->way_collisions[i]);
729 + fprintf(f, " drops ");
730 + for(i=0; i < stnc->tin_cnt; i++)
731 + fprintf(f, "%12u", stnc->dropped[i].packets);
734 + fprintf(f, " marks ");
735 + for(i=0; i < stnc->tin_cnt; i++)
736 + fprintf(f, "%12u", stnc->ecn_marked[i].packets);
739 + fprintf(f, " sp_flows");
740 + for(i=0; i < stnc->tin_cnt; i++)
741 + fprintf(f, "%12u", stnc->sparse_flows[i]);
744 + fprintf(f, " bk_flows");
745 + for(i=0; i < stnc->tin_cnt; i++)
746 + fprintf(f, "%12u", stnc->bulk_flows[i]);
749 + if(stnc->version >= 4) {
750 + fprintf(f, " un_flows");
751 + for(i=0; i < stnc->tin_cnt; i++)
752 + fprintf(f, "%12u", stnc->unresponse_flows[i]);
756 + fprintf(f, " max_len ");
757 + for(i=0; i < stnc->tin_cnt; i++)
758 + fprintf(f, "%12u", stnc->max_skblen[i]);
766 +struct qdisc_util cake_qdisc_util = {
768 + .parse_qopt = cake_parse_opt,
769 + .print_qopt = cake_print_opt,
770 + .print_xstats = cake_print_xstats,