From patchwork Wed Jan 23 08:18:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steffen Klassert X-Patchwork-Id: 214837 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 199552C0084 for ; Wed, 23 Jan 2013 19:19:32 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754123Ab3AWIT3 (ORCPT ); Wed, 23 Jan 2013 03:19:29 -0500 Received: from a.mx.secunet.com ([195.81.216.161]:50720 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754098Ab3AWIT2 (ORCPT ); Wed, 23 Jan 2013 03:19:28 -0500 Received: from localhost (alg1 [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 2D45F1A007F; Wed, 23 Jan 2013 09:19:27 +0100 (CET) X-Virus-Scanned: by secunet Received: from mail-srv1.secumail.de (unknown [10.53.40.200]) by a.mx.secunet.com (Postfix) with ESMTP id 0325E1A0079; Wed, 23 Jan 2013 09:19:25 +0100 (CET) Received: from gauss.dd.secunet.de ([10.182.7.102]) by mail-srv1.secumail.de with Microsoft SMTPSVC(6.0.3790.4675); Wed, 23 Jan 2013 09:19:24 +0100 Received: by gauss.dd.secunet.de (Postfix, from userid 1000) id A2A545C1310; Wed, 23 Jan 2013 09:19:24 +0100 (CET) From: Steffen Klassert To: David Miller Cc: Herbert Xu , Steffen Klassert , netdev@vger.kernel.org Subject: [PATCH 2/8] xfrm_algo: probe asynchronous block ciphers instead of synchronous Date: Wed, 23 Jan 2013 09:18:58 +0100 Message-Id: <1358929144-17806-3-git-send-email-steffen.klassert@secunet.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1358929144-17806-1-git-send-email-steffen.klassert@secunet.com> References: <1358929144-17806-1-git-send-email-steffen.klassert@secunet.com> X-OriginalArrivalTime: 23 Jan 2013 08:19:24.0899 (UTC) FILETIME=[5ABB3B30:01CDF942] Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jussi Kivilinna IPSEC uses block ciphers asynchronous, but probes only for synchronous block ciphers and makes ealg entries only available if synchronous block cipher is found. So with setup, where hardware crypto driver registers asynchronous block ciphers and software crypto module is not build, ealg is not marked as being available. Use crypto_has_ablkcipher instead and remove ASYNC mask. Signed-off-by: Jussi Kivilinna Signed-off-by: Steffen Klassert --- net/xfrm/xfrm_algo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c index 4ce2d93..f9a5495 100644 --- a/net/xfrm/xfrm_algo.c +++ b/net/xfrm/xfrm_algo.c @@ -700,8 +700,7 @@ void xfrm_probe_algs(void) } for (i = 0; i < ealg_entries(); i++) { - status = crypto_has_blkcipher(ealg_list[i].name, 0, - CRYPTO_ALG_ASYNC); + status = crypto_has_ablkcipher(ealg_list[i].name, 0, 0); if (ealg_list[i].available != status) ealg_list[i].available = status; }