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 889BF3CB37 for ; Tue, 8 Jan 2019 04:55:57 -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=1546941355; bh=S6WqPuk+o5HrTtkXMjrB7dxi54+bW61bv4jQFIAdpyA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=t6AbsMP6XxAZ14PV8bDoozh/XoD18PGNbAnLCsSGYOGPJkXY2RmvoTEa83uN2nESq zoP1JYb8IolP4xPogO+6ESqLPA25Xp+4cJw5NZZc52vjF4x2z9kry5j5UM5tJBOkRv L/XbEO/i66Fr+LENC3dgdN2nUtnKB2sQzwS/80HxVngqax8HnxPS1yxtvst87YIXgT Pl2h6CAT5Vu5/yERJJX49XqyANiu52rCo/VSOBpJAGuge4tDW4WEWKH0UxPhmajp3z +7XVWfrvz0xcZqNQ4S5SjVuT31bGRnQ2XFPL8rJznY7APaUrB1+bBeQvt3flZxRRBU pSIexLlox74BA== To: Eric Dumazet , netdev@vger.kernel.org Cc: cake@lists.bufferbloat.net, Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= In-Reply-To: <69d53b63-f7ed-3c6e-f191-43ec7fbd1735@gmail.com> References: <20190107194733.31138-1-toke@toke.dk> <20190107194733.31138-4-toke@toke.dk> <69d53b63-f7ed-3c6e-f191-43ec7fbd1735@gmail.com> Date: Tue, 08 Jan 2019 10:55:51 +0100 X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87zhsbv5g8.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Cake] [PATCH 3/4] sch_api: Allow reducing queue backlog by a negative value 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, 08 Jan 2019 09:55:57 -0000 Eric Dumazet writes: > On 01/07/2019 11:47 AM, Toke H=C3=B8iland-J=C3=B8rgensen wrote: >> From: Toke H=C3=B8iland-J=C3=B8rgensen >>=20 >> With GSO splitting in sch_cake, we can decrease as well as increase the >> qlen. To make it possible to signal this up the qdisc tree, change >> qdisc_tree_reduce_backlog() to accept signed integer values as the number >> of packets and bytes to reduce the backlog by. > > > Not sure why this patch is needed, given we use u32 integers > for q.qlen & qstats.backlog > > 0xFFFFFFFF for n is really -1 once folded... > > sch->q.qlen -=3D n; > sch->qstats.backlog -=3D len; Sure, it works without the patch, but changing to int properly communicates the intent (that negative values are allowed) rather than rely on overflow behaviour... -Toke