From owner-freebsd-pf@freebsd.org Thu Oct 6 13:37:45 2016 Return-Path: Delivered-To: freebsd-pf@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 EEC7DBE946D for ; Thu, 6 Oct 2016 13:37:45 +0000 (UTC) (envelope-from franco@lastsummer.de) Received: from host64.shmhost.net (unknown [IPv6:2a01:4f8:a0:51d6::108:1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA3F3EB2; Thu, 6 Oct 2016 13:37:45 +0000 (UTC) (envelope-from franco@lastsummer.de) Received: from francos-mbp.homeoffice.local (ipservice-092-208-160-166.092.208.pools.vodafone-ip.de [92.208.160.166]) by host64.shmhost.net (Postfix) with ESMTPSA id CB97682A62; Thu, 6 Oct 2016 15:37:43 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: dscp set/get From: Franco Fichtner In-Reply-To: Date: Thu, 6 Oct 2016 15:37:42 +0200 Cc: Mark Martinec , freebsd-pf@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <57F5D9D2.1060103@norma.perm.ru> <311888F1-3BD6-4C4E-818D-C4A9C00B55ED@FreeBSD.org> To: Kristof Provost X-Mailer: Apple Mail (2.3124) X-Virus-Scanned: clamav-milter 0.99.2 at host64.shmhost.net X-Virus-Status: Clean X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 13:37:46 -0000 > On 06 Oct 2016, at 3:32 PM, Kristof Provost wrote: >=20 > On 6 Oct 2016, at 15:01, Mark Martinec wrote: >> Just adding recognition to a parser for a couple of DSCP constants >> to be mapped to TOS is not the solution. Keep in mind that DSCP >> is a 6-bit field, and TOS is an 8-bit field. The remaining two bits >> are used for ECN (Explicit Congestion Notification). >>=20 >> Setting TOS field with the intention of changing DSCP >> clobbers ECN bits. Pf needs a proper support for DSCP, >> currently it is unusable for this purpose in FreeBSD >> (one can use the PF from OpenBSD). >>=20 >=20 > Hmm, that=E2=80=99s a good point. That's two one-liners, one for set and one for match? Surprised that this wasn't included already. > OpenBSD seem to just always preserve the ECN bits (so there=E2=80=99s = no dscp keyword). > Perhaps we should do the same. I have a full patch for review tonight. Cheers, Franco