From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.toke.dk (mail.toke.dk [IPv6:2001:470:dc45:1000::1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id E25703CB4B for ; Wed, 7 Mar 2018 06:28:29 -0500 (EST) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1520422108; bh=CssBMvsiIrJk5iuVa8hU0Zror++4wbQU8zUpE6xyAoM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=jAmLgNNCoXXZn/o3TorGMGrHHfidycxaMqt3ixpIyzE9FfrcnCj2Jbyw6uxxihSPA gAsaGczgNF540+6FkzYHNjWns5wFLbkVYDzpAobKoEdjA9g72UFIWNSzK9+NvfDC3U dQaS81EKCRjXWNWIDoaKX/SWNOSgepAYbXB8RDlsq8qRf/jlmpfa2HXpplK4oKoah6 1nbMSGqtsHXVvfg61mpmclEdAjcDjjVGXQZa04O7nIZj3OoTRZVXuUSFOq/jqgcStK 5GZNY6/7lnrcYKI2n6tXR2wDgtPdYhl4erGapqLeqSk3i7xaj7+YDUVBi3KY3ERl7+ pIWnRcm7zWl5Q== To: Kevin Darbyshire-Bryant Cc: Jonathan Morton , "cake\@lists.bufferbloat.net" In-Reply-To: <340269AF-2325-4657-8939-5E3195D1C0DC@darbyshire-bryant.me.uk> References: <20180127130542.25817-1-toke@toke.dk> <20180211172618.13297-1-toke@toke.dk> <20180211172618.13297-2-toke@toke.dk> <20180306075616.380a533c@xeon-e3> <87ina9m4up.fsf@toke.dk> <876068nccm.fsf@toke.dk> <0A156FD3-4816-462C-952B-7938EF8C0EA3@gmail.com> <87sh9cl15n.fsf@toke.dk> <879005B6-2334-4F46-9922-4BC2CACBF107@darbyshire-bryant.me.uk> <87vae8yy68.fsf@toke.dk> <87sh9cyxy9.fsf@toke.dk> <340269AF-2325-4657-8939-5E3195D1C0DC@darbyshire-bryant.me.uk> Date: Wed, 07 Mar 2018 12:28:28 +0100 X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87muzkyvj7.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Cake] [PATCH] q_cake: Update xstats format to use per-tin structure X-BeenThere: cake@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Cake - FQ_codel the next generation List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 11:28:30 -0000 Kevin Darbyshire-Bryant 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)) {