From owner-freebsd-net@FreeBSD.ORG Tue Jan 25 06:28:26 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8076316A4CE for ; Tue, 25 Jan 2005 06:28:26 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 45BA943D48 for ; Tue, 25 Jan 2005 06:28:26 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j0P6TF5i014407; Mon, 24 Jan 2005 22:29:15 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j0P6TEie014406; Mon, 24 Jan 2005 22:29:14 -0800 Date: Mon, 24 Jan 2005 22:29:14 -0800 From: Brooks Davis To: Boris Kovalenko Message-ID: <20050125062914.GA12771@odin.ac.hmc.edu> References: <41F33E9F.9090301@tagnet.ru> <20050123193711.GB29225@odin.ac.hmc.edu> <41F46C3C.20205@ntmk.ru> <20050124170735.GA26830@odin.ac.hmc.edu> <41F5C802.8010307@ntmk.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline In-Reply-To: <41F5C802.8010307@ntmk.ru> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-net@freebsd.org Subject: Re: [PATCH] 802.1p priority (fixed) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jan 2005 06:28:26 -0000 --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 25, 2005 at 09:16:02AM +0500, Boris Kovalenko wrote: > Hello! >=20 > >by this specific implementation. I'm sure we can keep an interface that > >handles priorities as seperate interfaces, but I'm not sure we'll want > >to do it via the vlan device (attractivly simple though that is.) > > > >This patch appears to be against 4 or 5. In 6 we've largly rewritten > >ifconfig so the patch won't apply. It looks like a simple matter to fix > >this issue. We'll need to commit to 6 before 4 or 5. > > > >I've embeded some comments in the text below. > Ok, so what I should do now? Rewrite patch for 6? Let's get the version for 5 looking good first since we should be able to MFC. We can do the ifconfig part for 6 once that's clean. > >>+ if(tag < 1 || tag > 4094) > >>+ errx(1, "VLAN ID shoud be in range 1..4094"); > > > > > >errx should be fully indented. > What this means? What difference between my errx and this one (from 6)? > errx(1, "must specify both vlan tag and device"); err is indented with a tab and four spaces. It should be indented with two tabs like this: if(tag < 1 || tag > 4094) errx(1, "VLAN ID shoud be in range 1..4094"); > >I know other nearby code does this, but atoi should not be used. It has > >not useful error checking. strtoul should be used instead. > No problem. > >> */ > >>struct vlanreq { > >>- char vlr_parent[IFNAMSIZ]; > >>- u_short vlr_tag; > >>+ char vlr_parent[IFNAMSIZ]; > >>+ u_int16_t vlr_tag; > > > > > >This appears to be a no-op. Is it needed? > Hmm... just to clarify that vlr_tag is 16bit value. If this is=20 > unnecessary I may use u_short. Assuming the code compiles cleanly, let's leave it a u_short in 5. We can change it to a u_int16_t in 6 since I agree that's more precise. Changes to types, even ones that obviously don't do anything tend to make re@ concerned about possible ABI breakage so I'd rather not worry them. I tend to do that enough with my other projects. :) -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --+QahgC5+KEYLbs62 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFB9ec6XY6L6fI4GtQRAifEAJ9NdixDxCTfDOLqFKChbgHG+SxBUgCfcuCs D/gASd/vyIJj1Nj5u26pLNk= =pNkk -----END PGP SIGNATURE----- --+QahgC5+KEYLbs62--