From owner-freebsd-drivers@FreeBSD.ORG Fri Apr 21 22:02:19 2006 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE72F16A411; Fri, 21 Apr 2006 22:02:19 +0000 (UTC) (envelope-from wtsai@hifn.com) Received: from outbound2-cpk-R.bigfish.com (outbound-cpk.frontbridge.com [207.46.163.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A25243D53; Fri, 21 Apr 2006 22:02:15 +0000 (GMT) (envelope-from wtsai@hifn.com) Received: from outbound2-cpk.bigfish.com (localhost.localdomain [127.0.0.1]) by outbound2-cpk-R.bigfish.com (Postfix) with ESMTP id B0C5B70A7AD; Fri, 21 Apr 2006 22:01:36 +0000 (UTC) Received: from mail27-cpk-R.bigfish.com (unknown [192.168.21.1]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by outbound2-cpk.bigfish.com (Postfix) with ESMTP id ABA9370A7AA; Fri, 21 Apr 2006 22:01:36 +0000 (UTC) Received: from mail27-cpk.bigfish.com (localhost.localdomain [127.0.0.1]) by mail27-cpk-R.bigfish.com (Postfix) with ESMTP id 5FCB1451D26; Fri, 21 Apr 2006 22:01:36 +0000 (UTC) X-BigFish: VP Received: by mail27-cpk (MessageSwitch) id 1145656896358187_1660; Fri, 21 Apr 2006 22:01:36 +0000 (UCT) Received: from sjcxch03.tbu.com (mailman1.hifn.com [208.10.194.50]) by mail27-cpk.bigfish.com (Postfix) with ESMTP id 2F9AD45128E; Fri, 21 Apr 2006 22:01:34 +0000 (UTC) Received: from sjcxch02.tbu.com ([192.168.1.250]) by sjcxch03.tbu.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 21 Apr 2006 15:01:32 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Fri, 21 Apr 2006 15:01:31 -0700 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Crypto hw acceleration for openssl Thread-Index: AcZljyWQd3+CSNY9Rzy14g5zE4GT6Q== From: "Winston Tsai" To: , X-OriginalArrivalTime: 21 Apr 2006 22:01:32.0677 (UTC) FILETIME=[26781350:01C6658F] Cc: Subject: Crypto hw acceleration for openssl X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 22:02:19 -0000 I got roughly the same performance results when I use the openssl speed test with and without a hifn 7956 cryto card Here's what I did: After the card is plugged in, kldload hifn; kldload cryptodev; I got the message: hifn0 mem 0xfc8f0000-0xfc8f7ffff, 0xfc8f0000-0xfc8f7ffff, 0xfc8f0000-0xfc8f7ffff irg 28 at device 3.0 on pci1 hifn0: Hifn 7956, rev 0, 32KB dram, pll=3D0x800 Then I ran: Openssl speed des-cbc And got the following result: 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 43251.97k 44919.41k 45342.43k 45506.13k 45579.98k Then I did kldunload hifn; kldunload cryptodev and ran the same test again, and got 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 43108.10k 44917.96k 45460.88k 45532.15k 45566.26k Version of FreeBSD is 5.3-RELEASE. I believe both crypto and cryptodev drivers are supported since v5.0. =20 My understanding is that openssl will detect the presence of an accelerator card and use it (via \dev\crypto) instead of the crypto library. Did I miss something here? TIA, Winston