From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4B43C352AA for ; Tue, 1 Oct 2019 11:36:07 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 6991A2133F for ; Tue, 1 Oct 2019 11:36:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6991A2133F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8623E4C9D; Tue, 1 Oct 2019 13:36:06 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id AD84D91 for ; Tue, 1 Oct 2019 13:36:04 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 8596420054C; Tue, 1 Oct 2019 13:36:04 +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 B7C1B2001C2; Tue, 1 Oct 2019 13:36:02 +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 D2643402C7; Tue, 1 Oct 2019 19:35:59 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: jerinj@marvell.com, abhinandan.gujjar@intel.com Date: Tue, 1 Oct 2019 17:03:34 +0530 Message-Id: <20191001113339.21767-1-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo 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" The IV was not set, which was causing HW based SEC on DPAA1 to fail. Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo") Signed-off-by: Hemant Agrawal --- Please squash if possible. app/test/test_event_crypto_adapter.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index 652e458f0..bf83a6357 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -171,6 +171,7 @@ test_op_forward_mode(uint8_t session_less) struct rte_event ev; uint32_t cap; int ret; + uint8_t cipher_key[17]; memset(&m_data, 0, sizeof(m_data)); @@ -186,6 +187,11 @@ test_op_forward_mode(uint8_t session_less) cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC; cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT; + cipher_xform.cipher.key.data = cipher_key; + cipher_xform.cipher.key.length = 16; + cipher_xform.cipher.iv.offset = IV_OFFSET; + cipher_xform.cipher.iv.length = 16; + op = rte_crypto_op_alloc(params.op_mpool, RTE_CRYPTO_OP_TYPE_SYMMETRIC); TEST_ASSERT_NOT_NULL(op, @@ -364,6 +370,7 @@ test_op_new_mode(uint8_t session_less) struct rte_mbuf *m; uint32_t cap; int ret; + uint8_t cipher_key[17]; memset(&m_data, 0, sizeof(m_data)); @@ -379,6 +386,11 @@ test_op_new_mode(uint8_t session_less) cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC; cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT; + cipher_xform.cipher.key.data = cipher_key; + cipher_xform.cipher.key.length = 16; + cipher_xform.cipher.iv.offset = IV_OFFSET; + cipher_xform.cipher.iv.length = 16; + op = rte_crypto_op_alloc(params.op_mpool, RTE_CRYPTO_OP_TYPE_SYMMETRIC); TEST_ASSERT_NOT_NULL(op, "Failed to allocate crypto_op!\n"); -- 2.17.1