From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D5E4A04A2; Tue, 5 Nov 2019 22:23:39 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2DE231BF4E; Tue, 5 Nov 2019 22:23:38 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id D1A7E1BF47; Tue, 5 Nov 2019 22:23:36 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 1DD4C1A057F; Tue, 5 Nov 2019 22:23:36 +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 E531C1A022B; Tue, 5 Nov 2019 22:23:33 +0100 (CET) Received: from GDB1.ap.freescale.net (gdb1.ap.freescale.net [10.232.132.179]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 23071402B4; Wed, 6 Nov 2019 05:23:31 +0800 (SGT) From: Akhil Goyal To: dev@dpdk.org Cc: stable@dpdk.org, hemant.agrawal@nxp.com, Akhil Goyal Date: Wed, 6 Nov 2019 02:37:12 +0530 Message-Id: <20191105210712.14554-1-akhil.goyal@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH] crypto/dpaa2_sec: fix length retreived from hardware 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" FD retreived from SEC after crypto processing provides an updated length of the buffer which need to be updated in mbuf. The difference in length can be negative hence changing diff to int32_t from uint32_t. Fixes: 0a23d4b6f4c2 ("crypto/dpaa2_sec: support protocol offload IPsec") Cc: stable@dpdk.org Signed-off-by: Akhil Goyal --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index add3b9ea6..b04890a48 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -1511,7 +1511,7 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd) { struct rte_crypto_op *op; uint16_t len = DPAA2_GET_FD_LEN(fd); - uint16_t diff = 0; + int16_t diff = 0; dpaa2_sec_session *sess_priv __rte_unused; struct rte_mbuf *mbuf = DPAA2_INLINE_MBUF_FROM_BUF( -- 2.17.1