From patchwork Mon Oct 14 06:53:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 176124 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp4131106ill; Sun, 13 Oct 2019 23:56:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqyzTjCaLdz9Q4UBA9BBDP0OKan8TVut2W0w7ZtCIpBmbhuJqLedeOQBmke41nBLDtt94xKM X-Received: by 2002:a50:f742:: with SMTP id j2mr26425091edn.253.1571036208563; Sun, 13 Oct 2019 23:56:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571036208; cv=none; d=google.com; s=arc-20160816; b=Nyo/pCg4CUml0/uvOpKSnq6wJiHjFTf1kzT5xi3+29qM4ifoeaiaTq3lScD6Rb79kQ JaZrg656u01NAVe9+LrzKs8vSmyUmD9EvrjrEzlqZxDZXE+fabpKj3BscMBtw+hu4on3 tz8wbru5L1DJIC1Ucn685EbIVE00focH5cBZQzsJbH9VK7m4amgoYvybuov9uPtMXI/h zZZmBxHEWxPmf4p1YTAZOiR8+wRvpRMQYHZztd/QkI5ljxIxNXogEAGEzgFFkovENHfn 2yw8hozYB3CeIrJRA8D/tWZ5r7twGopFSpsWkAljI7RpJj10vr0ySrHBITqqGMfPdqUK b1eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=0N0JHrCHIHaWBnwXFUKiW38R5fAEER+Or+LvuXwTsWs=; b=QexZcR9GaekeWhHckHzxFRXuHzC9jM5QusDCcVQDzovszDFyeznt82ju2Uwai7e3vY 8efqklIzfuiOUD2Pfy7ZVu1bbeX1/ujiUjopYWssdJu357gryt9hZSxm+6kg62za50EG mjgOUhIiv/0ZxzNC4JQB5SK36Xi6JdgGhFl6WBFMBeafwfVCwqpQSCIwE215hjgMiwcO 5+I7ST0/dk5SB6JqTGPujJ9oJ2yikZdH1xWAzLYPWBJCfutqqEFF2lI8yYy5EuxBYjP4 41tksZR81v82RARhb4fN4IVPMn22ZqoQByQECqM9jm6/5Pki6gDV+QuTwuEFZEpXEpQL b6Qw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id l9si9636565ejx.438.2019.10.13.23.56.48; Sun, 13 Oct 2019 23:56:48 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 716112BF3; Mon, 14 Oct 2019 08:56:24 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 654561C18F; Mon, 14 Oct 2019 08:56:14 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 35A68200011; Mon, 14 Oct 2019 08:56:14 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id E5791200386; Mon, 14 Oct 2019 08:56:11 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 762DB40305; Mon, 14 Oct 2019 14:56:08 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: akhil.goyal@nxp.com, stable@dpdk.org, Vakul Garg Date: Mon, 14 Oct 2019 12:23:23 +0530 Message-Id: <20191014065330.31605-4-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191014065330.31605-1-hemant.agrawal@nxp.com> References: <20191011163233.31017-1-hemant.agrawal@nxp.com> <20191014065330.31605-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 03/10] crypto/dpaa_sec: fix to check for aead as well X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Vakul Garg The code shall also check aead as non auth-cipher case Fixes: 1f14d500bce1 ("crypto/dpaa_sec: support IPsec protocol offload") Cc: stable@dpdk.org Signed-off-by: Vakul Garg --- drivers/crypto/dpaa_sec/dpaa_sec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 38cfdd378..e89cbcefb 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -266,7 +266,8 @@ static inline int is_auth_cipher(dpaa_sec_session *ses) return ((ses->cipher_alg != RTE_CRYPTO_CIPHER_NULL) && (ses->auth_alg != RTE_CRYPTO_AUTH_NULL) && (ses->proto_alg != RTE_SECURITY_PROTOCOL_PDCP) && - (ses->proto_alg != RTE_SECURITY_PROTOCOL_IPSEC)); + (ses->proto_alg != RTE_SECURITY_PROTOCOL_IPSEC) && + (ses->aead_alg == 0)); } static inline int is_proto_ipsec(dpaa_sec_session *ses)