Kevin Darbyshire-Bryant <ke...@darbyshire-bryant.me.uk> writes:

> There were some useful stats column re-alignment changes as well,
> wonder if you got those?

Probably not, as that code is not longer directly diff'able,
unfortunately... The json-related changes were fairly intrusive...

Eyeballing the diff, however, I *think* that the column-alignment is the
same...

Ah, great, but some of the calculations also changed :/

Could someone go through the patch below and check which is correct
(the + lines or the - lines), please? + is tc-adv, - is
iproute2-cake-next...

-Toke


@@ -137,8 +139,8 @@ static int cake_parse_opt(struct qdisc_util *qu, int argc, 
char **argv,
                        interval = 1000000;
                        target   =   50000;
                } else if (strcmp(*argv, "interplanetary") == 0) {
-                       interval = 3600000000U;
-                       target   =       5000;
+                       interval = 1000000000;
+                       target   =   50000000;
 
                } else if (strcmp(*argv, "besteffort") == 0) {
                        diffserv = 1;
@@ -241,22 +243,12 @@ static int cake_parse_opt(struct qdisc_util *qu, int 
argc, char **argv,
                /* Typical VDSL2 framing schemes, both over PTM */
                /* PTM has 64b/65b coding which absorbs some bandwidth */
                } else if (strcmp(*argv, "pppoe-ptm") == 0) {
-                       /* 2B PPP + 6B PPPoE + 6B dest MAC + 6B src MAC
-                        * + 2B ethertype + 4B Frame Check Sequence
-                        * + 1B Start of Frame (S) + 1B End of Frame (Ck)
-                        * + 2B TC-CRC (PTM-FCS) = 30B
-                        */
                        atm = 2;
-                       overhead += 30;
+                       overhead += 27;
                        overhead_set = true;
                } else if (strcmp(*argv, "bridged-ptm") == 0) {
-                       /* 6B dest MAC + 6B src MAC + 2B ethertype
-                        * + 4B Frame Check Sequence
-                        * + 1B Start of Frame (S) + 1B End of Frame (Ck)
-                        * + 2B TC-CRC (PTM-FCS) = 22B
-                        */
                        atm = 2;
-                       overhead += 22;
+                       overhead += 19;
                        overhead_set = true;
 
                } else if (strcmp(*argv, "via-ethernet") == 0) {
@@ -269,26 +261,8 @@ static int cake_parse_opt(struct qdisc_util *qu, int argc, 
char **argv,
                         * that automatically, and is thus ignored.
                         *
                         * It would be deleted entirely, but it appears in the
-                        * stats output when the automatic compensation is
-                        * active.
-                        */
-
-               } else if (strcmp(*argv, "total_overhead") == 0) {
-                       /*
-                        * This is the overhead cake accounts for; added here so
-                        * that cake's "tc -s qdisc" output can be directly
-                        * pasted into the tc command to instantate a new cake..
+                        * stats output when the automatic compensation is 
active.
                         */
-                       NEXT_ARG();
-
-               } else if (strcmp(*argv, "hard_header_len") == 0) {
-                       /*
-                        * This is the overhead the kernel automatically
-                        * accounted for; added here so that cake's "tc -s
-                        * qdisc" output can be directly pasted into the tc
-                        * command to instantiate a new cake..
-                        */
-                       NEXT_ARG();
 
                } else if (strcmp(*argv, "ethernet") == 0) {
                        /* ethernet pre-amble & interframe gap & FCS
@@ -376,7 +350,7 @@ static int cake_parse_opt(struct qdisc_util *qu, int argc, 
char **argv,
                addattr_l(n, 1024, TCA_CAKE_OVERHEAD, &overhead, 
sizeof(overhead));
        if (overhead_override) {
                unsigned zero = 0;
-               addattr_l(n, 1024, TCA_CAKE_ETHERNET, &zero, sizeof(zero));
+               addattr_l(n, 1024, TCA_CAKE_RAW, &zero, sizeof(zero));
        }
        if (mpu > 0)
                addattr_l(n, 1024, TCA_CAKE_MPU, &mpu, sizeof(mpu));
@@ -532,9 +508,8 @@ static int cake_print_opt(struct qdisc_util *qu, FILE *f, 
struct rtattr *opt)
            RTA_PAYLOAD(tb[TCA_CAKE_ACK_FILTER]) >= sizeof(__u32)) {
                ack_filter = rta_getattr_u32(tb[TCA_CAKE_ACK_FILTER]);
        }
-       if (tb[TCA_CAKE_ETHERNET] &&
-           RTA_PAYLOAD(tb[TCA_CAKE_ETHERNET]) >= sizeof(__u32)) {
-               ethernet = rta_getattr_u32(tb[TCA_CAKE_ETHERNET]);
+       if (tb[TCA_CAKE_RAW]) {
+               raw = 1;
        }
        if (tb[TCA_CAKE_RTT] &&
            RTA_PAYLOAD(tb[TCA_CAKE_RTT]) >= sizeof(__u32)) {
_______________________________________________
Cake mailing list
Cake@lists.bufferbloat.net
https://lists.bufferbloat.net/listinfo/cake

Reply via email to