Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jun 2008 19:26:34 +0200
From:      Ivan Voras <ivoras@freebsd.org>
To:        freebsd-stable@freebsd.org
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: AMD Geode LX crypto accelerator (glxsb)
Message-ID:  <g3m20f$99a$1@ger.gmane.org>
In-Reply-To: <20080622170507.5ac469d2@baby-jane-lamaiziere-net.local>
References:  <20080606234135.46144207@baby-jane-lamaiziere-net.local> <20080622170507.5ac469d2@baby-jane-lamaiziere-net.local>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <patfbsd@davenulle.org> 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<FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CLFLUSH,MMX>
   AMD Features=3D0xc0400000<MMX+,3DNow!+,3DNow!>

When loading the driver, it attaches:

Jun 22 18:49:41 ursaminor kernel: cryptosoft0: <software crypto> on=20
motherboard
Jun 22 18:49:41 ursaminor kernel: glxsb0: <AMD Geode LX Security Block=20
(AES-128-CBC,RNG)> 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--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?g3m20f$99a$1>