From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20059.outbound.protection.outlook.com [40.107.2.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 7F57F3B260 for ; Fri, 1 Jul 2016 04:12:04 -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; bh=fJaV8yZftD198RjVnZqbj263Hbk8pdvZTsScnQ6pjtA=; b=x5i+Pf0K0QR3935Ht58yMkDrCsLotWpi82tyXajt7lBF8e5UJJn2IifaoQAzmU/MaoJaT5ec9U3iQbhOHdSDJ3b2s/o5elDwlANnCVSb2eU3btDP2ak5KHQv+7fXcotOrnj1FwapB5BnnQnVZUoHtugIYS6L52H4N51IWjhKPJM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kevin@darbyshire-bryant.me.uk; Received: from [IPv6:2a02:c7f:1216:da2b::4007:25d] (2a02:c7f:1216:da2b::4007:25d) by DB5PR07MB0936.eurprd07.prod.outlook.com (10.161.200.143) with Microsoft SMTP Server (TLS) id 15.1.523.12; Fri, 1 Jul 2016 08:12:02 +0000 To: References: <57501404.5010704@darbyshire-bryant.me.uk> <6A7C70EE-906E-4624-A84A-645ED4530A07@gmail.com> <5774E766.2050302@darbyshire-bryant.me.uk> <577571C4.2070905@darbyshire-bryant.me.uk> From: Kevin Darbyshire-Bryant Message-ID: <577625C8.2090605@darbyshire-bryant.me.uk> Date: Fri, 1 Jul 2016 09:11:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <577571C4.2070905@darbyshire-bryant.me.uk> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [2a02:c7f:1216:da2b::4007:25d] X-ClientProxiedBy: AM3PR01CA023.eurprd01.prod.exchangelabs.com (10.141.191.13) To DB5PR07MB0936.eurprd07.prod.outlook.com (10.161.200.143) X-MS-Office365-Filtering-Correlation-Id: 9c79c69d-8865-40ab-e129-08d3a18761bd X-Microsoft-Exchange-Diagnostics: 1; DB5PR07MB0936; 2:KVmscr5Mte1EY2D4j19m1UgdMEErD4LqAFmYb8phmO/VEhEnUWgW0TP2rfHJE/+UyLRVwFXztWCUuSWg+1LRZNdZJ3ZE9lGv/wUSmWwpNL+S2dZz2wC2ZfIXBHbN06l5plhkN4SXzy1fgxFKxIXS9V6GkvbXiveUfLy2QhN1MFP7u9BLu6JprRwwWmx7L6Wn; 3:X+Cb1/XDSgyjNnyubLyz0DDefMpS6xiuOzmdJgmdvFBO5UGNOJ3ZIRYBgftHv/6ZaOzs8bMRV5Tht3kAaheJMJgf3H4KqOsm8BBnwd+bEqpO9E7edE5bR/VZGDluS4QU; 25:/BElttR6Dc3OtZFxZNHfCKCkIZYfzmdfMWF+C/902ZoTWmdN3vmQuW7zWHUiaN58swuNGcsq+RoQFOBlSXZ0Qoe3DMo+WsNJc64g4E3Rq9oGyOSf6cqJHKc97m2Nb60DkhvtmiiXPYeQV4V5K6UMvOKDngN8w1VhkJ75xwhmRHcdl6R5/mKh0PhFIZLKlQBSKaWDWBJdIC7OpFzBPsArquZAEWsntaZzDJ6Z14B25cvHd44VmhFP6h7Bw37xpNLuH0DaqpHpAq6qZ2x8hlSe1IrUvEfk0eLJhpRI+pq+Bb1mm4cS3AlybfB04V8MW09CZg7zv+h+wCuyvZrtDX+WKOqbC2MATA1xEpWqC4U+iTg70q7Utmc0zve1j9lqcjBJ+BMuOD4yYdH8Qly5W9Lp+A== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB5PR07MB0936; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040130)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041072)(6043046); SRVR:DB5PR07MB0936; BCL:0; PCL:0; RULEID:; SRVR:DB5PR07MB0936; X-Microsoft-Exchange-Diagnostics: 1; DB5PR07MB0936; 4:UHn6F2DQJhwwXNTVKJG6GEVoCz410YNY/kq9E8hMRz+FL5SMfSIQJErZi62rv5AEUP73ErsW0g0cxkPmfvDKZxSCtb25YwB4Q+liTR7eswwO5tfMzTYCOjm96fMnxssgnviRb0v9NtLwUPNt9bQmwikExEFsVOQQAj7oTNlI5xqXTDLwB3mFfqipp+Hm1vmuWaIRQyYA7go/dDn4tuLS70pN1ixKof+NcjqLieZkyMxtEsV07ufeh6NoI/sh16xB2PB03DZwJ6YVBn/C9kxOn9b2Wtg/7SXZKrKEAzX1ADM8IUeUYv44BjOD8Fh3Rptman1izvbVGBgnLuMzCI5qyd88DqooTtz9jAzU2mL/UEr29y1gieUlGOrnHYh/4kfWvXzdqkqY1bOa9C+z+RKnQQnYjrYVNWT9wjyd1pXnI88= X-Forefront-PRVS: 0990C54589 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(24454002)(189002)(199003)(305945005)(81156014)(2950100001)(77096005)(92566002)(7736002)(2351001)(65806001)(7846002)(6116002)(2906002)(76176999)(189998001)(8676002)(50986999)(54356999)(80316001)(19580405001)(586003)(47776003)(42186005)(101416001)(110136002)(81166006)(107886002)(4001350100001)(87266999)(65956001)(1706002)(97736004)(19580395003)(65816999)(99136001)(59896002)(86362001)(2870700001)(64126003)(83506001)(33656002)(23676002)(93886004)(36756003)(106356001)(50466002)(68736007)(105586002)(450100001)(74482002)(3826002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR07MB0936; H:[IPv6:2a02:c7f:1216:da2b::4007:25d]; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: darbyshire-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FPNHC9/w== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: darbyshire-bryant.me.uk X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2016 08:12:02.0631 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR07MB0936 Subject: Re: [Cake] flow dissector idea/enhancement - help 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: Fri, 01 Jul 2016 08:12:04 -0000 On 30/06/16 20:23, Kevin Darbyshire-Bryant wrote: > > > On 30/06/16 11:27, Jonathan Morton wrote: >>> On 30 Jun, 2016, at 12:33, Kevin Darbyshire-Bryant >>> wrote: >>> >>> +#ifdef CONFIG_NET_SCH_ESFQ_NFCT >>> + enum ip_conntrack_info ctinfo; >>> + struct nf_conn *ct = nf_ct_get(skb, &ctinfo); >>> +#endif >> Good find. If this actually works the way we want it to, it’ll make >> all the host-dependent modes (including triple-isolation) much more >> useful on the outer side of a NAT. >> >> My main concern is that the conntrack state might not be sorted out >> until it hits the firewall or routing logic. I’ll be very pleased if >> it happens sooner, or is actually triggered by the query rather than >> passing to some specific stage of processing. >> >> I have other work to do on the host and flow processing, but I think >> that’ll be independent of the hash function, which is where you want >> to be looking. > I knew I shouldn't have got so excited. It sort of half works-ish. I > hacked something together and then added a few printk statements to > help with debugging. For testing I setup 'dual-dst' on the ifb4wan > (ingress) interface, and set 'dual-src' on the wan4 (egress) > interface. Testing showed the input side of things hadn't got as far > as conntrack association by the time it hit the qdisc. The output > side of things definitely has conntrack associations. They're a bit > strange and I need to do a bit more digging to see if there's anything > useful here, it might be possible to do per host egress fairness. > For reasons I don't understand it looks as though I'm occasionally > seeing the 'reply' conntrack association and not just the > 'incoming'...in other words I'm seeing 'internet' source addresses, > not just internal lan. > > I'm beginning to think there's a reason why enhanced sfq which is > where I found that code never made it upstream :-/ It's been/being > an interesting little diversion...and I've modified a kernel module > that so far doesn't crash :-) > > KDB The brain cell awoke with the thought that 'we don't need all the conntrack info filled in, all we need is to find the conntrack entry matching the src/dst tuple depending on direction. nf_ct_get(skb, &ctinfo) is a function of convenience....we need to do it the inconvenient way. there's gotta be conntrack tuple lookups available and we must have enough info for this as the skb is right there. KDB goes digging. KDB