From owner-freebsd-stable@FreeBSD.ORG Sun Jun 22 17:26:52 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E241A106564A for ; Sun, 22 Jun 2008 17:26:51 +0000 (UTC) (envelope-from freebsd-stable@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 6F6378FC15 for ; Sun, 22 Jun 2008 17:26:51 +0000 (UTC) (envelope-from freebsd-stable@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KATKy-0003bv-Eh for freebsd-stable@freebsd.org; Sun, 22 Jun 2008 17:26:48 +0000 Received: from 78-0-84-134.adsl.net.t-com.hr ([78.0.84.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 22 Jun 2008 17:26:48 +0000 Received: from ivoras by 78-0-84-134.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 22 Jun 2008 17:26:48 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-stable@freebsd.org From: Ivan Voras Date: Sun, 22 Jun 2008 19:26:34 +0200 Lines: 138 Message-ID: References: <20080606234135.46144207@baby-jane-lamaiziere-net.local> <20080622170507.5ac469d2@baby-jane-lamaiziere-net.local> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig06F260B25A370E73FBED6C1E" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 78-0-84-134.adsl.net.t-com.hr User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) In-Reply-To: <20080622170507.5ac469d2@baby-jane-lamaiziere-net.local> X-Enigmail-Version: 0.95.6 Sender: news Cc: freebsd-hackers@freebsd.org Subject: Re: AMD Geode LX crypto accelerator (glxsb) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2008 17:26:52 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig06F260B25A370E73FBED6C1E Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Patrick Lamaizi=C3=A8re wrote: > Le Fri, 6 Jun 2008 23:41:35 +0200, > Patrick Lamaizi=C3=A8re a =C3=A9crit : >=20 > Hello, >=20 >> I'm trying to port the glxsb driver from OpenBSD to FreeBSD 7-STABLE >> (via the NetBSD port). >> " The glxsb driver supports the security block of the Geode LX >> series processors. The Geode LX is a member of the AMD Geode family >> of integrated x86 system chips. >> >> Driven by periodic checks for available data from the generator, >> glxsb supplies entropy to the random(4) driver for common usage. >> >> glxsb also supports acceleration of AES-128-CBC operations for >> crypto(4)." >=20 > Well, I hope this is the final version. >=20 > http://user.lamaiziere.net/patrick/glxsb-220608.tar.gz >=20 > I added a patch for FreeBSD 6 but i'am not able to test it. >=20 > On 7-STABLE, I've tested with hundred openssl encryptions and some floo= d > pings under ipsec in the background. Looks good for me. >=20 > If someone can test and review it, it would be cool. Hi, I'm having trouble testing it. My CPU is Geode LX: CPU: Geode(TM) Integrated Processor by AMD PCS (499.91-MHz 586-class CPU)= Origin =3D "AuthenticAMD" Id =3D 0x5a2 Stepping =3D 2 Features=3D0x88a93d AMD Features=3D0xc0400000 When loading the driver, it attaches: Jun 22 18:49:41 ursaminor kernel: cryptosoft0: on=20 motherboard Jun 22 18:49:41 ursaminor kernel: glxsb0: mem 0xe0210000-0xe0213fff irq 11 at device 1.2 on pci0= I have the following klds loaded: 7 1 0xc3819000 4000 glxsb.ko 8 2 0xc389d000 23000 crypto.ko 9 2 0xc38c0000 a000 zlib.ko 10 1 0xc381e000 4000 cryptodev.ko Running openssl speed without cryptodev gives: > openssl speed aes-128-cbc To get the most accurate results, try to run this program when this computer is idle. Doing aes-128 cbc for 3s on 16 size blocks: 1005506 aes-128 cbc's in 0.98= s Doing aes-128 cbc for 3s on 64 size blocks: 262185 aes-128 cbc's in 0.98s= Doing aes-128 cbc for 3s on 256 size blocks: 66055 aes-128 cbc's in 0.97s= Doing aes-128 cbc for 3s on 1024 size blocks: 16680 aes-128 cbc's in 0.98= s Doing aes-128 cbc for 3s on 8192 size blocks: 2086 aes-128 cbc's in 0.98s= OpenSSL 0.9.8e 23 Feb 2007 built on: Tue Apr 15 19:40:37 CEST 2008 options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long)=20 aes(partial) blowfish(idx) compiler: cc available timing options: USE_TOD HZ=3D128 [sysconf value] timing function used: getrusage The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192=20 bytes aes-128 cbc 16465.91k 17171.01k 17422.55k 17486.30k=20 17485.16k But running it with cryptodev gives: > openssl speed aes-128-cbc -engine cryptodev engine "cryptodev" set. To get the most accurate results, try to run this program when this computer is idle. Doing aes-128 cbc for 3s on 16 size blocks: 1007404 aes-128 cbc's in 0.97= s Doing aes-128 cbc for 3s on 64 size blocks: 262177 aes-128 cbc's in 0.98s= Doing aes-128 cbc for 3s on 256 size blocks: 66500 aes-128 cbc's in 0.98s= Doing aes-128 cbc for 3s on 1024 size blocks: 16564 aes-128 cbc's in 0.97= s Doing aes-128 cbc for 3s on 8192 size blocks: 2087 aes-128 cbc's in 0.98s= OpenSSL 0.9.8e 23 Feb 2007 built on: Tue Apr 15 19:40:37 CEST 2008 options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long)=20 aes(partial) blowfish(idx) compiler: cc available timing options: USE_TOD HZ=3D128 [sysconf value] timing function used: getrusage The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192=20 bytes aes-128 cbc 16545.20k 17173.92k 17417.71k 17476.48k=20 17485.82k The results are practically the same. This is on 7-STABLE from April. --------------enig06F260B25A370E73FBED6C1E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIXotLldnAQVacBcgRAhZ9AKCxMMmGoDsLTNDd0JNRUYhQkM807QCg1fAm N5r6ix4mTBMQjbJ+UEKh1vE= =esYz -----END PGP SIGNATURE----- --------------enig06F260B25A370E73FBED6C1E--