From patchwork Tue Oct 1 11:33:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 174834 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp8415503ill; Tue, 1 Oct 2019 04:36:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxGSJuTNvUv4o1QO586DY5eSqQZXJAXFXTjlataE5lI3ICmjVeaDdezH2wiYUjKDzG607U9 X-Received: by 2002:a05:6402:1549:: with SMTP id p9mr25086551edx.221.1569929767585; Tue, 01 Oct 2019 04:36:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569929767; cv=none; d=google.com; s=arc-20160816; b=FvsMSIC9hh5N5GMEDV08HCbH8Mfi/dBkgXqzpIrIFDuGz7g+j+hHI3S3po9ePjgKO4 T7t/Wbl3QTYw1VUb7HBkvCoH7IkFS9vvYNPdOVhkmCZFlcfGBX3/IKs2JXMj/qDW+Ngq giiNCt13oKUeCjgKzcBHeYXDjN45kmEmxaUdcNYTJpQraExscAwgow58IutjVnJ8gV0p KXq6xzJ2be/x3zJy4xIhy9sjnar+4zaaTwrAz8+7L9S/3shBf02oLQNfPYTe7feECy/S 8fvQWL+nIqj1/gRfzQ/MjyAaW367UENLGe9itd1kMpRu//fOGGU3mPEcMDOuNDRHsZ+u Ib3Q== 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:message-id:date:cc:to :from; bh=FR7IsjzP0PelIVmtyAB1b9zXrP7BNLNcMlz9peLri34=; b=DI7Qg1qqnvSgsb5kf6fdECaiWJuHjOtfsqPgsRAYbwuVWIHYrxa/YcXyKFxQn4TSRX evdd4e8ZdNRLerb5A5q/6JR+i85rKipuzlPZ7cuM95NHcUKtd2WdBb+JIfBdj+HDxKHw 5O4G9yFwjaIt27ZRFCUnXwrlhJ8Sbk7OhL9axOVVCZFhqEa4R5Y6sWdCORcMXZhaRgql S0S8e7ppgzLyHkTsuqhBy5r3G/WBDBc9iejatw7WPGwKTj8jxo5amqULgH79PfIgAFd6 6lnoyInM/Sb51mhgBB8zmIk8Y/6eT/n+SnBZuNg7gzTa72LCMwOC/7x68KHjZfk/t5X6 k4kg== 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 z35si9062539edb.146.2019.10.01.04.36.07; Tue, 01 Oct 2019 04:36:07 -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 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(+) -- 2.17.1 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"); From patchwork Tue Oct 1 11:33:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 174835 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp8415632ill; Tue, 1 Oct 2019 04:36:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1nvph680FtLlc9yViVSDwvyo19IXy/UOaEF8DHb21PDPpWqjkasr0gATMmcyER3VrWbIS X-Received: by 2002:a17:906:1c05:: with SMTP id k5mr24001977ejg.286.1569929774928; Tue, 01 Oct 2019 04:36:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569929774; cv=none; d=google.com; s=arc-20160816; b=VdC1+uJbVpYwjk6U3BP/FTxqHKuLEIk4cQOyeJ+U+FVDqaFExEORJsmCSzpll20mRw t5swH2pTrnSnac1tLJ3cwomXtakLOx9NAN2mO5PhvI0vTCsAep05V1ONLkKs8jGp/860 VVqOF/GH+MR4nBYnoFhGVhgcxmLC8PN2aoAp/OSrfMQce7Bn7TR3085u723B57emk2tx VARp7Vsgh+qmkpzT1e3vrGoQlfiZixgdL5SSX0IvVAmCVWnAxdoXZt+3PzoTO7MwDGHW 8m4KYtR39ExPBoWU44Oghb2ODY6+xxNHiJwF6dydMNjS+xJedLjxMnIo7G4xZtrP7Pv9 gxzA== 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=8Gq/Lar+72HJf2SlIWzwNhQMviguUZJtL6KzOkJSUL4=; b=d4mJ1nAR437rENTiXi61rCmUGqIlLMYXkDDmiLYKIFWl5Zp0O1QvI+66bsO5aIo/qp PGppC7quSuQInC8TQPiCV93itGUXTHvaXIRPrd1oLQwAcALhsw3om303EraD8kwKyrGc gOubxgj9+VELZihGa6bjm8oS2M8xl3CPz0PrU9f1SE7yznkxPXKwDVe/ujHu5BvmZqw0 1mr/2o1eEmA2EizMPbcxubp7UTTG3QlelNHxK8vWD+cE1P7NbAFus6AAZuQUjvtZnCb/ gFrCvWBurYhbmOsRNhJK+oqLkOqvrfpXacTpQoFvW8pZbF9toK4WmZL1skC1W53IbMUZ DfiA== 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 d26si9382595eda.190.2019.10.01.04.36.14; Tue, 01 Oct 2019 04:36:14 -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 99EAB5B3A; Tue, 1 Oct 2019 13:36:08 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id B0FAC91 for ; Tue, 1 Oct 2019 13:36:05 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 6E560200540; Tue, 1 Oct 2019 13:36:05 +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 9FBD5200064; Tue, 1 Oct 2019 13:36:03 +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 BA423402DA; Tue, 1 Oct 2019 19:36:00 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: jerinj@marvell.com, abhinandan.gujjar@intel.com Date: Tue, 1 Oct 2019 17:03:35 +0530 Message-Id: <20191001113339.21767-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191001113339.21767-1-hemant.agrawal@nxp.com> References: <20191001113339.21767-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 2/6] test/event_crypto: fix check for HW 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" When HW is available but the mode mismatches, it is better to skip the test case. Fixes: cfe599b325e8 ("test/event_crypto: no service core when HW support available") Signed-off-by: Hemant Agrawal --- please squash if possible. app/test/test_event_crypto_adapter.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 2.17.1 diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index bf83a6357..d3d19b98e 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -302,6 +302,10 @@ test_sessionless_with_op_forward_mode(void) if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) && !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW)) map_adapter_service_core(); + else { + if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD)) + return TEST_SKIPPED; + } TEST_ASSERT_SUCCESS(rte_event_crypto_adapter_start(TEST_ADAPTER_ID), "Failed to start event crypto adapter"); @@ -323,6 +327,10 @@ test_session_with_op_forward_mode(void) if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) && !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW)) map_adapter_service_core(); + else { + if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD)) + return TEST_SKIPPED; + } TEST_ASSERT_SUCCESS(rte_event_crypto_adapter_start(TEST_ADAPTER_ID ), "Failed to start event crypto adapter"); @@ -458,6 +466,10 @@ test_sessionless_with_op_new_mode(void) if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) && !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW)) map_adapter_service_core(); + else { + if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW)) + return TEST_SKIPPED; + } /* start the event crypto adapter */ TEST_ASSERT_SUCCESS(rte_event_crypto_adapter_start(TEST_ADAPTER_ID), @@ -480,6 +492,10 @@ test_session_with_op_new_mode(void) if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) && !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW)) map_adapter_service_core(); + else { + if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW)) + return TEST_SKIPPED; + } TEST_ASSERT_SUCCESS(rte_event_crypto_adapter_start(TEST_ADAPTER_ID), "Failed to start event crypto adapter"); From patchwork Tue Oct 1 11:33:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 174836 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp8415794ill; Tue, 1 Oct 2019 04:36:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqygwm20pyAzQCJhkSXvUC4BMSpztQfCWhYTZhn/6C/khAafHT7XcApqWtKude6Zyx58m0D7 X-Received: by 2002:a17:906:1801:: with SMTP id v1mr7661990eje.146.1569929783174; Tue, 01 Oct 2019 04:36:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569929783; cv=none; d=google.com; s=arc-20160816; b=ea+Dfc/u0n77ZQEkcVrb5D3NGkgzRrc2j0KSIShMqT9d1SMUtOKRQ57bjHUYoJsxqk xH5w/aMrfI+TKDmn+LH/o1a9O2vaKA4ELsMFcIKnPuzmfbdR8GQPbRgT+FAveJ+X7z5N Uin2/tGsuqjFBfdYXnB15+5hSeIYciT0UdOJ4D4ea544TI5uaNPzUH9BttYTRAVxF903 33wMqdtvmgUouVeTPxWcuHN3+qsMOA9J0uiydFFuWgkRU4IneDLk25fOkY6V44q63D4e dTbvc96yxSWPHf90cpGYHHXBup6pe5l3iKS14vyWPmzHHsWvYLT36c91/vg/XVU54DoU k5fA== 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=SirNldMWwB4Vf/RI4a3rU83JbDUuh59bivDmjL5baag=; b=pKxezUl72eQxx7X0JsuMNNXDSSBsLBJAQPxkjsmQ/j1o6Pn1ttkkyKTdNiRtqo18pP WKj475rQUpC1q/QY+cP5BqOp9D3W7Ct9KR4ZHcUoTTN0iqyGsFk4Jl7c0URA2x9yzUYo DIzZMaj9sI0ls+iW5hQbMVOazv+2HREqEYLpx7yJ9mIVwKuM1JcV93wt0QfC13twYXQm weX9PFt6oGdxUXv0ODCJWJYYd/n4vXiidwOFpvbxF7u7gne75xqiNFKrpkd7KWel2AqJ jdJysAcPPLrLYv3o+ItTFlRVaLlt+1OxVxoJKFBdrhdc0v/i0rvro/BG6gxar3MVuRo3 6UYA== 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 d9si8942596edb.371.2019.10.01.04.36.23; Tue, 01 Oct 2019 04:36:23 -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 6441A49DF; Tue, 1 Oct 2019 13:36:10 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 889F658C4; Tue, 1 Oct 2019 13:36:07 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 3ABCD200557; Tue, 1 Oct 2019 13:36:07 +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 191A62001EF; Tue, 1 Oct 2019 13:36:05 +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 97E044030D; Tue, 1 Oct 2019 19:36:01 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: jerinj@marvell.com, abhinandan.gujjar@intel.com, stable@dpdk.org Date: Tue, 1 Oct 2019 17:03:36 +0530 Message-Id: <20191001113339.21767-3-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191001113339.21767-1-hemant.agrawal@nxp.com> References: <20191001113339.21767-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 3/6] test/event_crypto: fix to avail the mempool entries 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" Added the missed code to avail the mempool entries before pool free. Fixes: 24054e3640a2 ("test/crypto: use separate session mempools"); Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- The file location has been changed, thus check-git-log is giving err on this patch app/test/test_event_crypto_adapter.c | 1 + 1 file changed, 1 insertion(+) -- 2.17.1 diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index d3d19b98e..8d42462d8 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -905,6 +905,7 @@ crypto_teardown(void) params.session_mpool = NULL; } if (params.session_priv_mpool != NULL) { + rte_mempool_avail_count(params.session_priv_mpool); rte_mempool_free(params.session_priv_mpool); params.session_priv_mpool = NULL; } From patchwork Tue Oct 1 11:33:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 174837 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp8415917ill; Tue, 1 Oct 2019 04:36:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzCcVNncWVCTtO6n/immnM7OSQoGQWW2G3tHBAsqqEbjnMdNs+UPiQ7bGozgCG0KyU8Zqav X-Received: by 2002:a50:ee10:: with SMTP id g16mr24805391eds.267.1569929790780; Tue, 01 Oct 2019 04:36:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569929790; cv=none; d=google.com; s=arc-20160816; b=GmgMqGtMumP02gEIglaAj/RpeWHPD6EU6lf8TDpdBpOsYjgmcZ5BGuvxqLtFZpDtJt QY83rGMRQ+Brna9UreWKZgd5XSB+dc2oc3x9uR7b8Mzo72GviArFH3D5nqK12DbIXKd7 ynjxKw39ZdtuTOojHuWz8IOjcFvYDGsecSUb0ubpJbM0apDm5Jdl7ghvuHv2ZRogDwMd EF/TgT10RssVY8q8gLVEpqmpl2FYeQ3NaoU2N11clSl40tI01Gpz9Z0Hbxv+wNDRw6W/ gIigyVOhDyh/FtSLNePsv6vdTjFWMjZbgB+n+reH26PebDOqYjuIedGz6RCCHwRfTcHt 1JLg== 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=k4c4jVCnZYyUoisZ3u05GU9Y2MpQQCLtDX+DoYwQJ24=; b=RgUpvZ84sC+gumfkPzDWoEMksj1Mmw0k/bQizUU5SlsxemnaXsXhn766YhOLPqctZQ lpP5NVC7TthX4NooHyjScPZg4xWTutpaKFT1JvMm01k5cNhc+QnLZImmbAVMMKAkl0QX HS50gZ6Ik4SiZstXig3jV3g4WopY2k05v7u3y6GAgdkVR5rHNUf6RHbBrF+gWWt86MS3 s84vskX34VjvVXVe+5NbmOhtxMuD0+7uXkFoRkalGiUHe5dHB8TYyOJR28vVY5TKMxRE B0T19A2WBFd+NpFgdbVOekjBpEPOvo1WqQNp2t/fRGsvJ3cSELtPgth6MKgRAPvfJEqY GTyg== 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 h91si9306152edd.270.2019.10.01.04.36.30; Tue, 01 Oct 2019 04:36:30 -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 7507E1B952; Tue, 1 Oct 2019 13:36:12 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 993204C8D for ; Tue, 1 Oct 2019 13:36:10 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 74D621A094A; Tue, 1 Oct 2019 13:36:10 +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 A757E1A0558; Tue, 1 Oct 2019 13:36:08 +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 E4E6A40328; Tue, 1 Oct 2019 19:36:02 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: jerinj@marvell.com, abhinandan.gujjar@intel.com Date: Tue, 1 Oct 2019 17:03:37 +0530 Message-Id: <20191001113339.21767-4-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191001113339.21767-1-hemant.agrawal@nxp.com> References: <20191001113339.21767-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 4/6] test/event_crypto: support to release the atomic ctxt 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 test cases uses ATOMIC queues. Once the packet is recived it is required to release the ATOMIC ctxt, at least for the HW based eventdevs. This patch makes empty dq call, which in turn releases the atomic ctxt. Signed-off-by: Hemant Agrawal --- app/test/test_event_crypto_adapter.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.17.1 diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index 8d42462d8..b9e3a439e 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -357,6 +357,12 @@ send_op_recv_ev(struct rte_crypto_op *op) rte_pause(); recv_op = ev.event_ptr; + + /* In case of Atomic/Ordered Queue, call dequeue one more time + * to release, if there is any atomic context to be freed + */ + rte_event_dequeue_burst(evdev, TEST_APP_PORT_ID, &ev, NUM, 0); + #if PKT_TRACE struct rte_mbuf *m = recv_op->sym->m_src; rte_pktmbuf_dump(stdout, m, rte_pktmbuf_pkt_len(m)); From patchwork Tue Oct 1 11:33: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: 174838 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp8416043ill; Tue, 1 Oct 2019 04:36:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWWZZXRGgT38lnxR4E87Y/cUAId07Cj7obmO48HgZgZH/N++WNLEUbcizOwnO4GbFYPCvd X-Received: by 2002:a17:906:4e57:: with SMTP id g23mr13743995ejw.264.1569929797438; Tue, 01 Oct 2019 04:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569929797; cv=none; d=google.com; s=arc-20160816; b=cX+vxWjiT1Y1+CfRAZjt10Th40ljDTL/BIhqrivTfs5tdmTaphYtKwNKiGng8qKY/T zSDT7NuUs1/tj8l+dEXRLst4bWDOq8cHud1Un02nFNkDW6ruee+Rt37DP03lggdMOcfC xNgMz9oqlXDo/SRrfnec8amt/rUhV/8cBAWhF2AEu7LbyNEc2baE8JGrQCBduxDDKaCZ MHvOtYkUlPGVogxHVIviS2uDdR88ZOMg+xTjHgjkt3gQ6wydCr69FP5m36f/0Taq0kLj WN6R/BN+x/opezlp5f9psJsNGjeBvy+S9KR3Sn0BXdsPLDQt4LZBganph+VZOzh5N1FW BMbA== 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=5IHr9mo368oC9ipCe/i4blD85HkZ0lnEjEJSK8ga3A8=; b=wzPM46gogZdkXa0kVz5XlrYHKkKtDsC+PMNZzk4D4cskGOg83MFZ06LJyfNtrXPoyR Pa2moo+3qI1i4sIrmGUV+O6Uu167tOJXtwnkLcie9VipLkS+LZv5SlBrJF1y+94BAv3I d4cCQzNRilZWWRG79FUBi3BHUNco458JLUOODyy/dDixSgBFizHYS0Ay1u/2Q2EkkWSs 2jNwSO4UXMCoRlpOE9CtwB0cP4ZxNQ0/+wHpDRRaVKhh4SZQF8+TQNV9VYrSJWcP0Bc9 GQjwJ0uVMHOKRUerduRrtvB3OeoNix52GuhwDwF6B3Mb7FS608XfKoiXgtIz2/PSo5QS F4aQ== 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 gg17si8417068ejb.294.2019.10.01.04.36.37; Tue, 01 Oct 2019 04:36:37 -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 013D01BE0C; Tue, 1 Oct 2019 13:36:14 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id C53AF4C99 for ; Tue, 1 Oct 2019 13:36:10 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id A3CB91A094E; Tue, 1 Oct 2019 13:36:10 +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 D76D21A0567; Tue, 1 Oct 2019 13:36:08 +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 ED7EC4032B; Tue, 1 Oct 2019 19:36:03 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: jerinj@marvell.com, abhinandan.gujjar@intel.com Date: Tue, 1 Oct 2019 17:03:38 +0530 Message-Id: <20191001113339.21767-5-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191001113339.21767-1-hemant.agrawal@nxp.com> References: <20191001113339.21767-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 5/6] test/event_crypto: use device cap instead of fixed values 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" Instead of hardcoded event device capabilities, it is better to enquire and use the device supported caps. Signed-off-by: Hemant Agrawal --- app/test/test_event_crypto_adapter.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) -- 2.17.1 diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index b9e3a439e..6b10909e3 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -703,12 +703,11 @@ test_crypto_adapter_free(void) static int test_crypto_adapter_create(void) { - struct rte_event_port_conf conf = { - .dequeue_depth = 8, - .enqueue_depth = 8, - .new_event_threshold = 1200, - }; int ret; + struct rte_event_port_conf conf; + + ret = rte_event_port_default_conf_get(TEST_CDEV_ID, 0, &conf); + TEST_ASSERT_SUCCESS(ret, "Failed to get port0 info"); /* Create adapter with default port creation callback */ ret = rte_event_crypto_adapter_create(TEST_ADAPTER_ID, @@ -747,14 +746,12 @@ test_crypto_adapter_qp_add_del(void) static int configure_event_crypto_adapter(enum rte_event_crypto_adapter_mode mode) { - struct rte_event_port_conf conf = { - .dequeue_depth = 8, - .enqueue_depth = 8, - .new_event_threshold = 1200, - }; - uint32_t cap; int ret; + struct rte_event_port_conf conf; + + ret = rte_event_port_default_conf_get(TEST_CDEV_ID, 0, &conf); + TEST_ASSERT_SUCCESS(ret, "Failed to get port0 info"); /* Create adapter with default port creation callback */ ret = rte_event_crypto_adapter_create(TEST_ADAPTER_ID, From patchwork Tue Oct 1 11:33:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 174839 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp8416166ill; Tue, 1 Oct 2019 04:36:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzigaReb/rqCQYnOzVZYu6FoPZgjR/1m98jbYWqe+aiIXqIJLHYbI5ZvpCPRrk4AZxH/vXt X-Received: by 2002:aa7:d501:: with SMTP id y1mr24409052edq.226.1569929804412; Tue, 01 Oct 2019 04:36:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569929804; cv=none; d=google.com; s=arc-20160816; b=PrIBICABeMeI4IKEQ4Hz31fJKiU6THfOCkaPJbMR4BiN5dzryqhP+0O3kfAD+VuOBg KX3Tef1/NunixQAMI+a6mLxM9FOz3WsYn0edJsjTUwAmk0R5on4YOJyu1tTAnxj3BSer IhnLhuou+K12FdcoFuHwuoCa1DZ6xg37GACGjxlZebmDLTd1ukqHRbKdO+1HF78dflQv q6XO8Oof3cn6K9X+95GwgsGwDBx1SIx2bx2CKBwhhQa8AE9ctok1W9GjFq3PjAQ6xmcE 6FCplgaTKM7aL4ctzkMkhPmlym+oelkjEH3QLg47q4kw0KcWoGhl7etpicUUJEJWZH3d 0PGg== 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=F7cKRteZJ7A0elae67tEWTS6chM58yREmBbFzdkUEhg=; b=L3CSVdTp1SFHiKA5pj8H99FZxlWt8bZIoIe8RXKYIs8ZjvEdUw2CUUEd83RgOL+p6E ju07nrm8hiKgf+uHJyiNiPi+zpKrkDXmXidNiJh+G+tB/5QUjNw5iPhqSaQV4e1LtJGk qus2wX/ltN7uBEOXI88mqyWI3TruokJs8waGMyCDc+3lPNEKOYjgJkGqShxGaH6/ftmz XqGgIEeXUqq/wdhTcQ/lMkHfleyEAz0HPmz2kqcuVU9wWpF6YnGmL/Gm0m+CVXtOs/6Q fR0nD/2REE9K0KCKYw1QR/XuTznVaz/5Sld+/iDVKlpY5iY/00vDfd91vcIHx255k3GZ yhJg== 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 h53si9749577edh.147.2019.10.01.04.36.44; Tue, 01 Oct 2019 04:36:44 -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 E44C01BE82; Tue, 1 Oct 2019 13:36:15 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 0FB404C8D for ; Tue, 1 Oct 2019 13:36:11 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id E76391A0563; Tue, 1 Oct 2019 13:36:10 +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 EB2011A0943; Tue, 1 Oct 2019 13:36:08 +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 F357D402C7; Tue, 1 Oct 2019 19:36:04 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: jerinj@marvell.com, abhinandan.gujjar@intel.com Date: Tue, 1 Oct 2019 17:03:39 +0530 Message-Id: <20191001113339.21767-6-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191001113339.21767-1-hemant.agrawal@nxp.com> References: <20191001113339.21767-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 6/6] test/event_crypto: separate the NEW and FWD mode inits 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 earlier patch was using a single method to init the crypto adapter for FWD and NEW mode, which was also causing the adapter mode to be set incorrectly for NEW mode. This patch segregate the init for NEW and FWD modes. In case of NEW mode the packets will be directly sent to the cryptodev, so port linking is not required. Signed-off-by: Hemant Agrawal --- app/test/test_event_crypto_adapter.c | 78 ++++++++++++++++++++++------ 1 file changed, 63 insertions(+), 15 deletions(-) -- 2.17.1 diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index 6b10909e3..e396358f2 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -789,26 +789,44 @@ test_crypto_adapter_stop(void) rte_service_runstate_set(adapter_service_id, 0); rte_service_lcore_stop(slcore_id); rte_service_lcore_del(slcore_id); - rte_event_crypto_adapter_stop(TEST_ADAPTER_ID); } + rte_event_crypto_adapter_stop(TEST_ADAPTER_ID); if (rte_event_dev_service_id_get(evdev, &evdev_service_id) == 0) { rte_service_runstate_set(evdev_service_id, 0); rte_service_lcore_stop(slcore_id); rte_service_lcore_del(slcore_id); - rte_event_dev_stop(evdev); + } + rte_event_dev_stop(evdev); +} + +static void +test_crypto_adapter_clear(void) +{ + uint8_t qid; + test_crypto_adapter_stop(); + + if (crypto_adapter_setup_done) { + qid = TEST_CRYPTO_EV_QUEUE_ID; + rte_event_port_unlink(evdev, params.crypto_event_port_id, + &qid, 1); + rte_event_crypto_adapter_queue_pair_del(TEST_ADAPTER_ID, + TEST_CDEV_ID, TEST_CDEV_QP_ID); + rte_event_crypto_adapter_free(TEST_ADAPTER_ID); + crypto_adapter_setup_done = 0; } } static int -test_crypto_adapter_conf(enum rte_event_crypto_adapter_mode mode) +test_crypto_adapter_conf(void) { uint32_t evdev_service_id; uint8_t qid; int ret; if (!crypto_adapter_setup_done) { - ret = configure_event_crypto_adapter(mode); + ret = configure_event_crypto_adapter( + RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD); if (!ret) { qid = TEST_CRYPTO_EV_QUEUE_ID; ret = rte_event_port_link(evdev, @@ -845,24 +863,54 @@ test_crypto_adapter_conf(enum rte_event_crypto_adapter_mode mode) } static int -test_crypto_adapter_conf_op_forward_mode(void) +test_crypto_adapter_conf_new(void) { - enum rte_event_crypto_adapter_mode mode; + uint32_t evdev_service_id; + int ret; - mode = RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD; - TEST_ASSERT_SUCCESS(test_crypto_adapter_conf(mode), - "Failed to config crypto adapter"); + if (!crypto_adapter_setup_done) { + ret = configure_event_crypto_adapter( + RTE_EVENT_CRYPTO_ADAPTER_OP_NEW); + TEST_ASSERT_SUCCESS(ret, "Failed to config crypto adapter"); + crypto_adapter_setup_done = 1; + } + + /* retrieve service ids */ + if (rte_event_dev_service_id_get(evdev, &evdev_service_id) == 0) { + /* add a service core and start it */ + TEST_ASSERT_SUCCESS(rte_service_lcore_add(slcore_id), + "Failed to add service core"); + TEST_ASSERT_SUCCESS(rte_service_lcore_start(slcore_id), + "Failed to start service core"); + + /* map services to it */ + TEST_ASSERT_SUCCESS(rte_service_map_lcore_set(evdev_service_id, + slcore_id, 1), "Failed to map evdev service"); + + /* set services to running */ + TEST_ASSERT_SUCCESS(rte_service_runstate_set(evdev_service_id, + 1), "Failed to start evdev service"); + } + + /* start the eventdev */ + TEST_ASSERT_SUCCESS(rte_event_dev_start(evdev), + "Failed to start event device"); return TEST_SUCCESS; } static int -test_crypto_adapter_conf_op_new_mode(void) +test_crypto_adapter_conf_op_forward_mode(void) { - enum rte_event_crypto_adapter_mode mode; + TEST_ASSERT_SUCCESS(test_crypto_adapter_conf(), + "Failed to config crypto adapter"); + return TEST_SUCCESS; +} - mode = RTE_EVENT_CRYPTO_ADAPTER_OP_NEW; - TEST_ASSERT_SUCCESS(test_crypto_adapter_conf(mode), +static int +test_crypto_adapter_conf_op_new_mode(void) +{ + TEST_ASSERT_SUCCESS(test_crypto_adapter_conf_new(), "Failed to config crypto adapter"); return TEST_SUCCESS; @@ -957,7 +1005,7 @@ static struct unit_test_suite functional_testsuite = { test_session_with_op_forward_mode), TEST_CASE_ST(test_crypto_adapter_conf_op_forward_mode, - test_crypto_adapter_stop, + test_crypto_adapter_clear, test_sessionless_with_op_forward_mode), TEST_CASE_ST(test_crypto_adapter_conf_op_new_mode, @@ -965,7 +1013,7 @@ static struct unit_test_suite functional_testsuite = { test_session_with_op_new_mode), TEST_CASE_ST(test_crypto_adapter_conf_op_new_mode, - test_crypto_adapter_stop, + test_crypto_adapter_clear, test_sessionless_with_op_new_mode), TEST_CASES_END() /**< NULL terminate unit test array */