From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.toke.dk (mail.toke.dk [52.28.52.200]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 99ADA3B29E for ; Tue, 24 Apr 2018 10:52:59 -0400 (EDT) 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=1524581578; bh=uMixJpEJrAufqqA1MqSHFvkq/RZB5vEmoIVje46xrX8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=G0O6xQfwZNbDufqAsy8r/YjzlVi/fR9lpDKzpLXENlbq+HSjRJnMBNpbj8reuEy5v Rol0XOn+KIr1jyJc2g9V8PWWuVFqXea7GIW/X8Nq+j6Cseenaf32g/FKOKLEAIG4B5 Pis6ZkHW2N6VL4svd7p6ejyUAMGBhSwn1i2zrrsoPKOY8AWFSQ8Njdg5SjGakRgvZc CTcTRk41+Kz5mx4ZWlTZ+EqazFP8JrbaXEMCPefPdEy2pL6i3vwrp7NTapCBPFdZTE TI/Ju2P2ttff5rSwA4AuX6vOntrTpNx0aJnUPZScmqEDeTRsKLujjZJ5K36HJT7828 t2dPBwy0UiRJg== To: Stephen Hemminger Cc: netdev@vger.kernel.org, cake@lists.bufferbloat.net In-Reply-To: <20180424074552.397564a5@xeon-e3> References: <20180424114407.5939-2-toke@toke.dk> <20180424123046.21247-1-toke@toke.dk> <20180424074552.397564a5@xeon-e3> Date: Tue, 24 Apr 2018 16:52:57 +0200 X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87efj47j1y.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Cake] [PATCH iproute2-next v3] Add support for cake qdisc 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: Tue, 24 Apr 2018 14:52:59 -0000 Stephen Hemminger writes: > On Tue, 24 Apr 2018 14:30:46 +0200 > Toke H=C3=B8iland-J=C3=B8rgensen wrote: > >> +static void cake_print_json_tin(struct tc_cake_tin_stats *tst, uint ver= sion) >> +{ >> + open_json_object(NULL); >> + print_uint(PRINT_JSON, "threshold_rate", NULL, tst->threshold_rate); >> + print_uint(PRINT_JSON, "target", NULL, tst->target_us); >> + print_uint(PRINT_JSON, "interval", NULL, tst->interval_us); >> + print_uint(PRINT_JSON, "peak_delay", NULL, tst->peak_delay_us); >> + print_uint(PRINT_JSON, "average_delay", NULL, tst->avge_delay_us); >> + print_uint(PRINT_JSON, "base_delay", NULL, tst->base_delay_us); >> + print_uint(PRINT_JSON, "sent_packets", NULL, tst->sent.packets); >> + print_uint(PRINT_JSON, "sent_bytes", NULL, tst->sent.bytes); >> + print_uint(PRINT_JSON, "way_indirect_hits", NULL, tst->way_indirect_hi= ts); >> + print_uint(PRINT_JSON, "way_misses", NULL, tst->way_misses); >> + print_uint(PRINT_JSON, "way_collisions", NULL, tst->way_collisions); >> + print_uint(PRINT_JSON, "drops", NULL, tst->dropped.packets); >> + print_uint(PRINT_JSON, "ecn_mark", NULL, tst->ecn_marked.packets); >> + print_uint(PRINT_JSON, "ack_drops", NULL, tst->ack_drops.packets); >> + print_uint(PRINT_JSON, "sparse_flows", NULL, tst->sparse_flows); >> + print_uint(PRINT_JSON, "bulk_flows", NULL, tst->bulk_flows); >> + print_uint(PRINT_JSON, "unresponsive_flows", NULL, tst->unresponse_flo= ws); >> + print_uint(PRINT_JSON, "max_pkt_len", NULL, tst->max_skblen); >> + if (version >=3D 0x102) >> + print_uint(PRINT_JSON, "flow_quantum", NULL, tst->flow_quantum); > > Please don't version objects in netlink. That is not how netlink is > supposed to be used. Well, this is leftover from keeping track of different versions of the out-of-tree patch, and we already broke compatibility pretty thoroughly as a preparation for upstreaming. So I'm fine with dropping the version check; will resend. That being said, the versioning comes from the XSTATS API, which does not use netlink attributes for its members, but rather passes through as struct. So what is one supposed to do in this case? -Toke