From owner-freebsd-hackers@FreeBSD.ORG Thu May 22 03:59:28 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 2FCF0106566C for ; Thu, 22 May 2008 03:59:28 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id C9AB48FC19 for ; Thu, 22 May 2008 03:59:27 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m4M3JQj8030132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 21 May 2008 20:19:26 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <4834E63E.10307@freebsd.org> Date: Wed, 21 May 2008 20:19:26 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: Richard van Mansom References: <001001c8bb66$c4713170$4d539450$@net> In-Reply-To: <001001c8bb66$c4713170$4d539450$@net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC--Metrics: ebb.errno.com; whitelist Cc: freebsd-hackers@freebsd.org Subject: Re: Hifn 7955 doesn't work with Freebsd 7.0-release 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: Thu, 22 May 2008 03:59:28 -0000 Richard van Mansom wrote: > Hi, > > I am trying to setup two Soekris 4521 with a minipci vpn1411 (Hi/fn 7955) in > a vpn. > > I understood that the crypto card should automatically work with only three > kernel configuration file modification. > > So I added these three lines > > device crypto > device cryptodev > device hifn > > I tested with openvpn (the one release with pkg_add). I used the default > cipher (I think this is BF-CBC - Blowfish 128 bit). The VPN works but I > didn't notice any difference in performance (with or without the crypto > card). > I also tested the crypto card with AES128 but the performance only got worse > (didn't have a baseline for that one) > > Relevant output: > dmesg | grep hifn > hifn0 mem 0xa0000000-0xa0000fff,0xa0002000-0xa0003fff,0xa0008000-0xa000ffff > irq 10 at device 16.0 on pci0 > hifn0: [ITHREAD] > hifn0: Hifn 7955, rev 0, 32KB dram, pll=0x801 > > dmesg | grep crypto > cryptosoft0: on motherboard > > uname -a > FreeBSD Soekris 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sat May 17 10:53:38 UTC > 2008 root@One:/usr/obj/usr/src/sys/C5 i386 > > Any help would be appreciated > > Unfortunately openssl doesn't use the accelerator by default. This means all apps that use openssl likewise are not automatically accelerated. I suggested a patch but it was not accepted. I can't recall how you force openssl and/or consumers to use the device. If you want to check whether the kernel support is working correctly look in src/tools/tools/crypto for cryptotest and hifnstats. Sam