From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 8 11:58:50 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 731811065689; Sun, 8 Jun 2008 11:58:50 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from smtp.lamaiziere.net (net.lamaiziere.net [213.186.42.107]) by mx1.freebsd.org (Postfix) with ESMTP id 1B44A8FC26; Sun, 8 Jun 2008 11:58:50 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from baby-jane.lamaiziere.net (78.6.192-77.rev.gaoland.net [77.192.6.78]) by smtp.lamaiziere.net (Postfix) with ESMTP id C371A1180596; Sun, 8 Jun 2008 13:58:48 +0200 (CEST) Received: from baby-jane-lamaiziere-net.local (localhost [127.0.0.1]) by baby-jane.lamaiziere.net (Postfix) with ESMTP id C54F4440B4C; Sun, 8 Jun 2008 13:58:47 +0200 (CEST) Date: Sun, 8 Jun 2008 13:58:46 +0200 From: Patrick Lamaiziere To: Pawel Jakub Dawidek Message-ID: <20080608135846.45799105@baby-jane-lamaiziere-net.local> In-Reply-To: <20080607041855.GA3462@garage.freebsd.pl> References: <20080606234135.46144207@baby-jane-lamaiziere-net.local> <20080607041855.GA3462@garage.freebsd.pl> Organization: /dave/nulle X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.8; i386-apple-darwin9.2.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org Subject: Re: AMD Geode LX crypto accelerator (glxsb) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jun 2008 11:58:50 -0000 Le Sat, 7 Jun 2008 06:18:55 +0200, Pawel Jakub Dawidek a écrit : > > Well, it seems to work but i've got few problems to test the > > module : > > > > - How check the encryption/decryption ? > > > > Openssl seems ok, i've got quite the same results as NetBSD on a > > Soekris net5501 box. But i must use -engine cryptodev, why ? > > This is ok, as you may not want to use it, right? I think it should be automatic with an option to not use it. Simon replied for this problem. > Try comparing result of openssl encryption with and without '-engine > cryptodev'. Remember to use -nosalt (and maybe -raw) prevent openssl > from putting salt in front of the ciphertext. Thank you. I checked the encryption with and without 'engine cryptodev'. It works \o/ $ openssl enc -e -aes-128-cbc -in file -out file.enc -nosalt -k abcdefhij $ openssl enc -d -aes-128-cbc -in file.enc -out file.dec -nosalt -k abcdefhij $ md5 file file.dec Time to encode a 300 MB file soft : 1m29.72s real, 1m8.74s user, 8.68s sys hard : 42.98s real, 1.80s user, 22.94s sys > > - The driver does a busy wait to check the completion of the > > encryption. I think it would be beter to use the interrupt. I will > > look later. > > I remember looking at that code sometime ago and that bit is really > lame, so lame that I think they would do it in a different way if that > was possible. Maybe it's worth contacting OpenBSD/NetBSD and ask? > There might be a good reason for that. Yes it seems strange, i've sent a mail to the author about this. I've looked the Linux version of the driver and they use a busy wait too. [CUT] > > - Any comment is welcome, this is my first work on a driver. > > Looks good:) I can do a final review and commit once you are done and > if I'll be able to start my Soekris and test it. Thanks. I think it is ok for a review and test, i added the RNG stuff since the last time and a manual page 'glxsb.4' http://user.lamaiziere.net/patrick/glxsb.c http://user.lamaiziere.net/patrick/glxsb.tar.gz (all the module) Regards.