From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net (shards.monkeyblade.net [184.105.139.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id C29523F232 for ; Sun, 13 May 2018 20:09:54 -0400 (EDT) Received: from localhost (pool-173-77-163-54.nycmny.fios.verizon.net [173.77.163.54]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id D7702136AA448; Sun, 13 May 2018 17:09:52 -0700 (PDT) Date: Sun, 13 May 2018 20:09:48 -0400 (EDT) Message-Id: <20180513.200948.1658763899383204062.davem@davemloft.net> To: toke@toke.dk Cc: netdev@vger.kernel.org, cake@lists.bufferbloat.net From: David Miller In-Reply-To: <152579005972.4805.2514975750552805066.stgit@alrua-kau> References: <152578993399.4805.688094683770472380.stgit@alrua-kau> <152579005972.4805.2514975750552805066.stgit@alrua-kau> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 13 May 2018 17:09:53 -0700 (PDT) Subject: Re: [Cake] [PATCH net-next v9 1/7] sched: Add Common Applications Kept Enhanced (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: Mon, 14 May 2018 00:09:54 -0000 From: Toke H=F8iland-J=F8rgensen Date: Tue, 08 May 2018 16:34:19 +0200 > +struct cake_flow { > + /* this stuff is all needed per-flow at dequeue time */ > + struct sk_buff *head; > + struct sk_buff *tail; Please do not invent your own SKB list handling mechanism. Use a standard sk_buff_head. If you don't need the locking etc., we have interfaces like __skb_queue_head_init(), __skb_insert(), etc. which will accomodate that. > +static void cake_heapify(struct cake_sched_data *q, u16 i) > +{ > + static const u32 a =3D CAKE_MAX_TINS * CAKE_QUEUES; > + u32 m =3D i; > + u32 mb =3D cake_heap_get_backlog(q, m); Please order local variables from longest to shortest line. The entire submissions has this problem all over the place, please correct it patch-series wide. Thank you.