From owner-freebsd-net@freebsd.org Wed Sep 2 04:50:36 2015 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEF179C8F44 for ; Wed, 2 Sep 2015 04:50:36 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (unknown [IPv6:2602:304:b010:ef20::f2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gw.catspoiler.org", Issuer "gw.catspoiler.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 90C79E2D for ; Wed, 2 Sep 2015 04:50:36 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.15.2/8.15.2) with ESMTP id t824oTKP057556 for ; Tue, 1 Sep 2015 21:50:33 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201509020450.t824oTKP057556@gw.catspoiler.org> Date: Tue, 1 Sep 2015 21:50:29 -0700 (PDT) From: Don Lewis Subject: CoDel and ECN questions To: freebsd-net@FreeBSD.org MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2015 04:50:36 -0000 Bufferbloat on my DSL link to the outside world has been bugging me lately. I was considering adding an OpenWrt box between my DSL modem and my FreeBSD firewall in order to get CoDel, when I discovered that CoDel had been quietly added to FreeBSD 11. Unfortunately the documentation is severely lacking. The ALTQ(4) man page mentions CoDel and points to pfctl(8) and pf.conf(5) for details, but pf.conf(5) discusses cbq, priq, hfsc, and red, but not codel. I'm currently using ipfw and not pf, but it looks like ipfw can connect to altq, so I'm good there. I need to limit bandwidth in both directions, but altq only controls outbound traffic on an interface, which makes sense. If this box was just forwarding packets between two interfaces, I could also use altq on the inward-facing interface to limit download bandwidth to control the queue depth on the ISP side of my DSL link. The problem is that some of the inbound traffic terminates on the firewall box itself, and in the future I may have more than one inside interface. Dummynet is able to control bandwidth in both directions, but it only implements RED and gRED but not CoDel (or at least it's not documented). The OpenWrt implementation can account for extra per-packet overhead in its bandwidth calculations. That could be significant for me because of the additional PPPoE and ATM overhead, which is pretty large for small packets. Do we have anything similar? Can we combine ECN with CoDel? Pf.conf(5) says that ECN implies RED. I'm using 6rd and gif(4) for IPv6 connectivity. Does gif copy the ECN bits when encapsulating and decapsulating packets? According to , Apple has announced that OS X 10.11 and iOS 9 will enable ECN by default. Have we given any thought to changing our default? Linux can control ECN separately for incoming and outgoing connections. It sounds like the default is now to accepting ECN for incoming connections, but not request it for outgoing connections.