From patchwork Fri Nov 1 17:51:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 178327 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp824276ill; Fri, 1 Nov 2019 10:55:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0yIOdDlcjQeK/5LYOnG/kHm8Fqnld3EGGXwdCsL9bAF/aR8s/Dsbg+nAVCW3ojLM1vO9v X-Received: by 2002:a50:8a90:: with SMTP id j16mr14491122edj.283.1572630953960; Fri, 01 Nov 2019 10:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572630953; cv=none; d=google.com; s=arc-20160816; b=brs3Cd48uu9mJgvFZ1jZjHKS/55hHlI9l7HvF4mYO7b4/YrRPP7aMENxC+FTMz5Gpk dNEAETcZktrUCryIdqo6N9AeM0NEhtohuDlpYLDFnNyjFVoJyYEJufTHmbCO56MGCvRi Z8cZdxOPtiEhU10WQutL9ylXF67KdLqdC0eKqYI86YKnIH0aFnWCP2LaPtErsOwf+62x GW0yghHaJ0gQsdigFw1CKoHM4SHfJJIFHNkdMfRFv6YLSLCvEIh6mkLD0opH5jy3s99h cm1Wu2pWxWfFPDPdX3KXcpgGZy+DAfwME5IKQC+yvyefsmp+gduQtN/q+Lw6rL1g7xgL 0x0w== 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:to:from; bh=PbrpdGRHa3koSR9bPPQ5wOIj31lNbPAYZSVHuqt75w4=; b=Xn0ly6WoG1aN502mBYe9P38Ylt2QDZKHB9Y0IuugCw5AgyWzHSMYwRKxdAiggqY5EJ EbSyV1afJvsq1Pk0SSiCIBdx9niEiH8jMN/A+BmepYjaBiwYCSi75OG1XvCx6mRGSAb5 BZfHE/ztCWOPyXGohNeID0MVqrlZWfAI0+jBTZe1NUt0GUO7RThA6XJHkkLiaOOeMF55 ouKOHCjkGqEowh3a+H/VPpkpqD9p2dPl5iSO5Cyljo0Ci//j1rQSfNO7iohLvPmRXn5s Othk9GZleam2v8s3uHvJCqxjPjCEqIYWIJfpY86yIPJhETNX+tWGkbvzyiUIAbrq6avv hL6Q== 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 b19si921030edb.40.2019.11.01.10.55.53; Fri, 01 Nov 2019 10:55:53 -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 0EB9C1E8BD; Fri, 1 Nov 2019 18:55:01 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id ACFB81E868 for ; Fri, 1 Nov 2019 18:54:50 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 9052D1A08A2; Fri, 1 Nov 2019 18:54:50 +0100 (CET) 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 2CCB11A0125; Fri, 1 Nov 2019 18:54:49 +0100 (CET) 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 54BB740328; Sat, 2 Nov 2019 01:54:47 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, akhil.goyal@nxp.com Date: Fri, 1 Nov 2019 23:21:38 +0530 Message-Id: <20191101175141.4663-10-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191101175141.4663-1-hemant.agrawal@nxp.com> References: <20191025083336.24212-1-hemant.agrawal@nxp.com> <20191101175141.4663-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 10/13] crypto/dpaa2_sec: remove unwanted context type check 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: Gagandeep Singh This patch remove redundant checks. Signed-off-by: Gagandeep Singh --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 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 32e6c71a9..4a1887c4c 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -1585,18 +1585,13 @@ sec_fd_to_mbuf(const struct qbman_fd *fd) #ifdef RTE_LIBRTE_SECURITY if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) { - dpaa2_sec_session *sess = (dpaa2_sec_session *) - get_sec_session_private_data(op->sym->sec_session); - if (sess->ctxt_type == DPAA2_SEC_IPSEC || - sess->ctxt_type == DPAA2_SEC_PDCP) { - uint16_t len = DPAA2_GET_FD_LEN(fd); - dst->pkt_len = len; - while (dst->next != NULL) { - len -= dst->data_len; - dst = dst->next; - } - dst->data_len = len; + uint16_t len = DPAA2_GET_FD_LEN(fd); + dst->pkt_len = len; + while (dst->next != NULL) { + len -= dst->data_len; + dst = dst->next; } + dst->data_len = len; } #endif DPAA2_SEC_DP_DEBUG("mbuf %p BMAN buf addr %p,"