1 --- a/include/linux/pkt_sched.h
2 +++ b/include/linux/pkt_sched.h
3 @@ -871,4 +871,60 @@ struct tc_pie_xstats {
4 __u32 maxq; /* maximum queue size */
5 __u32 ecn_mark; /* packets marked with ecn*/
12 + TCA_CAKE_DIFFSERV_MODE,
26 +#define TCA_CAKE_MAX (__TCA_CAKE_MAX - 1)
28 +struct tc_cake_traffic_stats {
34 +#define TC_CAKE_MAX_TINS (8)
35 +struct tc_cake_xstats {
36 + __u16 version; /* == 4, increments when struct extended */
37 + __u8 max_tins; /* == TC_CAKE_MAX_TINS */
38 + __u8 tin_cnt; /* <= TC_CAKE_MAX_TINS */
40 + __u32 threshold_rate [TC_CAKE_MAX_TINS];
41 + __u32 target_us [TC_CAKE_MAX_TINS];
42 + struct tc_cake_traffic_stats sent [TC_CAKE_MAX_TINS];
43 + struct tc_cake_traffic_stats dropped [TC_CAKE_MAX_TINS];
44 + struct tc_cake_traffic_stats ecn_marked[TC_CAKE_MAX_TINS];
45 + struct tc_cake_traffic_stats backlog [TC_CAKE_MAX_TINS];
46 + __u32 interval_us [TC_CAKE_MAX_TINS];
47 + __u32 way_indirect_hits[TC_CAKE_MAX_TINS];
48 + __u32 way_misses [TC_CAKE_MAX_TINS];
49 + __u32 way_collisions [TC_CAKE_MAX_TINS];
50 + __u32 peak_delay_us [TC_CAKE_MAX_TINS]; /* ~= delay to bulk flows */
51 + __u32 avge_delay_us [TC_CAKE_MAX_TINS];
52 + __u32 base_delay_us [TC_CAKE_MAX_TINS]; /* ~= delay to sparse flows */
53 + __u16 sparse_flows [TC_CAKE_MAX_TINS];
54 + __u16 bulk_flows [TC_CAKE_MAX_TINS];
55 + __u16 unresponse_flows [TC_CAKE_MAX_TINS]; /* v4 - was u32 last_len */
56 + __u16 spare [TC_CAKE_MAX_TINS]; /* v4 - split last_len */
57 + __u32 max_skblen [TC_CAKE_MAX_TINS];
58 + __u32 capacity_estimate; /* version 2 */
59 + __u32 memory_limit; /* version 3 */
60 + __u32 memory_used; /* version 3 */
66 @@ -69,6 +69,7 @@ TCMODULES += q_codel.o
67 TCMODULES += q_fq_codel.o
70 +TCMODULES += q_cake.o
72 TCMODULES += q_clsact.o
78 + * Common Applications Kept Enhanced -- CAKE
80 + * Copyright (C) 2014-2015 Jonathan Morton <chromatix99@gmail.com>
82 + * Redistribution and use in source and binary forms, with or without
83 + * modification, are permitted provided that the following conditions
85 + * 1. Redistributions of source code must retain the above copyright
86 + * notice, this list of conditions, and the following disclaimer,
87 + * without modification.
88 + * 2. Redistributions in binary form must reproduce the above copyright
89 + * notice, this list of conditions and the following disclaimer in the
90 + * documentation and/or other materials provided with the distribution.
91 + * 3. The names of the authors may not be used to endorse or promote products
92 + * derived from this software without specific prior written permission.
94 + * Alternatively, provided that this notice is retained in full, this
95 + * software may be distributed under the terms of the GNU General
96 + * Public License ("GPL") version 2, in which case the provisions of the
97 + * GPL apply INSTEAD OF those given above.
99 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
100 + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
101 + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
102 + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
103 + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
104 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
105 + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
106 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
107 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
108 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
109 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
120 +#include <sys/socket.h>
121 +#include <netinet/in.h>
122 +#include <arpa/inet.h>
126 +#include "tc_util.h"
128 +static void explain(void)
131 +"Usage: ... cake [ bandwidth RATE | unlimited* | autorate_ingress ]\n"
132 +" [ rtt TIME | datacentre | lan | metro | regional |\n"
133 +" internet* | oceanic | satellite | interplanetary ]\n"
134 +" [ besteffort | diffserv8 | diffserv4 | diffserv-llt |\n"
136 +" [ flowblind | srchost | dsthost | hosts | flows |\n"
137 +" dual-srchost | dual-dsthost | triple-isolate* ]\n"
138 +" [ nat | nonat* ]\n"
139 +" [ wash | nowash * ]\n"
140 +" [ memlimit LIMIT ]\n"
141 +" [ ptm | atm | noatm* ] [ overhead N | conservative | raw* ]\n"
143 +" (* marks defaults)\n");
146 +static int cake_parse_opt(struct qdisc_util *qu, int argc, char **argv,
147 + struct nlmsghdr *n)
150 + unsigned bandwidth = 0;
151 + unsigned interval = 0;
152 + unsigned target = 0;
153 + unsigned diffserv = 0;
154 + unsigned memlimit = 0;
156 + bool overhead_set = false;
157 + bool overhead_override = false;
164 + struct rtattr *tail;
167 + if (strcmp(*argv, "bandwidth") == 0) {
169 + if (get_rate(&bandwidth, *argv)) {
170 + fprintf(stderr, "Illegal \"bandwidth\"\n");
175 + } else if (strcmp(*argv, "unlimited") == 0) {
179 + } else if (strcmp(*argv, "autorate_ingress") == 0) {
182 + } else if (strcmp(*argv, "rtt") == 0) {
184 + if (get_time(&interval, *argv)) {
185 + fprintf(stderr, "Illegal \"rtt\"\n");
188 + target = interval / 20;
191 + } else if (strcmp(*argv, "datacentre") == 0) {
194 + } else if (strcmp(*argv, "lan") == 0) {
197 + } else if (strcmp(*argv, "metro") == 0) {
200 + } else if (strcmp(*argv, "regional") == 0) {
203 + } else if (strcmp(*argv, "internet") == 0) {
206 + } else if (strcmp(*argv, "oceanic") == 0) {
209 + } else if (strcmp(*argv, "satellite") == 0) {
210 + interval = 1000000;
212 + } else if (strcmp(*argv, "interplanetary") == 0) {
213 + interval = 3600000000U;
216 + } else if (strcmp(*argv, "besteffort") == 0) {
218 + } else if (strcmp(*argv, "precedence") == 0) {
220 + } else if (strcmp(*argv, "diffserv8") == 0) {
222 + } else if (strcmp(*argv, "diffserv4") == 0) {
224 + } else if (strcmp(*argv, "diffserv") == 0) {
226 + } else if (strcmp(*argv, "diffserv-llt") == 0) {
228 + } else if (strcmp(*argv, "diffserv3") == 0) {
231 + } else if (strcmp(*argv, "nowash") == 0) {
233 + } else if (strcmp(*argv, "wash") == 0) {
236 + } else if (strcmp(*argv, "flowblind") == 0) {
238 + } else if (strcmp(*argv, "srchost") == 0) {
240 + } else if (strcmp(*argv, "dsthost") == 0) {
242 + } else if (strcmp(*argv, "hosts") == 0) {
244 + } else if (strcmp(*argv, "flows") == 0) {
246 + } else if (strcmp(*argv, "dual-srchost") == 0) {
248 + } else if (strcmp(*argv, "dual-dsthost") == 0) {
250 + } else if (strcmp(*argv, "triple-isolate") == 0) {
253 + } else if (strcmp(*argv, "nat") == 0) {
255 + } else if (strcmp(*argv, "nonat") == 0) {
258 + } else if (strcmp(*argv, "ptm") == 0) {
260 + } else if (strcmp(*argv, "atm") == 0) {
262 + } else if (strcmp(*argv, "noatm") == 0) {
265 + } else if (strcmp(*argv, "raw") == 0) {
268 + overhead_set = true;
269 + overhead_override = true;
270 + } else if (strcmp(*argv, "conservative") == 0) {
272 + * Deliberately over-estimate overhead:
273 + * one whole ATM cell plus ATM framing.
274 + * A safe choice if the actual overhead is unknown.
278 + overhead_set = true;
280 + /* Various ADSL framing schemes, all over ATM cells */
281 + } else if (strcmp(*argv, "ipoa-vcmux") == 0) {
284 + overhead_set = true;
285 + } else if (strcmp(*argv, "ipoa-llcsnap") == 0) {
288 + overhead_set = true;
289 + } else if (strcmp(*argv, "bridged-vcmux") == 0) {
292 + overhead_set = true;
293 + } else if (strcmp(*argv, "bridged-llcsnap") == 0) {
296 + overhead_set = true;
297 + } else if (strcmp(*argv, "pppoa-vcmux") == 0) {
300 + overhead_set = true;
301 + } else if (strcmp(*argv, "pppoa-llc") == 0) {
304 + overhead_set = true;
305 + } else if (strcmp(*argv, "pppoe-vcmux") == 0) {
308 + overhead_set = true;
309 + } else if (strcmp(*argv, "pppoe-llcsnap") == 0) {
312 + overhead_set = true;
314 + /* Typical VDSL2 framing schemes, both over PTM */
315 + /* PTM has 64b/65b coding which absorbs some bandwidth */
316 + } else if (strcmp(*argv, "pppoe-ptm") == 0) {
319 + overhead_set = true;
320 + } else if (strcmp(*argv, "bridged-ptm") == 0) {
323 + overhead_set = true;
325 + } else if (strcmp(*argv, "via-ethernet") == 0) {
327 + * We used to use this flag to manually compensate for
328 + * Linux including the Ethernet header on Ethernet-type
329 + * interfaces, but not on IP-type interfaces.
331 + * It is no longer needed, because Cake now adjusts for
332 + * that automatically, and is thus ignored.
334 + * It would be deleted entirely, but it appears in the
335 + * stats output when the automatic compensation is active.
338 + } else if (strcmp(*argv, "ethernet") == 0) {
339 + /* ethernet pre-amble & interframe gap & FCS
340 + * you may need to add vlan tag */
342 + overhead_set = true;
345 + /* Additional Ethernet-related overhead used by some ISPs */
346 + } else if (strcmp(*argv, "ether-vlan") == 0) {
347 + /* 802.1q VLAN tag - may be repeated */
349 + overhead_set = true;
352 + * DOCSIS cable shapers account for Ethernet frame with FCS,
353 + * but not interframe gap nor preamble.
355 + } else if (strcmp(*argv, "docsis") == 0) {
358 + overhead_set = true;
361 + } else if (strcmp(*argv, "overhead") == 0) {
364 + overhead = strtol(*argv, &p, 10);
365 + if(!p || *p || !*argv || overhead < -64 || overhead > 256) {
366 + fprintf(stderr, "Illegal \"overhead\", valid range is -64 to 256\\n");
369 + overhead_set = true;
371 + } else if (strcmp(*argv, "mpu") == 0) {
374 + mpu = strtol(*argv, &p, 10);
375 + if(!p || *p || !*argv || mpu < 0 || mpu > 256) {
376 + fprintf(stderr, "Illegal \"mpu\", valid range is 0 to 256\\n");
380 + } else if (strcmp(*argv, "memlimit") == 0) {
382 + if(get_size(&memlimit, *argv)) {
383 + fprintf(stderr, "Illegal value for \"memlimit\": \"%s\"\n", *argv);
387 + } else if (strcmp(*argv, "help") == 0) {
391 + fprintf(stderr, "What is \"%s\"?\n", *argv);
398 + tail = NLMSG_TAIL(n);
399 + addattr_l(n, 1024, TCA_OPTIONS, NULL, 0);
400 + if (bandwidth || unlimited)
401 + addattr_l(n, 1024, TCA_CAKE_BASE_RATE, &bandwidth, sizeof(bandwidth));
403 + addattr_l(n, 1024, TCA_CAKE_DIFFSERV_MODE, &diffserv, sizeof(diffserv));
405 + addattr_l(n, 1024, TCA_CAKE_ATM, &atm, sizeof(atm));
406 + if (flowmode != -1)
407 + addattr_l(n, 1024, TCA_CAKE_FLOW_MODE, &flowmode, sizeof(flowmode));
409 + addattr_l(n, 1024, TCA_CAKE_OVERHEAD, &overhead, sizeof(overhead));
410 + if (overhead_override) {
412 + addattr_l(n, 1024, TCA_CAKE_ETHERNET, &zero, sizeof(zero));
415 + addattr_l(n, 1024, TCA_CAKE_MPU, &mpu, sizeof(mpu));
417 + addattr_l(n, 1024, TCA_CAKE_RTT, &interval, sizeof(interval));
419 + addattr_l(n, 1024, TCA_CAKE_TARGET, &target, sizeof(target));
420 + if (autorate != -1)
421 + addattr_l(n, 1024, TCA_CAKE_AUTORATE, &autorate, sizeof(autorate));
423 + addattr_l(n, 1024, TCA_CAKE_MEMORY, &memlimit, sizeof(memlimit));
425 + addattr_l(n, 1024, TCA_CAKE_NAT, &nat, sizeof(nat));
427 + addattr_l(n, 1024, TCA_CAKE_WASH, &wash, sizeof(wash));
429 + tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
434 +static int cake_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
436 + struct rtattr *tb[TCA_CAKE_MAX + 1];
437 + unsigned bandwidth = 0;
438 + unsigned diffserv = 0;
439 + unsigned flowmode = 0;
440 + unsigned interval = 0;
441 + unsigned memlimit = 0;
455 + parse_rtattr_nested(tb, TCA_CAKE_MAX, opt);
457 + if (tb[TCA_CAKE_BASE_RATE] &&
458 + RTA_PAYLOAD(tb[TCA_CAKE_BASE_RATE]) >= sizeof(__u32)) {
459 + bandwidth = rta_getattr_u32(tb[TCA_CAKE_BASE_RATE]);
461 + fprintf(f, "bandwidth %s ", sprint_rate(bandwidth, b1));
463 + fprintf(f, "unlimited ");
465 + if (tb[TCA_CAKE_AUTORATE] &&
466 + RTA_PAYLOAD(tb[TCA_CAKE_AUTORATE]) >= sizeof(__u32)) {
467 + autorate = rta_getattr_u32(tb[TCA_CAKE_AUTORATE]);
469 + fprintf(f, "autorate_ingress ");
471 + fprintf(f, "(?autorate?) ");
473 + if (tb[TCA_CAKE_DIFFSERV_MODE] &&
474 + RTA_PAYLOAD(tb[TCA_CAKE_DIFFSERV_MODE]) >= sizeof(__u32)) {
475 + diffserv = rta_getattr_u32(tb[TCA_CAKE_DIFFSERV_MODE]);
478 + fprintf(f, "besteffort ");
481 + fprintf(f, "precedence ");
484 + fprintf(f, "diffserv8 ");
487 + fprintf(f, "diffserv4 ");
490 + fprintf(f, "diffserv-llt ");
493 + fprintf(f, "diffserv3 ");
496 + fprintf(f, "(?diffserv?) ");
500 + if (tb[TCA_CAKE_FLOW_MODE] &&
501 + RTA_PAYLOAD(tb[TCA_CAKE_FLOW_MODE]) >= sizeof(__u32)) {
502 + flowmode = rta_getattr_u32(tb[TCA_CAKE_FLOW_MODE]);
503 + nat = !!(flowmode & 64);
507 + fprintf(f, "flowblind ");
510 + fprintf(f, "srchost ");
513 + fprintf(f, "dsthost ");
516 + fprintf(f, "hosts ");
519 + fprintf(f, "flows ");
522 + fprintf(f, "dual-srchost ");
525 + fprintf(f, "dual-dsthost ");
528 + fprintf(f, "triple-isolate ");
531 + fprintf(f, "(?flowmode?) ");
536 + fprintf(f, "nat ");
538 + if (tb[TCA_CAKE_WASH] &&
539 + RTA_PAYLOAD(tb[TCA_CAKE_WASH]) >= sizeof(__u32)) {
540 + wash = rta_getattr_u32(tb[TCA_CAKE_WASH]);
542 + if (tb[TCA_CAKE_ATM] &&
543 + RTA_PAYLOAD(tb[TCA_CAKE_ATM]) >= sizeof(__u32)) {
544 + atm = rta_getattr_u32(tb[TCA_CAKE_ATM]);
546 + if (tb[TCA_CAKE_OVERHEAD] &&
547 + RTA_PAYLOAD(tb[TCA_CAKE_OVERHEAD]) >= sizeof(__u32)) {
548 + overhead = rta_getattr_u32(tb[TCA_CAKE_OVERHEAD]);
550 + if (tb[TCA_CAKE_MPU] &&
551 + RTA_PAYLOAD(tb[TCA_CAKE_MPU]) >= sizeof(__u32)) {
552 + mpu = rta_getattr_u32(tb[TCA_CAKE_MPU]);
554 + if (tb[TCA_CAKE_ETHERNET] &&
555 + RTA_PAYLOAD(tb[TCA_CAKE_ETHERNET]) >= sizeof(__u32)) {
556 + ethernet = rta_getattr_u32(tb[TCA_CAKE_ETHERNET]);
558 + if (tb[TCA_CAKE_RTT] &&
559 + RTA_PAYLOAD(tb[TCA_CAKE_RTT]) >= sizeof(__u32)) {
560 + interval = rta_getattr_u32(tb[TCA_CAKE_RTT]);
564 + fprintf(f,"wash ");
567 + fprintf(f, "rtt %s ", sprint_time(interval, b2));
569 + if (!atm && overhead == ethernet) {
570 + fprintf(f, "raw ");
573 + fprintf(f, "atm ");
575 + fprintf(f, "ptm ");
577 + fprintf(f, "noatm ");
579 + fprintf(f, "overhead %d ", overhead);
581 + // This is actually the *amount* of automatic compensation, but we only report
582 + // its presence as a boolean for now.
584 + fprintf(f, "via-ethernet ");
588 + fprintf(f, "mpu %d ", mpu);
592 + fprintf(f, "memlimit %s", sprint_size(memlimit, b1));
597 +static int cake_print_xstats(struct qdisc_util *qu, FILE *f,
598 + struct rtattr *xstats)
600 + /* fq_codel stats format borrowed */
601 + struct tc_fq_codel_xstats *st;
602 + struct tc_cake_xstats *stnc;
606 + if (xstats == NULL)
609 + if (RTA_PAYLOAD(xstats) < sizeof(st->type))
612 + st = RTA_DATA(xstats);
613 + stnc = RTA_DATA(xstats);
615 + if (st->type == TCA_FQ_CODEL_XSTATS_QDISC && RTA_PAYLOAD(xstats) >= sizeof(*st)) {
616 + fprintf(f, " maxpacket %u drop_overlimit %u new_flow_count %u ecn_mark %u",
617 + st->qdisc_stats.maxpacket,
618 + st->qdisc_stats.drop_overlimit,
619 + st->qdisc_stats.new_flow_count,
620 + st->qdisc_stats.ecn_mark);
621 + fprintf(f, "\n new_flows_len %u old_flows_len %u",
622 + st->qdisc_stats.new_flows_len,
623 + st->qdisc_stats.old_flows_len);
624 + } else if (st->type == TCA_FQ_CODEL_XSTATS_CLASS && RTA_PAYLOAD(xstats) >= sizeof(*st)) {
625 + fprintf(f, " deficit %d count %u lastcount %u ldelay %s",
626 + st->class_stats.deficit,
627 + st->class_stats.count,
628 + st->class_stats.lastcount,
629 + sprint_time(st->class_stats.ldelay, b1));
630 + if (st->class_stats.dropping) {
631 + fprintf(f, " dropping");
632 + if (st->class_stats.drop_next < 0)
633 + fprintf(f, " drop_next -%s",
634 + sprint_time(-st->class_stats.drop_next, b1));
636 + fprintf(f, " drop_next %s",
637 + sprint_time(st->class_stats.drop_next, b1));
639 + } else if (stnc->version >= 1 && stnc->version < 0xFF
640 + && stnc->max_tins == TC_CAKE_MAX_TINS
641 + && RTA_PAYLOAD(xstats) >= offsetof(struct tc_cake_xstats, capacity_estimate))
645 + if(stnc->version >= 3)
646 + fprintf(f, " memory used: %s of %s\n", sprint_size(stnc->memory_used, b1), sprint_size(stnc->memory_limit, b2));
648 + if(stnc->version >= 2)
649 + fprintf(f, " capacity estimate: %s\n", sprint_rate(stnc->capacity_estimate, b1));
651 + switch(stnc->tin_cnt) {
653 + fprintf(f, " Bulk Best Effort Voice\n");
657 + fprintf(f, " Bulk Best Effort Video Voice\n");
661 + fprintf(f, " Low Loss Best Effort Low Delay Bulk Net Control\n");
666 + for(i=0; i < stnc->tin_cnt; i++)
667 + fprintf(f, " Tin %u", i);
671 + fprintf(f, " thresh ");
672 + for(i=0; i < stnc->tin_cnt; i++)
673 + fprintf(f, "%12s", sprint_rate(stnc->threshold_rate[i], b1));
676 + fprintf(f, " target ");
677 + for(i=0; i < stnc->tin_cnt; i++)
678 + fprintf(f, "%12s", sprint_time(stnc->target_us[i], b1));
681 + fprintf(f, " interval");
682 + for(i=0; i < stnc->tin_cnt; i++)
683 + fprintf(f, "%12s", sprint_time(stnc->interval_us[i], b1));
686 + fprintf(f, " pk_delay");
687 + for(i=0; i < stnc->tin_cnt; i++)
688 + fprintf(f, "%12s", sprint_time(stnc->peak_delay_us[i], b1));
691 + fprintf(f, " av_delay");
692 + for(i=0; i < stnc->tin_cnt; i++)
693 + fprintf(f, "%12s", sprint_time(stnc->avge_delay_us[i], b1));
696 + fprintf(f, " sp_delay");
697 + for(i=0; i < stnc->tin_cnt; i++)
698 + fprintf(f, "%12s", sprint_time(stnc->base_delay_us[i], b1));
701 + fprintf(f, " pkts ");
702 + for(i=0; i < stnc->tin_cnt; i++)
703 + fprintf(f, "%12u", stnc->sent[i].packets);
706 + fprintf(f, " bytes ");
707 + for(i=0; i < stnc->tin_cnt; i++)
708 + fprintf(f, "%12llu", stnc->sent[i].bytes);
711 + fprintf(f, " way_inds");
712 + for(i=0; i < stnc->tin_cnt; i++)
713 + fprintf(f, "%12u", stnc->way_indirect_hits[i]);
716 + fprintf(f, " way_miss");
717 + for(i=0; i < stnc->tin_cnt; i++)
718 + fprintf(f, "%12u", stnc->way_misses[i]);
721 + fprintf(f, " way_cols");
722 + for(i=0; i < stnc->tin_cnt; i++)
723 + fprintf(f, "%12u", stnc->way_collisions[i]);
726 + fprintf(f, " drops ");
727 + for(i=0; i < stnc->tin_cnt; i++)
728 + fprintf(f, "%12u", stnc->dropped[i].packets);
731 + fprintf(f, " marks ");
732 + for(i=0; i < stnc->tin_cnt; i++)
733 + fprintf(f, "%12u", stnc->ecn_marked[i].packets);
736 + fprintf(f, " sp_flows");
737 + for(i=0; i < stnc->tin_cnt; i++)
738 + fprintf(f, "%12u", stnc->sparse_flows[i]);
741 + fprintf(f, " bk_flows");
742 + for(i=0; i < stnc->tin_cnt; i++)
743 + fprintf(f, "%12u", stnc->bulk_flows[i]);
746 + if(stnc->version >= 4) {
747 + fprintf(f, " un_flows");
748 + for(i=0; i < stnc->tin_cnt; i++)
749 + fprintf(f, "%12u", stnc->unresponse_flows[i]);
753 + fprintf(f, " max_len ");
754 + for(i=0; i < stnc->tin_cnt; i++)
755 + fprintf(f, "%12u", stnc->max_skblen[i]);
763 +struct qdisc_util cake_qdisc_util = {
765 + .parse_qopt = cake_parse_opt,
766 + .print_qopt = cake_print_opt,
767 + .print_xstats = cake_print_xstats,