From owner-freebsd-hackers Fri Nov 1 12:23:18 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F2EB37B401 for ; Fri, 1 Nov 2002 12:23:16 -0800 (PST) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12D4B43E4A for ; Fri, 1 Nov 2002 12:23:16 -0800 (PST) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.3/8.12.3) with ESMTP id gA1KN5s7029390; Fri, 1 Nov 2002 12:23:05 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.3/8.12.3/Submit) id gA1KN5ZK029385; Fri, 1 Nov 2002 12:23:05 -0800 Date: Fri, 1 Nov 2002 12:23:04 -0800 From: Brooks Davis To: Nate Lawson Cc: Brooks Davis , hackers@FreeBSD.ORG Subject: Re: [PATCH] switching to if_xname Message-ID: <20021101122304.A27263@Odin.AC.HMC.Edu> References: <20021101105423.A9676@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="IS0zKkzwUGydFO0o" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from nate@root.org on Fri, Nov 01, 2002 at 12:07:05PM -0800 X-Virus-Scanned: by amavisd-milter (http://amavis.org/) on odin.ac.hmc.edu Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --IS0zKkzwUGydFO0o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 01, 2002 at 12:07:05PM -0800, Nate Lawson wrote: > Couple comments. >=20 > * You interchangeably use strlcpy and snprintf(... "%s", ...) and even > strncpy/strcpy(!). You probably want to go with just strlcpy. I forgot to sweep for those again. I'll do another pass shortly. > * There may be some cases where a string compare is too slow and it needs > a unit compare. I'm not familiar with the code that does this but please > comment. The only case I recall where unit compare was really in the fast path was in ipfw. In my change, globing is now a bit more expensive since it uses fnmatch instead of ignoring the unit, but the non-globing case should be pretty much the same if not slightly faster (it no longer has to check the unit and the median length of the compared string will only rise by 1 for every one except tunnel servers). > * Some places seem to still be using a unit number as a local loop > counter. Just curious if this has any side effects. We've got a number of devices that really like to know thier unit number. In those cases, I've generally stuffed it into the softc if it wasn't there already. > * Do the ipfw glob changes break ABI? Yes, but I don't think that's a hugh deal. The bigger deal is breaking the network interface API and ABI which in turn breaks a few user land programs that use libkvm ("netstat -r" for exmaple). That's why this is a .0 feature. Thanks, 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 --IS0zKkzwUGydFO0o Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9wuKmXY6L6fI4GtQRAi3oAKDLtmcDLS5sdEEtMU15+c+abT4hHACfW1BV IOOp1isEKfnTYOSYqrFTWzs= =8phh -----END PGP SIGNATURE----- --IS0zKkzwUGydFO0o-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message