From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40051.outbound.protection.outlook.com [40.107.4.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 2F2843B29E for ; Sun, 15 Jul 2018 18:41:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=darbyshire-bryant.me.uk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3iutY1uCZ7cHW25GDxpN+PBoQYyOy4tlM+b1b+W3UcQ=; b=Xi67ibX1GKB01QvmfABTyIOjKhJuXjjhzZg+9D6Cqmiu2IiWXzlf1Jg8c1PmDXGdN7O60VXWMmwUBDIEF49jEq0k/NjR78IhXtT4sb309xy+fAm2lseQQ678k9hH9CR8DE+tw0DfBaqlKCQpc+w9r2yL/VCaenUymliIjNczt/A= Received: from VI1PR07MB4254.eurprd07.prod.outlook.com (20.176.6.147) by VI1PR07MB0798.eurprd07.prod.outlook.com (10.161.107.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.14; Sun, 15 Jul 2018 22:41:34 +0000 Received: from VI1PR07MB4254.eurprd07.prod.outlook.com ([fe80::44fe:35ff:4978:fb9d]) by VI1PR07MB4254.eurprd07.prod.outlook.com ([fe80::44fe:35ff:4978:fb9d%3]) with mapi id 15.20.0973.013; Sun, 15 Jul 2018 22:41:34 +0000 From: Kevin Darbyshire-Bryant To: =?utf-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= CC: Jonathan Morton , "cake@lists.bufferbloat.net" Thread-Topic: [Cake] Backporting 'tc class' support Thread-Index: AQHUG7zFHbVX+wbneUChyvqSQX//XaSPc7GAgACWrACAAK6rgIAAAvGAgAAmg4A= Date: Sun, 15 Jul 2018 22:41:34 +0000 Message-ID: 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> <87wotw6yeo.fsf@toke.dk> In-Reply-To: <87wotw6yeo.fsf@toke.dk> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [193.240.142.133] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR07MB0798; 6:iGmGrvn0oy0OSw7MgYkmcXfNT8xsQUcUrMKBJVlmPu8lLeXhDEZgt6QypbjdPGtD5oBD41axj7xgYz1yAQHS7pzXnwd0Rytt3FjuyD/l+xP881dc0JVFzGO8IiO4ObBXDoNu7wUlRChjpfpN5CTDWaXbc89tpuow1PrK63Y/58Gj6N4oHldDyYHXdP0M+jtOf5BA7erQzX7Hx5E2sQvLF5ryETzoiyLzfQSr2d5z/NgXTP7CbTA3UVEugPQ7APZI2gXRSacJr5GaQgz//lmEfBAoppAXJMxHZRsxewzAMxusJq8EC1MEN25FRLVw7wLX3FA/I2ayphmY3D8JYFki+OUXcpAqE6YtVqrNQN+ka7PX+at96Jmg2oJ2y/NuE/hF1EcdgVesvNKc1jkVyjvzmXj2zLdNgkXYBXSDh1qoSpvJ1cbyTtJybjWXhT5gJl/+uXGejNwLQRhb1feXWZqIqw==; 5:y0zKVpqF/V/kJ41LAuXnFoa4pUY+pbeKDl4/+UJ5FsrvGTnT9Do+58jx9MeAcOPQu2zmzst7dsXuucjfW/8mhzGRTNjVa+Vj84AY0wFUxnAxQuc1rzWX6ByOjL0UkhJgWkz5IvZL7w6V0Rl2FNvyWg4mTi96voCcaskP1xbw3K0=; 7:lDHn+eESQc9ZL+zAM+BM1umvgCsoxQVJJ17hHCWl4XvTsZkd1yTi0x/ksPW3Rjy9h5sRYVAnzbH/3vnu3YxiALnbe7flcjQ+GGWsh99nYiqa42j+imZi7v7ZUn6emzKaqcrcdo3+oZszOX9DUw/j3x0Ow3fUu6sDAovNEbdcsSZmU0DEr+SN6PSFIkvE8OoJzg3DiB1bPPcCMQJPlDcEr59TwcLsOXADKhS2JmlnVddauZC/+zPPcaWlP6XXgRhY x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 03904600-2a34-444d-daa0-08d5eaa41e72 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(7021125)(8989117)(5600053)(711020)(4534165)(7022125)(4603075)(4627221)(201702281549075)(8990107)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(49563074)(7193020); SRVR:VI1PR07MB0798; x-ms-traffictypediagnostic: VI1PR07MB0798: authentication-results: spf=none (sender IP is ) smtp.mailfrom=kevin@darbyshire-bryant.me.uk; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(102415395)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231311)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123562045)(2016111802025)(20161123564045)(20161123560045)(20161123558120)(6072148)(6043046)(201708071742011)(7699016); SRVR:VI1PR07MB0798; BCL:0; PCL:0; RULEID:; SRVR:VI1PR07MB0798; x-forefront-prvs: 07349BFAD2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(396003)(39830400003)(366004)(136003)(189003)(199004)(93886005)(5250100002)(36756003)(105586002)(54906003)(6486002)(33656002)(99936001)(6436002)(229853002)(5660300001)(68736007)(305945005)(316002)(106356001)(6916009)(7736002)(186003)(8676002)(81156014)(81166006)(2906002)(8936002)(74482002)(76176011)(26005)(3846002)(102836004)(53546011)(6512007)(39060400002)(99286004)(83716003)(97736004)(4326008)(53936002)(86362001)(25786009)(2616005)(486006)(6246003)(11346002)(446003)(478600001)(256004)(66066001)(5024004)(14454004)(82746002)(14444005)(2900100001)(6506007)(6116002)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR07MB0798; H:VI1PR07MB4254.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: darbyshire-bryant.me.uk does not designate permitted sender hosts) x-microsoft-antispam-message-info: Xtyt+jSqYzxIfAwcJcUOQ92PAl2/SNZjQNsz62WvqKDvlxTKACkgN2KDmYlzSieDa1RhoXvcvP4mGmOYDuo4PdwL1SzYat5BaHQheQI/3susabvkV18iGxqiZb2P6AAQY4n/6yW8DByl4826UX6u9vF1JJI0Z51y+yRXNqT8sn+DkBUH23VJbuqyLS3YpKc01/3geZV8+db+YMPYPl+fgxdrAuC+U2l1asH0HlvBe0/tw6HWYrql27vn6KKjLkfURyOEB8mK3B2xT24qBwD6JR5MT21bfObSgr9ejZSFKMiaObeLh4c+3Ghjr9Czx47pTOxTrqTTwpy3Ng8GjX/baZP+INBt1NlfAFhEuat83HA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/signed; boundary="Apple-Mail=_DB8784C6-7FAF-44E3-8DA4-2BFB8E85658D"; protocol="application/pgp-signature"; micalg=pgp-sha256 MIME-Version: 1.0 X-OriginatorOrg: darbyshire-bryant.me.uk X-MS-Exchange-CrossTenant-Network-Message-Id: 03904600-2a34-444d-daa0-08d5eaa41e72 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jul 2018 22:41:34.7491 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9151708b-c553-406f-8e56-694f435154a4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB0798 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 22:41:38 -0000 --Apple-Mail=_DB8784C6-7FAF-44E3-8DA4-2BFB8E85658D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 15 Jul 2018, at 21:23, Toke H=C3=B8iland-J=C3=B8rgensen = wrote: >=20 > Kevin Darbyshire-Bryant writes: >=20 >>> 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 :) >>=20 >> 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: >>=20 >> 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?) >>=20 >> For =E2=80=98fun=E2=80=99 I wanted to classify stuff incoming to my = bittorrent port as >> Bulk. So you=E2=80=99d think that "tc filter add dev ifb4eth0 parent = 8011: >> 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 = although tc >> displays it as the first tin. >=20 > 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. >=20 > 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=E2=80=A6 IIRC in the old days tin 0 was always a 100% rate tin and bandwidth = usage was charged to all lower tins, thus it would have been a bad idea = to have bulk as being 100% rate, hence the swap for =E2=80=98bulk tin=E2=80= =99 diffserv patterns. That is no longer the case, see commits 423112e, 4f62bd1 and 008a276 at = least :-) AFAICT the tin order makes no difference whatsoever these days, indeed = the dequeue mechanism picks up from the last tin and spins around rather = than starting at either 0 or highest tin each time. >=20 > Jonathan, care to comment? :) >=20 > -Toke --Apple-Mail=_DB8784C6-7FAF-44E3-8DA4-2BFB8E85658D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEASyssijGxT6XdZEjs6I4m53iM0oFAltLzZ0ACgkQs6I4m53i M0rcEBAAtDZ/NYwhODgKgsG05SWEK/mGJm4dK8WKRjJ0vSJVTH92HgRhdmXcHPC6 FwmxzCBin+7jJvlsUE1Gn1MtXlqtjnKD353IdFBVxxFrYckXk0XrUSx1hFZmq9Uk elllQpAzL7unk7S4R71hOfBAfH36CridpFwOjr15aNU4SQPJ/bWzlaagHb3PK6mf iUOXsWqdZXqTbcOdJ6UcQez+0jlgaxtHhw4lebNLWSnK58FuFa+N4fEXxMQ99bU+ NUtiKItJFfRozUnnxVS+LmZj5qp+X5UieHF14sBv/C+YkbfuqzdsHrF27EhMu7CY hxgJ5FmP/J5J5VzF2JDHr9nYpSEHk/AdP3TTzbhR0lC3yE0GlIaYZPaIfzNZs9bv 3bPYR4tMCRpW9Edg+p9GgVGRk6mRscG6A09Bx0GtIAWwHyUYmMGDTnmQ2UokcH0N UVc5YbK9CM2gZcuom48QBfqn5Rqdx9Zt+U9SaXp9WKtUpwzQIbaGAbpRSoT4mxVx Dj0WE/hCvVA1jfLewXQ4jZG4lmZxDrtsAvGsVaEFTNJkvJshoUizTmm4Y7b5IamI w445GqeOC75W0rRlrB235T4F1OIONyrZazWzySup55woIblcVpJY/nNsNGEVI+gH hLboU7GvasHvInaX1NcIVakHJWFUPsxISQagxcQ+M4hyXmO37a8= =P7nw -----END PGP SIGNATURE----- --Apple-Mail=_DB8784C6-7FAF-44E3-8DA4-2BFB8E85658D--