From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-x22d.google.com (mail-lf0-x22d.google.com [IPv6:2a00:1450:4010:c07::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id A6C1F3B260 for ; Tue, 27 Sep 2016 19:08:08 -0400 (EDT) Received: by mail-lf0-x22d.google.com with SMTP id b71so37175575lfg.0 for ; Tue, 27 Sep 2016 16:08:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=oztpeRjdNZketb+X+brWSatKgOvgHo+poc4Lvy8Nu1o=; b=LQoFfw+OrxViwJEIAVwLtp8gyfFZUzOcADYphhRnC6QjmbIS1sD18ZO9RbrkrqR88O nn2oLAaVmtL3xKmevNoxPtoC8ennwdZHxlzohnAErMWnKmZyzSgh5FVGl8zjk8FGwU3p 8MDkhPr53yv8z9p8+dUEOj4oTAqSUBTmhe28dZQgZ79y5N6Zrh1Cwkbl6d3zPzUI6U70 QO1PTub3Exfu/Yru43VJDO0xgj8Bp42eHSKvLjnzJG+HoX4S97N2gzYy1hWFeLkDN92S lId5fj11249WuGx+gETh//P1eMW2+KobxQzfRnEM4ILV3pkbs+mFaAUQUGraUxnwevxd ihLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=oztpeRjdNZketb+X+brWSatKgOvgHo+poc4Lvy8Nu1o=; b=VnYiiy+l3QjxQb4uwaL7UpbnCwhT7vLbxSiRNsgjR0xVQvaIRFIcpbxxAZ0LPRenwO SYBMw/SPkw92F/VbBd9ailTpibJqrmkNs7Pv1kxkTcAqZPwrtQ8BfhLvsjH2TcQB5veC qS1KKTH1HVl9sP0+LxVmukcOieoWaEW3ETxm+nWggnXwmNl1bTQ/P4VnpHDrjH4mhFU/ hFnpOWFxTsulbCXtOOXxGxD04ONZ6eEO+fj1gsoD2eaKQFHCNqo0VO6JzhZ1oZYJ1D1m 7E4t2q/8uHnS5Nd3HyHMXV2ypg3f8TF0KAxoDK+9bFI7rlmvvGU8p6tIwK28/f18FGN/ MpJw== X-Gm-Message-State: AE9vXwO4Xhc/B4W4StKxmV282ZJQ1YTl/0DpcPW0dliE7TljsdAXzVVXH+V6eCoCO9oLZQ== X-Received: by 10.25.66.68 with SMTP id p65mr11258860lfa.82.1475017687356; Tue, 27 Sep 2016 16:08:07 -0700 (PDT) Received: from [192.168.100.13] (37-33-90-35.bb.dnainternet.fi. [37.33.90.35]) by smtp.gmail.com with ESMTPSA id u70sm772012lja.15.2016.09.27.16.08.06 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Sep 2016 16:08:06 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) From: Jonathan Morton In-Reply-To: <3a99770e-6350-471f-72b6-b209d7d77d75@darbyshire-bryant.me.uk> Date: Wed, 28 Sep 2016 02:08:04 +0300 Cc: cake@lists.bufferbloat.net Content-Transfer-Encoding: quoted-printable Message-Id: <8425FD26-5C1F-42B5-9087-01D81E1ED7F5@gmail.com> References: <3a99770e-6350-471f-72b6-b209d7d77d75@darbyshire-bryant.me.uk> To: Kevin Darbyshire-Bryant X-Mailer: Apple Mail (2.3124) Subject: Re: [Cake] de-natting & host fairness 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, 27 Sep 2016 23:08:08 -0000 > On 26 Sep, 2016, at 06:20, Kevin Darbyshire-Bryant = wrote: >=20 > Another github user 'tegularius' presented some beautifully crafted = code that did the lookups in a much neater way. Originally it too had = an 'ingress' lookup problem. This was worked on and I hacked some = conditional 'denat' options into cake & tc. >=20 > For your 'delight' a denat cake = https://github.com/kdarbyshirebryant/sch_cake/tree/natoptions along with = a matching tc https://github.com/kdarbyshirebryant/tc-adv/tree/denat As I=E2=80=99m now at the stage of trying to merge this, I=E2=80=99m = going to make some executive design decisions: - De-NAT IPv4 packets only. I think it=E2=80=99s safe to assume that = IPv6 NAT will be rare, and in any case will typically preserve host = distinctions. This eliminates switch blocks in favour of simple if = blocks. - Don=E2=80=99t bother with the distinction between src-NAT and dst-NAT = lookups. The full lookup has to be done anyway and then masked off, the = use-case for the limited functionality is nebulous, and all we=E2=80=99re = doing is adding a lot of nasty conditional branches to the fast path. This in turn reduces the configuration interface for the feature to a = flag, which I=E2=80=99ll call =E2=80=9Cnat=E2=80=9D. - Jonathan Morton