Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2126072pxb; Sun, 18 Apr 2021 20:03:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHA5JOn1Qm6UUQ2CaH20s3OwNGqagdctGvMDoE3KkmfkT3rhk+AGbxc0sH9W6T+uxG92P6 X-Received: by 2002:aa7:c5c2:: with SMTP id h2mr9038089eds.38.1618801416309; Sun, 18 Apr 2021 20:03:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618801416; cv=none; d=google.com; s=arc-20160816; b=Wl4rptwKCTq13Wvojqci1D4Bq+Am4XlvZB7DMdWdGkizGnTvcgVXYpEbB9XymuLVJu S3TSwPaL+RZSTbmDWngr9kD1jAb9MvDWebDxD/LFy89NBZsXhJpV3YzNJp05udldPnz5 Vyj+Im2tJzxqeO2nzi6QcXLzBcF9jiXuXoSD7pecezW/+N4w67b54z/87LftYo8VKj+j ZJGqj0/HCN73wLf5chCwK3m5qp35gAQgGhLWV4ln1hRC+qvKp5f5zfPBXE5bZJ5uAv7V OnWKCR+OAzu1+rRD6ojH2DYK5n63UCLY2uDTy4UVDGYcWLkU26lDtGuT9lhYhNbWg34J KmMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bqnvfHSQYNF4pvJ4mjc+HwtWh0C16GYEE3A80983hxI=; b=Vo9na+0f/KUiofXCvI8yNP4hs+gXJTepdUBwOfRMNQ2yoBVvzrv1nRyQdrjAh8E/7u x7rnh/JG1wyYmj+7U8RzRVQHO8o+7v9uUw0C5r5uMkm78MFPTZQ9GqeOWpW4Zb3yghOR Fn9kclhEyoApYpEBivgzs+gbedgkf1uA9sjwoKbkF3+9IaqmaogwSbHiNyMKF5Noi0YA 1yqA4KSQWxdf8G5uuLL/Pc+H7PVt+INhZPNG1y6VEoSRe2HQkgicfMf/0hW8Sn76d2DX 994sjsA8JTf7/uB3r9HP2OJ+y1EOh5bTMp4ge/2mXx9eS7MaVuX0kkrqJCum+0lOGHnE GzAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B4ewnibF; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y9si11448790ejq.484.2021.04.18.20.03.13; Sun, 18 Apr 2021 20:03:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B4ewnibF; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237334AbhDSDDk (ORCPT + 99 others); Sun, 18 Apr 2021 23:03:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbhDSDDj (ORCPT ); Sun, 18 Apr 2021 23:03:39 -0400 Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CA02C061761 for ; Sun, 18 Apr 2021 20:03:10 -0700 (PDT) Received: by mail-oi1-x22c.google.com with SMTP id r186so6329491oif.8 for ; Sun, 18 Apr 2021 20:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=bqnvfHSQYNF4pvJ4mjc+HwtWh0C16GYEE3A80983hxI=; b=B4ewnibF9EHh8ijqrdNx6zYdfJy2upFzbtR2KcxcPAQstGakUWk/Rj2RTbP8hpwDKP S5p/gEaCCt5F5PP6blgoi9l7aYSYdCLMVT2aUbmKS6oTuXw9MWycD3P6te4Bf5SDfHB3 bTH5TZmVGW8K8dX3+/6LQh9nr0mNUNlNGZe/VCXInsfmP9Wef4C3W6W5QnHyX/9wIjpK 6tWxkW32M1cJwvRjPTiQ8uxpNgr7UthwhTM7c+qVlC5hCd5zNxKj4kkK66QQDU+cHxpQ 2NbEsKrC4kScpISxzxt93q1I0II0tMchCFdBNSNHE1PPP9hurBVNqe/j28Dyii53pUUr fuCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bqnvfHSQYNF4pvJ4mjc+HwtWh0C16GYEE3A80983hxI=; b=Tvhga5FodcjO/KS5Zfu5O2VKrG4gsqsxFNnOi6k234Vns6eJYoMkkkQGbZoJZx5tfD 47o1rbnn8+zEyeY0LlMDKZ2Y+lSURiKMYTLVfV2oB2sKIczr7NhuqDo1wh2L4mQLhWUn nRheQDSZjsvMpby40c0YQw4qXV6j7mTLFtSNLoTwhvmH7p8ppS4CumG66Le9H1Qt7ul/ MJ7JKAtJB3KzK93mkggH1fyRtmdG71MJTMFI6tgWwT5IcTPdLK88uUdaAjl9dmIa61uv ilHpzyOqpGSqWQdiSm7CLZ2oThxJF+LOfGRIRdO310pWqijidTCOTs9eGoWwIMhDTtJw bjdQ== X-Gm-Message-State: AOAM533Qay9vS0s46ajAt4YcUHCFIUr3JRRfg3eKpFqA/RaJxyPZ0Z2x 6xo/79PQ84t+Et4ntcnI16trHw== X-Received: by 2002:a05:6808:60f:: with SMTP id y15mr13917092oih.23.1618801389231; Sun, 18 Apr 2021 20:03:09 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id h25sm2656856oou.44.2021.04.18.20.03.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Apr 2021 20:03:08 -0700 (PDT) Date: Sun, 18 Apr 2021 22:03:05 -0500 From: Bjorn Andersson To: Thara Gopinath Cc: herbert@gondor.apana.org.au, davem@davemloft.net, ebiggers@google.com, ardb@kernel.org, sivaprak@codeaurora.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [Patch v2 3/7] crypto: qce: Add mode for rfc4309 Message-ID: <20210419030305.GJ1538589@yoga> References: <20210417132503.1401128-1-thara.gopinath@linaro.org> <20210417132503.1401128-4-thara.gopinath@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210417132503.1401128-4-thara.gopinath@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Sat 17 Apr 08:24 CDT 2021, Thara Gopinath wrote: > rf4309 is the specification that uses aes ccm algorithms with IPsec > security packets. Add a submode to identify rfc4309 ccm(aes) algorithm > in the crypto driver. > Reviewed-by: Bjorn Andersson > Signed-off-by: Thara Gopinath > --- > > v1->v2: > - Moved up the QCE_ENCRYPT AND QCE_DECRYPT bit positions so that > addition of other algorithms in future will not affect these > macros. > > drivers/crypto/qce/common.h | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/crypto/qce/common.h b/drivers/crypto/qce/common.h > index 3bc244bcca2d..b135440bf72b 100644 > --- a/drivers/crypto/qce/common.h > +++ b/drivers/crypto/qce/common.h > @@ -51,9 +51,11 @@ > #define QCE_MODE_CCM BIT(12) > #define QCE_MODE_MASK GENMASK(12, 8) > > +#define QCE_MODE_CCM_RFC4309 BIT(13) > + > /* cipher encryption/decryption operations */ > -#define QCE_ENCRYPT BIT(13) > -#define QCE_DECRYPT BIT(14) > +#define QCE_ENCRYPT BIT(30) > +#define QCE_DECRYPT BIT(31) > > #define IS_DES(flags) (flags & QCE_ALG_DES) > #define IS_3DES(flags) (flags & QCE_ALG_3DES) > @@ -73,6 +75,7 @@ > #define IS_CTR(mode) (mode & QCE_MODE_CTR) > #define IS_XTS(mode) (mode & QCE_MODE_XTS) > #define IS_CCM(mode) (mode & QCE_MODE_CCM) > +#define IS_CCM_RFC4309(mode) ((mode) & QCE_MODE_CCM_RFC4309) > > #define IS_ENCRYPT(dir) (dir & QCE_ENCRYPT) > #define IS_DECRYPT(dir) (dir & QCE_DECRYPT) > -- > 2.25.1 >