From patchwork Fri Oct 11 16:32:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 176006 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp989889ill; Fri, 11 Oct 2019 09:35:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJkHeVEaTbAnw7pv5wVeQKwXzjl10UPcqw4m6Epk0FgN18bs7q8QkHfJqdGXwK7mdTXHXX X-Received: by 2002:a17:907:429c:: with SMTP id ny20mr14401800ejb.234.1570811726244; Fri, 11 Oct 2019 09:35:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570811726; cv=none; d=google.com; s=arc-20160816; b=G0twH8q7WIQWUgMJrlTqbsr8LYQM/NHq17BfAUq4YXz0tQBxKan8PzViK5C2jE28UA xQg694nfMe80+Yjgw61o8HkliuYTVB88Lz9NyOp+BAtGXqTPvBkxPKYkfrIbzQe4Rcnb 6+2LfBW0Esmu9PwU3hGiXPasYp60Zlw60jS0PSHMifyXs7qxzzXvn6sVAI4u3HeKYRNA 0yWid4JwY4ZtFgSLN95fEqiNETtQUUG6PeZ5BfeR51tfh9cVMrM0WrpYNhzy2QO1tcUV MJLSWxeiPjtTgE0ntUGBhv4b0bPxueSqdRZ9TNwEkqjtLtQ0GmvsDVY6FEjUDK6NSZLs EDDw== 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=AmYcF6Sg4m5ra4noiTb1xIoJxeRXQQliBsYimNhchtU=; b=zSZHoNzm7XygHH6BnspTypsXz8BhfZOCHAkc0hcGDdzLF7xsrCRBb4aL5nliUhEfsy lNwCBozjrq907rakT+eYY+63B/7CwgzNoBiHxsEYUeUPZgxUqDlMAWp6cRB7Y0H/cpKR L2Zik9fDHaErVuhIccUvy7fX0HSQ4fnsSxvwfw54wOBKkUrW3UGee2LuTHNwMggL9NDr 3AsI/SeuA2JxybQG+VIuwnm6dPlgjnEbsgij8Uiv0dC4QSIdrgKKwap5VXjXIcqbN22Y cpNHApFUIX/fimLmrpdDJqhlYIKzTB28dcAK66tNmvLsMW+Gp77vwhSk8flwA8weeVO1 szEQ== 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 cw1si5659281ejb.117.2019.10.11.09.35.26; Fri, 11 Oct 2019 09:35:26 -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 BB2FE1EB4B; Fri, 11 Oct 2019 18:35:17 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id CE9921EB41 for ; Fri, 11 Oct 2019 18:35:12 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id B1E5A1A0586; Fri, 11 Oct 2019 18:35:12 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id CD4441A0587; Fri, 11 Oct 2019 18:35:10 +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 C46FE402AE; Sat, 12 Oct 2019 00:35:07 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: akhil.goyal@nxp.com, Hemant Agrawal Date: Fri, 11 Oct 2019 22:02:25 +0530 Message-Id: <20191011163233.31017-3-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191011163233.31017-1-hemant.agrawal@nxp.com> References: <20191011163233.31017-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 02/10] crypto/dpaa2_sec: fix ipv6 support 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" HW PDB Option was being overwritten. Fixes: 53982ba2805d ("crypto/dpaa2_sec: support IPv6 tunnel for protocol offload") Signed-off-by: Hemant Agrawal --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 2ab34a00f..14f0c523c 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -2819,13 +2819,12 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, RTE_SECURITY_IPSEC_SA_DIR_INGRESS) { flc->dhr = SEC_FLC_DHR_INBOUND; memset(&decap_pdb, 0, sizeof(struct ipsec_decap_pdb)); - decap_pdb.options = sizeof(struct ip) << 16; - if (ipsec_xform->options.esn) - decap_pdb.options |= PDBOPTS_ESP_ESN; decap_pdb.options = (ipsec_xform->tunnel.type == RTE_SECURITY_IPSEC_TUNNEL_IPV4) ? sizeof(struct ip) << 16 : sizeof(struct rte_ipv6_hdr) << 16; + if (ipsec_xform->options.esn) + decap_pdb.options |= PDBOPTS_ESP_ESN; session->dir = DIR_DEC; bufsize = cnstr_shdsc_ipsec_new_decap(priv->flc_desc[0].desc, 1, 0, SHR_SERIAL,