From patchwork Wed Nov 6 05:17:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 178600 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp127159ilf; Tue, 5 Nov 2019 21:21:54 -0800 (PST) X-Google-Smtp-Source: APXvYqw9Zg8WGlrfOLLbi19Dxo+FriX2e5BEz5TKfCtcH6NF7ws9WZVlaCWwOfPUAjCG7TWI4ZQu X-Received: by 2002:aa7:db52:: with SMTP id n18mr614438edt.169.1573017714240; Tue, 05 Nov 2019 21:21:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573017714; cv=none; d=google.com; s=arc-20160816; b=lu7UbCIHKvF/WW5AmcsjWDfdDXHlIJspBL06MT27BJR3PqFcw+GiUPyYNzJ7MLbvSb GgI6PKanZvR0VfLHL/yOz3wYaI5XnzU563kXRoFvYiSNWc0RW8uk/irgdx7YE+Fp1YtT 4M5zlG7bZTh4fjiNSbbnJsSxbnl96tVAuyIkVxzZBD2SScHG43uQhXUARA27gpJpuP7Z lzmLz9uW1UqYiGk27hlUcBeFCx1fVpmEkjLLQcjbcT+oTE/dGMYRD/08GLdct6jpYY+l NHEKkUax4gsEdjm23Cc8oX+GhbrpMWFjimI2FmWkM7wAZTJ347Qrl4OI5upFy6p9528I z5BQ== 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=RF6xKwzimvCMrqQXx0cSy3tMvcoKzICNRJ1XYNucRrI=; b=bd3zy+jvYtbyFt3UqIFy0wZZxywoe0LSxNiYK9dioMO9yHZPhR3Hu0Ii1QfmZfXiXo KI9I0PPs5X5M5Mm5yKDdTeDFzrjSSmNKga9DS8refqvsOQjAzuYUaK/JPZ5HIsGwEvbi BY8B3upvy3fg38olRG703L6n56W4Vvf2td+DrTCrvkV9nnt9ZCN1ypkgGBLiKh+/rov2 5HXzxLCKMkyHz11T5nasyPnHdxIY/wNqspIDN3PtIca0wQpTOOPmRd/jfcKB882wBQGK /533en3l90rckdoTIdKe+YKQn/aft5vQDU6JuuaV5H5/ab+Iz1oPUAAxIjQVmgCeHP+e +EMQ== 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 v1si10669988edm.285.2019.11.05.21.21.54; Tue, 05 Nov 2019 21:21:54 -0800 (PST) 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 F251C1BFE4; Wed, 6 Nov 2019 06:20:56 +0100 (CET) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id A80811BF8F for ; Wed, 6 Nov 2019 06:20:44 +0100 (CET) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 6A3362005A2; Wed, 6 Nov 2019 06:20:44 +0100 (CET) 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 059AC2005A1; Wed, 6 Nov 2019 06:20:43 +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 A8136402E5; Wed, 6 Nov 2019 13:20:39 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: akhil.goyal@nxp.com Date: Wed, 6 Nov 2019 10:47:28 +0530 Message-Id: <20191106051731.3625-10-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191106051731.3625-1-hemant.agrawal@nxp.com> References: <20191101175141.4663-1-hemant.agrawal@nxp.com> <20191106051731.3625-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 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 668832f16..96753caad 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -1582,18 +1582,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,"