From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0084.outbound.protection.outlook.com [104.47.0.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 9C76D3BA8E for ; Mon, 2 Jul 2018 13:12:39 -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=zVvqzXLVK4E46BUklZkmkRuFvcRyBJ4EFW9iWuYUv4g=; b=Aw+ORemHIiW+YJHYlzPEFBmEly4RQrScZeoV+ehKbdMwZOKyGkYkSek75EXhpahFh65NAX3L3w8SxCkqSqHx+5N6dInTSGSCDw6dMwxp7Qim/4hILFQZcCvjKfEEBHzJKCWwYw/FlFowO7NF9mDGQOMZEQJmxYf4tXPNJGAoVyo= Received: from VI1PR07MB4254.eurprd07.prod.outlook.com (20.176.6.147) by VI1PR07MB0943.eurprd07.prod.outlook.com (10.161.110.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.10; Mon, 2 Jul 2018 17:12:37 +0000 Received: from VI1PR07MB4254.eurprd07.prod.outlook.com ([fe80::44fe:35ff:4978:fb9d]) by VI1PR07MB4254.eurprd07.prod.outlook.com ([fe80::44fe:35ff:4978:fb9d%2]) with mapi id 15.20.0930.016; Mon, 2 Jul 2018 17:12:37 +0000 From: Kevin Darbyshire-Bryant To: Pete Heist CC: =?utf-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= , Cake List Subject: Re: [Cake] Cake on openwrt - falling behind Thread-Topic: [Cake] Cake on openwrt - falling behind Thread-Index: AQHUEfzAVn4q46L7QUyKsSBc41C9maR8BF0AgAAXDQCAAA4wgIAAAisA Date: Mon, 2 Jul 2018 17:12:37 +0000 Message-ID: References: <6DF9A5E0-EFD5-4519-9889-BC0A7B9BD48E@darbyshire-bryant.me.uk> <1A8BA286-6B31-4581-86C9-6855AC28C245@heistp.net> <673EAD3F-AB09-4B90-88BB-5DCE0BD65534@heistp.net> <6FE8D434-01BE-41A1-BD6B-EFFD67AC8784@heistp.net> <94C9790F-E9BC-4D59-9845-17C305E4B910@darbyshire-bryant.me.uk> <17AF79A0-0213-44E3-95B9-62795A644A47@heistp.net> <87lgatj13k.fsf@toke.dk> <87fu11ipir.fsf@toke.dk> <8815D90E-DEAB-4211-B4B4-7058178DEA47@heistp.net> In-Reply-To: <8815D90E-DEAB-4211-B4B4-7058178DEA47@heistp.net> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=kevin@darbyshire-bryant.me.uk; x-originating-ip: [90.155.95.206] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR07MB0943; 7:fe+Oh7XRGxbRKx1t6RbEWq+mzaMQ9iVaO9oQ1MGFk16cerKBWUOrvCMrAIhN2XkFbuhh1GJiD3uzmmliuVN4wolqwbggbKhUrxqRJAD6XqsEVSkEX9NUiPfXgLFSiI1+HE7sekQTi/5r71XgaVS1d7Yfu5v364jYfSx5ADbi9xkNN6TmG9exzraHI23OxB0pOA51tXJYrhfBypj0RgubLAtCd7w3VT9V2z5koeAkL/3AIqjQKA/cas6Ld1kTCMWq x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 075a2fcc-bb27-4a87-1b67-08d5e03f02a3 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:VI1PR07MB0943; x-ms-traffictypediagnostic: VI1PR07MB0943: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(17755550239193); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(102415395)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231254)(944501410)(52105095)(10201501046)(93006095)(93001095)(149027)(150027)(6041310)(20161123564045)(2016111802025)(20161123562045)(20161123560045)(20161123558120)(6072148)(6043046)(201708071742011)(7699016); SRVR:VI1PR07MB0943; BCL:0; PCL:0; RULEID:; SRVR:VI1PR07MB0943; x-forefront-prvs: 07215D0470 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(366004)(376002)(346002)(396003)(39830400003)(199004)(189003)(6246003)(33656002)(446003)(6512007)(2616005)(6486002)(476003)(83716003)(26005)(93886005)(102836004)(2906002)(4326008)(53546011)(82746002)(6436002)(2900100001)(11346002)(5250100002)(36756003)(74482002)(186003)(53936002)(6916009)(575784001)(99286004)(486006)(68736007)(14454004)(66066001)(5660300001)(316002)(99936001)(97736004)(105586002)(25786009)(76176011)(305945005)(7736002)(8676002)(229853002)(106356001)(6116002)(54906003)(81156014)(81166006)(3846002)(14444005)(8936002)(86362001)(478600001)(6506007)(256004); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR07MB0943; H:VI1PR07MB4254.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: darbyshire-bryant.me.uk does not designate permitted sender hosts) x-microsoft-antispam-message-info: ky6uG0mJ6NRHoo+g87xIgPWvmBaKGE6UxhQL/xKORt+7iSWBoA1QH2wkC78295ee4fuMTw/BkEZplGBBJnzvCjaPS9CQREk+5tQLUAwWYy9KkWLz4BhOsdCz1GHEaX1ddlcfAiPUK+qhDuj6Ave1Qlxc7mXufVHzvep2E26TOkQoy8cdxhr4xr1Vbfz2DfzmntpI2bLufHaJZM4PQo+c/zg6CDSY7dOva0NKl/xL12VQ/RRtbltdsPqWrMDd44kiSdkm4w/a3sDmF+hARC2SY3lb7FVoKVPs5OTcu19ZGyauJZtIg0aHaFR1IblOJw7RQzRXVbfN67Ge20r0aort7tzeiXVwXBv6V9zATS/WhqI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/signed; boundary="Apple-Mail=_DD9271BB-0670-42D3-BEC2-6366550EE740"; protocol="application/pgp-signature"; micalg=pgp-sha256 MIME-Version: 1.0 X-OriginatorOrg: darbyshire-bryant.me.uk X-MS-Exchange-CrossTenant-Network-Message-Id: 075a2fcc-bb27-4a87-1b67-08d5e03f02a3 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jul 2018 17:12:37.3348 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9151708b-c553-406f-8e56-694f435154a4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB0943 X-List-Received-Date: Mon, 02 Jul 2018 17:12:40 -0000 --Apple-Mail=_DD9271BB-0670-42D3-BEC2-6366550EE740 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 2 Jul 2018, at 18:04, Pete Heist wrote: >=20 >=20 >=20 >> On Jul 2, 2018, at 6:14 PM, Toke H=C3=B8iland-J=C3=B8rgensen = wrote: >>=20 >> Aha! I think I figured out what is going on: >>=20 >> The gen_stats facility will add an nlattr header at the beginning of = the >> qdisc stats, which is the toplevel TLV that contains all stats (and = that >> we put our stats inside). It stores a reference to this header, and = when >> all the per-qdisc callbacks have finished adding their stats, it goes >> back and fixes up the length of the containing header. >>=20 >> The problem is that on architectures that need padding, the padding = TLV >> is added *first*, which means that the nlattr pointer that is stored >> before the callbacks are performed points to the padding TLV and not = the >> stats TLV. And so, when the header is fixed up, the result (from the >> parser's perspective) is just a very big padding TLV. >>=20 >> The options TLV is before the stats TLV, so the bug only occurs if = the >> options happen to have a length that means the stats will need = padding. >> Which is why messing with the number of options "fixes" the bug. >>=20 >> Could you try applying the patch below (to the kernel) and see if = that >> resolves the issue, please? >=20 > Awesome Toke! It looks like from Kevin=E2=80=99s email that it works = for him, but it didn=E2=80=99t work for me the first time around. This = may have to do with how I added the patch as I=E2=80=99m still not that = familiar with OpenWRT=E2=80=99s build system (first kernel patch I = tried). I wasn=E2=80=99t sure if it should go into generic or platform, = for one, so I tried generic=E2=80=A6is that right? >=20 > = sysadmin@rey:~/src/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_ge= neric/linux-4.9.109/patches/generic$ cat 010-gen_stats_fix.patch > --- a/net/core/gen_stats.c > +++ b/net/core/gen_stats.c > @@ -77,8 +77,12 @@ gnet_stats_start_copy_compat(struct sk_b > d->lock =3D lock; > spin_lock_bh(lock); > } > - if (d->tail) > - return gnet_stats_copy(d, type, NULL, 0, padattr); > + if (d->tail) { > + int ret =3D gnet_stats_copy(d, type, NULL, 0, padattr); > + if (!ret) > + d->tail =3D ((struct nlattr = *)skb_tail_pointer(skb)) - 1; > + return ret; > + } >=20 > return 0; > } >=20 generic is where it should go, but what I did was: make package/iproute2/clean make package/kmod-sched-cake/clean - both to be *really* sure they get = rebuilt, shouldn=E2=80=99t be required but!!! make target/linux/{clean,prepare} (this gets the kernel build tree in = a ready to build state with all the openwrt patches) edit build/target_mips34*/linux*/linux*/net/core/genstat.c directly make flash the image - test :-) I assume tha patch has been tried on previously unbroken arch=E2=80=99s = and they remain unb0rked ? Cheers, Kevin D-B 012C ACB2 28C6 C53E 9775 9123 B3A2 389B 9DE2 334A --Apple-Mail=_DD9271BB-0670-42D3-BEC2-6366550EE740 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----- iQIzBAEBCAAdFiEEASyssijGxT6XdZEjs6I4m53iM0oFAls6XQQACgkQs6I4m53i M0quZhAAvaOR1wpecC44MsKae/jFsJTg6CW5xRQeRkNc0ZEzyAAepCBD34O7SETU KmylxGI+5KxruHT9YYel7aHx+OkUTmvnOlKatQWr9NUEnQPPv7hXmXREpqdP+4TM grLBE+qgz3UEhCel5aEzB245MfwdIUjah/ZdzyeF9Urg9RxJL3E2kdUYniND2tGp OQdmaoeET/TPaSsIoR0dcJ0bfSWKLPp0bGjb6sQeyQZUU9KcNkhjoLiaDDKCA5DV KF7s47JF7vb3wa5ZZcuJfD4wrl136MmxcPS+rZIG0zZfOBFf54S1XpST+bVBqng2 wFd6xQ13yhUohg2gnDcl9zrlE+OFRP2GiquGQbW6Do2y2LTv+gsQq+MG39qGCaaK XL6VjlPdnycN8YJDmXDGLopsc5Yc5w1lnM35dmAcps6GavF5BqkDCUbxvc2FB+uy wHC3cza9aUZ4q3EPp5Bu75CfDtU5V6jvf8VQgrXTHQEpGm2urRmVaSGPfKyLf9Kd OWffCf587q8MwmhQHpUNN2foXixJgT/JuuK4S7bjRDOSgm853QX+1zqrIwsRs4Tp uxLnTXmADg/uEjTNdXB0yLvJ1WGZplLrZn+3t0ep6ZzI4rAetG5q86U354ENVmKq KMnSPcyH+V/NiESGDX8pkSO1HlT3IaPy/G9Y2TnpEifrvJrcP44= =ocos -----END PGP SIGNATURE----- --Apple-Mail=_DD9271BB-0670-42D3-BEC2-6366550EE740--