From owner-freebsd-mips@FreeBSD.ORG Tue Jun 25 17:25:24 2013 Return-Path: Delivered-To: mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7E257F69 for ; Tue, 25 Jun 2013 17:25:24 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-x229.google.com (mail-ie0-x229.google.com [IPv6:2607:f8b0:4001:c03::229]) by mx1.freebsd.org (Postfix) with ESMTP id 524611977 for ; Tue, 25 Jun 2013 17:25:24 +0000 (UTC) Received: by mail-ie0-f169.google.com with SMTP id 10so29270696ied.28 for ; Tue, 25 Jun 2013 10:25:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=4KOl/KpkSI2r0BmQ9QkzPAErbzaDSNblLRdiwjmuuT8=; b=TI5phf5XBDOw5s4M7R/Vvx6lWpLJDe5FxFVckHrmDLdFwvQtq670eZGUBW9NDZ5usi ySGCbN58qrST1xvmOwhnl9F9GEd6dSxGssMtg2YCzBxfX6Zh5JeOViselFKpgYnDLsMC 4hFrA4UZUQOz2Pn7He+qfuX7EITwZyvNd9h4Id+cMtlu3GhTph46zXPVvBhXYoRz48cI KUmkI/mXsO4MqC7Z63QnmPMKZWOxZpZrKossRFGVYVxwW/ElZfPRnBbaxuAYZ1TRv72T HgOrYB1b+rDQtsS7TmpjqUdMdvCsdS1nGm5bWhKgdpg3UIMPlsvq8DDUqKmxlrpVmwBE zX3Q== X-Received: by 10.50.131.137 with SMTP id om9mr9290365igb.1.1372181123724; Tue, 25 Jun 2013 10:25:23 -0700 (PDT) Received: from monkey-bot.int.fusionio.com ([209.117.142.2]) by mx.google.com with ESMTPSA id z15sm2322903igp.0.2013.06.25.10.25.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Jun 2013 10:25:22 -0700 (PDT) Sender: Warner Losh Subject: Re: AES-GCM/Hardware crypto for Octeon Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <51C9BFE6.20701@rewt.org.uk> Date: Tue, 25 Jun 2013 11:25:16 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <51C9BFE6.20701@rewt.org.uk> To: Joe Holden X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQlPhxluIyahEL/L29VK21VFnMXRthyhzQU+t+uc0FL+7BeMPVJuvock9vwC+BTrgsAyGfE+ Cc: "freebsd-mips@FreeBSD.org" X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jun 2013 17:25:24 -0000 On Jun 25, 2013, at 10:05 AM, Joe Holden wrote: > Hi, >=20 > Is the hardware crypto used by OpenCrypto/OpenSSL on the Octeon Plus = range? Other than specifying cryptodev engine, is there a way to make = sure that it's being used? >=20 > Also, according to the Cavium product brief, the coprocessor supports = AES-GCM, I can't work out if it's actually supported in OpenSSL as the = patches seem to be geared towards Intel's hardware assisted variant - is = this supportable on the current tree, or will it require extra = patches/work (perhaps upstream?) The Cavium crypto support is done as part of the open crypto framework. = OpenSSL uses the open crypto framework to offload crypto calculations. = The cavium coprocessor is used inside the open crypto framework in the = kernel. It isn't used like intel's AES instructions in userland. Looking at the code, it appears we'd support using the Cavium = Coprocessor in user space. However, a quick peek at the OpenSSL code in = the tree today suggests that the MIPS optimized versions of the various = crypto functions don't use the cavium coprocessor. I believe Cavium has patches to OpenSSL available on their cnusers.org = web site that could be used to update the code in the FreeBSD tree, but = I haven't looked closely lately at that stuff since the opencrypto = support is plenty fast for my needs. Warner