[Cake] cake xstats structure borken

Dave Taht dave.taht at gmail.com
Sun Nov 22 15:01:10 EST 2015


A) We should switch to a TCA_CAKE_XSTATS (losing things like ldelay
and breaking the ABI)
B) I don' think this stuff ever worked, (?) which means breaking the
ABI doesn't matter.

static int cake_print_xstats(struct qdisc_util *qu, FILE *f,
                                 struct rtattr *xstats)
{
        /* fq_codel stats format borrowed */
        struct tc_fq_codel_xstats *st;
        struct tc_cake_xstats     *stnc;
        SPRINT_BUF(b1);
        SPRINT_BUF(b2);
...

       if (st->type == TCA_FQ_CODEL_XSTATS_QDISC &&
RTA_PAYLOAD(xstats) >= sizeof(*st)) {
                fprintf(f, "  maxpacket %u drop_overlimit %u
new_flow_count %u ecn_mark %u",
                        st->qdisc_stats.maxpacket,
                        st->qdisc_stats.drop_overlimit,
                        st->qdisc_stats.new_flow_count,
                        st->qdisc_stats.ecn_mark); // DT> ??
                fprintf(f, "\n  new_flows_len %u old_flows_len %u",
                        st->qdisc_stats.new_flows_len,
                        st->qdisc_stats.old_flows_len);
        } else if (st->type == TCA_FQ_CODEL_XSTATS_CLASS &&
RTA_PAYLOAD(xstats) >= sizeof(*st)) {
                fprintf(f, "  deficit %d count %u lastcount %u ldelay %s",
                        st->class_stats.deficit,
                        st->class_stats.count,
                        st->class_stats.lastcount, // DT> ??
                        sprint_time(st->class_stats.ldelay, b1));
                if (st->class_stats.dropping) {
                        fprintf(f, " dropping");


qdisc fq_codel 8033: root refcnt 2 limit 10240p flows 1024 quantum
1514 target 5.0ms interval 100.0ms ecn
 Sent 1538 bytes 21 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0

DT> What is missing is the equivalent to fq_codel's

  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0

DT> Which you can also see MIA in:

 tc -s class show dev enp3s0

class fq_codel 8035:3f9 parent 8035:
 (dropped 0, overlimits 0 requeues 0)
 backlog 1514b 0p requeues 0
  deficit 1374 count 0 lastcount 0 ldelay 4.3ms
class fq_codel 8035:3fb parent 8035:
 (dropped 0, overlimits 0 requeues 0)
 backlog 1514b 0p requeues 0
  deficit 1374 count 0 lastcount 0 ldelay 4.7ms





Dave Täht
Let's go make home routers and wifi faster! With better software!
https://www.gofundme.com/savewifi



More information about the Cake mailing list