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 573183B29E for ; Sun, 15 Jul 2018 16:23:50 -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=1531686226; bh=/A4oIvQmPQ7n2rtyFl700y0sRMthWzqYqi1QdqZqstI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=YdxaAI6qrJcS02pPaxELEz+tKQxEkIZl6BqLaPpQuSVOLYNYcdNUvXUpc8FbcrGWj I5LsLfgM/++jq9pHW/+eMBqC3hJ8XLXpj3TepXHheuwFl3F212rVdouDxmCPoEzngJ 49k36Ib5Na4yMVJqhzWUIQ00LfK0vce/dw2B8kqJFrCmKUeEYql686gr6ZmFmyql9T rseHJEIiZOVDmGRL/Rq2ZkYdxpEMSsISrLJk1ZnIwr6fMH0YAjs1z4KL4ku2eszWTA Gt7rBvnB/gXvAqW0wf2NiPpjVYJGph2FWHBBJpwdPrdolKx3BicOdNn7am69Hw7GCn kGNXn6upWv+fQ== To: Kevin Darbyshire-Bryant , Jonathan Morton Cc: "cake\@lists.bufferbloat.net" In-Reply-To: <83B2AEF4-C052-444F-8AFA-E8C3EE2F4A7F@darbyshire-bryant.me.uk> References: <8736wla3lq.fsf@toke.dk> <4C12C6A1-84E3-4B78-885F-F5C212CD13FF@darbyshire-bryant.me.uk> <87wotw96el.fsf@toke.dk> <83B2AEF4-C052-444F-8AFA-E8C3EE2F4A7F@darbyshire-bryant.me.uk> Date: Sun, 15 Jul 2018 22:23:43 +0200 X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87wotw6yeo.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Cake] Backporting 'tc class' support 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: Sun, 15 Jul 2018 20:23:50 -0000 Kevin Darbyshire-Bryant writes: >> On 15 Jul 2018, at 10:48, Toke H=C3=B8iland-J=C3=B8rgensen wrote: >>=20 >> Kevin Darbyshire-Bryant writes: >>=20 >>>> On 14 Jul 2018, at 22:50, Toke H=C3=B8iland-J=C3=B8rgensen wrote: >>>>=20 >>>> Now that CAKE has been accepted upstream, I figured it was a good time >>>> to backport the 'tc class' support. So I did, back to kernel v4.9. >>>>=20 >>>> This is in the master branch; anyone feel like testing? With this, the >>>> version of CAKE in the master branch should be identical to the version >>>> that will be in Linux 4.19 :) >>>=20 >>> I need the attached patch to get it to build on openwrt - it looks >>> like an include guard order thing. >>=20 >> Ah, right, thanks! Fixed in master :) > > And now that I=E2=80=99ve run it, with Georgios=E2=80=99 help (I=E2=80=99= ve never played with > tc filters before!) I=E2=80=99ve fallen over a wrinkle: > > So using sqm-scripts I have my standard cake instances on eth0 and > ifb4eth0, both using diffserv3 <<=E2=80=94 diffserv3 is important. This > creates according to tc -s qdisc Bulk, Best Effort & Voice tins. > (where is he going with this?) > > For =E2=80=98fun=E2=80=99 I wanted to classify stuff incoming to my bitto= rrent port as > Bulk. So you=E2=80=99d think that "tc filter add dev ifb4eth0 parent 801= 1: > protocol ip u32 match ip dport 6981 0xffff action skbedit priority > 8011:1=E2=80=9D would do the trick. 8011:1 being the target tin. Whilst > syntactically correct you=E2=80=99d be disappointed by the result > =E2=80=98cos=E2=80=A6..diffserv3 & 4 put the bulk traffic in tin 2 althou= gh tc > displays it as the first tin. Yeah, the tins are displayed in a different order than they are indexed. See the bulk_order and normal_order definitions. Basically, the first two are switched. It's not actually obvious which is the right thing to do here? Use the classifier output as the tin index, or modify it by the tin order... In fact, I'm not quite sure what the purpose of the tin_order is in the first place... Jonathan, care to comment? :) -Toke