From owner-freebsd-current@FreeBSD.ORG Sun May 8 10:56:39 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0376D16A4E1 for ; Sun, 8 May 2005 10:56:39 +0000 (GMT) Received: from 62-15-215-178.inversas.jazztel.es (62-15-215-178.inversas.jazztel.es [62.15.215.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D63943D97 for ; Sun, 8 May 2005 10:56:37 +0000 (GMT) (envelope-from josemi@freebsd.jazztel.es) Received: from orion.redesjm.local (orion.redesjm.local [192.168.254.16]) j48AuCeg013249; Sun, 8 May 2005 12:56:12 +0200 (CEST) (envelope-from josemi@freebsd.jazztel.es) Received: from localhost (localhost [[UNIX: localhost]]) by orion.redesjm.local (8.13.3/8.13.3/Submit) id j48Au9ON001109; Sun, 8 May 2005 12:56:09 +0200 (CEST) (envelope-from josemi@freebsd.jazztel.es) X-Authentication-Warning: orion.redesjm.local: josemi set sender to josemi@freebsd.jazztel.es using -f From: Jose M Rodriguez Organization: Redes JM To: Marcel Moolenaar Date: Sun, 8 May 2005 12:56:08 +0200 User-Agent: KMail/1.8 References: <200504261143.55195.josemi@redesjm.local> <426EF6BD.6030207@errno.com> <05b71132f579685de0459a3b762b26b5@xcllnt.net> In-Reply-To: <05b71132f579685de0459a3b762b26b5@xcllnt.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200505081256.09115.josemi@freebsd.jazztel.es> X-AntiVirus: checked by AntiVir Milter (version: 1.1.0-3; AVE: 6.30.0.12; VDF: 6.30.0.161; host: antares.redesjm.local) cc: Sam Leffler cc: freebsd-current@freebsd.org Subject: Re: rigth crc32 implementation X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 May 2005 10:56:39 -0000 El Mi=E9rcoles, 27 de Abril de 2005 04:57, Marcel Moolenaar escribi=F3: > On Apr 26, 2005, at 7:19 PM, Sam Leffler wrote: > > Marcel Moolenaar wrote: > >> On Tue, Apr 26, 2005 at 01:01:32PM -0700, Sam Leffler wrote: > >>> Note also there is CRC32 code of this sort in WEP and TKIP crypto > >>> modules in the net80211 support. > >> > >> Sam, > >> Given the seperation of crc32() into crc32_raw() and crc32(), with > >> either crc32() only or otherwise both functions inlined, are there > >> any obstacles preventing the 802.11 code from using the ones in > >> src/sys/libkern? > > > > The wep+tkip usage is integral to the cipher so splitting it out > > would likely slow them and, more importantly, would also require > > revalidation (there are test vectors but they're pretty limited). > > These modules are self-contained for various reasons so I'm leary > > of switching. > > Understood. Seems like a good reason to leave it as-is. > > > I'll think about adding it under an #ifdef for those that want to > > save 2Kbytes (the size of the crc tables). > > In my book, 2K isn't worth the trouble. > Thanks for the info, After some digging, seems that libkern crc32 is really a ether-II crc=20 implementation, using the reflected tabbed alg. The only difference I found is that the not reflected alg. is more usual=20 and used, at last, in ueagle. Only a latest thing about this rest. Can be crc32_tab and his consumers=20 alter to use a const definition? uint32_t const crc32_tab[] =3D { =2E.. This will stop an ill defined module can alter the shared crc table. Thanks in advance, =2D- josemi