From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= Subject: Re: [PATCH iproute2-next v10] Add support for CAKE qdisc Date: Thu, 19 Jul 2018 17:20:09 +0200 Message-ID: <87r2jz2qxi.fsf@toke.dk> References: <20180716163926.4826-1-toke@toke.dk> <87bmb34htz.fsf@toke.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: cake@lists.bufferbloat.net, Dave Taht To: David Ahern , netdev@vger.kernel.org Return-path: Received: from mail.toke.dk ([52.28.52.200]:44215 "EHLO mail.toke.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731567AbeGSQED (ORCPT ); Thu, 19 Jul 2018 12:04:03 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: David Ahern writes: > On 7/19/18 4:53 AM, Toke H=C3=B8iland-J=C3=B8rgensen wrote: >> A few comments below; will fix the rest. >>=20 >>>> + print_uint(PRINT_JSON, "bandwidth", NULL, bandwidth); >>>> + print_string(PRINT_FP, NULL, "bandwidth %s ", sprint_rate(bandwidt= h, b1)); >>>> + } else >>>> + print_string(PRINT_ANY, "bandwidth", "bandwidth %s ", "unlimited"); >>>> + } >>>> + if (tb[TCA_CAKE_AUTORATE] && >>>> + RTA_PAYLOAD(tb[TCA_CAKE_AUTORATE]) >=3D sizeof(__u32)) { >>>> + autorate =3D rta_getattr_u32(tb[TCA_CAKE_AUTORATE]); >>>> + if(autorate =3D=3D 1) >>>> + print_string(PRINT_ANY, "autorate", "autorate_%s ", "ingress"); > > This just caught me eye as well ... why the '_' after autorate? Well, the parameter is called autorate_ingress to make it a single token. When adding JSON support I picked the key/value representation mostly because we could theoretically add other autorate modes in the future (the netlink parameter allows it). -Toke