From owner-freebsd-pf@freebsd.org Sat Feb 29 20:10:35 2020 Return-Path: Delivered-To: freebsd-pf@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0EFC62672D2 for ; Sat, 29 Feb 2020 20:10:35 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ultimatedns.net", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VHZx2zpwz4cJQ for ; Sat, 29 Feb 2020 20:10:33 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by udns.ultimatedns.net (8.15.2/8.15.2) with ESMTPS id 01TKAndQ068470 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sat, 29 Feb 2020 12:10:55 -0800 (PST) (envelope-from bsd-lists@BSDforge.com) X-Mailer: Cypht MIME-Version: 1.0 Cc: In-Reply-To: From: Chris Reply-To: bsd-lists@BSDforge.com To: Sean Yeh Subject: Re: ALTQ feature of PF in FreeBSD Date: Sat, 29 Feb 2020 12:10:55 -0800 Message-Id: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 48VHZx2zpwz4cJQ X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of bsd-lists@BSDforge.com has no SPF policy when checking 24.113.41.81) smtp.mailfrom=bsd-lists@BSDforge.com X-Spamd-Result: default: False [-1.07 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[bsd-lists@BSDforge.com]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.70)[-0.700,0]; IP_SCORE(-0.29)[ip: (-0.53), ipnet: 24.113.0.0/16(-0.26), asn: 11404(-0.60), country: US(-0.05)]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[BSDforge.com]; AUTH_NA(1.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.995,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:11404, ipnet:24.113.0.0/16, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.29 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: Sat, 29 Feb 2020 20:10:35 -0000 On Sat, 29 Feb 2020 05:27:42 -0800 Sean Yeh sean=2Eyeh117@gmail=2Ecom said >=20 > On Fri, Feb 28, 2020 at 8:37 PM Chris wrote: >=20 > > On Fri, 28 Feb 2020 15:35:23 -0800 Sean Yeh sean=2Eyeh117@gmail=2Ecom said > > > > > Hi FreeBSD-pf members, > > > > > > I hope you guys are enjoying your weekend! > > > > > > I was wondering if any of you happened to know if the code for the AL= TQ > > > feature of pf could be separated and used for NetBSD's pf function=2E I= 'm > > > currently investigating methods to improve NetBSD's ALTQ feature, whi= ch > > > hasn't been updated in 15+ years: > > > https://wiki=2Enetbsd=2Eorg/projects/project/altq/ > > > > > > According to the man pages of freeBSD's pf function, FreeBSD uses a > > > modified pf of openBSD 4=2E5 pf function=2E Are there any complications t= hat > > > you foresee trying to port FreeBSD's current ALTQ code into NetBSD? > > In all honesty=2E If you have to ask=2E You will likely find it challenging= =2E > > ;) ;) > > But *please* don't let that discourage you! > > If you're a kernel hacker, and or have a good eye for patterns=2E You sho= uld > > be able to find the similarities by different names to match them up=2E > > But that doesn't mean that in the end it'll work=2E I haven't personally > > made any comparisons=2E I'm only familiar with the FreeBSD variety=2E > > > > My 2=C2=A2 FWIW :) > > > > --Chris > > FreeBSD 14=2E0-FUTURE #0=2E000 cray256 > > > > > > > > Thank you for all your help, > > > > > > Sean > -------------------------------------------------- > reflowed for context=2E Because top posting is evil > -------------------------------------------------- >=20 > Hi Chris (and FreeBSD-pf members), >=20 > Thanks for the advice! >=20 > Truth be told, I am quite lost right now=2E But before I give up, could you > please point me in the right direction? >=20 > 1) Figuring out if ALTQ is separable from pf is a little abstract to me=2E > Is there a definitive experiment to perform to answer this question? > Currently, I'm just looking and taking note of the differences between > NetBSD's and FreeBSD's pf/altq code=2E What other steps should I be > taking? First off, let me state=2E That you're intentions are admirable, and what follows is not intended to be denigrating in any way=2E That said; my first statement still holds=2E Many have wanted to take on and make improvements, and changes to the pf(4), and altq(4) source -- more so to pf=2E But quickly discovered the sheer complexity of the routines, and algos of the source=2E I could liken them to crypto routines=2E Many of these were seasoned programmers/hackers=2E So the code is brittle, and resistant to change except to those well familiar=2E If you're the tenacious type, like myself=2E I would say your first step needs to become well familiar with the source=2E Immerse yourself in it=2E You'll quickly discover that you need to become familiar with the kernel source, as well=2E Oh, and you're a net guru=2E Right? ;) I'm serious=2E That's what it's going to take, to have any meaningful conversation regarding the changes you propose -- and I'm happy to have them with you=2E If you want to proceed=2E :) If I haven't scared you off=2E I'll look forward to hearing from you=2E :) --Chris >=20 > 2) What are some indications that a port will fail/work? > When I find a difference between NetBSD's and FreeBSD's code, > I've already discovered several, what questions should I ask myself > to determine whether or not the difference will be an issue or not=2E >=20 > I'm sorry if these questions seem trivial or basic=2E I am truly > appreciative of all your time and help=2E >=20 > Best, >=20 > Sean