Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Nov 2002 12:23:04 -0800
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        Nate Lawson <nate@root.org>
Cc:        Brooks Davis <brooks@one-eyed-alien.net>, hackers@FreeBSD.ORG
Subject:   Re: [PATCH] switching to if_xname
Message-ID:  <20021101122304.A27263@Odin.AC.HMC.Edu>
In-Reply-To: <Pine.BSF.4.21.0211011156360.97230-100000@root.org>; from nate@root.org on Fri, Nov 01, 2002 at 12:07:05PM -0800
References:  <20021101105423.A9676@Odin.AC.HMC.Edu> <Pine.BSF.4.21.0211011156360.97230-100000@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021101122304.A27263>