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 9CC83A04C8; Fri, 18 Sep 2020 12:05:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 11EEC1D921; Fri, 18 Sep 2020 12:05:20 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 7E2901D709 for ; Fri, 18 Sep 2020 12:05:18 +0200 (CEST) IronPort-SDR: Fgc2acIHMAUCXD9mH2q/ueiQlZvwxv+JY7LNvj84pke8St382kyeMqP+w9RZnHOmkfXXUvouso 0nI3toAfNv+w== X-IronPort-AV: E=McAfee;i="6000,8403,9747"; a="244740746" X-IronPort-AV: E=Sophos;i="5.77,274,1596524400"; d="scan'208";a="244740746" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2020 03:05:15 -0700 IronPort-SDR: YzBrhs0yumbehpKzlqkYJMvK+ZJ1O5dKeE9w3w0IvCCH7tJ5ItnevGcTrAm4/bRQWFjtdGTjNN tYxl5PKH7ddQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,274,1596524400"; d="scan'208";a="332544329" Received: from unknown (HELO localhost.localdomain) ([10.190.210.98]) by fmsmga004.fm.intel.com with ESMTP; 18 Sep 2020 03:05:13 -0700 From: Abhinandan Gujjar To: dev@dpdk.org, jerinj@marvell.com Cc: narender.vangati@intel.com, abhinandan.gujjar@intel.com Date: Thu, 17 Sep 2020 06:27:58 +0530 Message-Id: <1600304278-77684-1-git-send-email-abhinandan.gujjar@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH] test/event_crypto_adapter: fix conf issue 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" This patch updates the xform with right configuration. For session based ops, sym session pool is created with valid userdata size. Signed-off-by: Abhinandan Gujjar --- app/test/test_event_crypto_adapter.c | 24 +++++------------------- drivers/crypto/meson.build | 12 ++++++------ 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index 8d42462..530ce96 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -171,7 +171,6 @@ struct rte_event_crypto_request request_info = { struct rte_event ev; uint32_t cap; int ret; - uint8_t cipher_key[17]; memset(&m_data, 0, sizeof(m_data)); @@ -183,14 +182,7 @@ struct rte_event_crypto_request request_info = { /* Setup Cipher Parameters */ cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cipher_xform.next = NULL; - - 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; + cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL; op = rte_crypto_op_alloc(params.op_mpool, RTE_CRYPTO_OP_TYPE_SYMMETRIC); @@ -378,7 +370,6 @@ struct rte_event_crypto_request request_info = { struct rte_mbuf *m; uint32_t cap; int ret; - uint8_t cipher_key[17]; memset(&m_data, 0, sizeof(m_data)); @@ -390,14 +381,7 @@ struct rte_event_crypto_request request_info = { /* Setup Cipher Parameters */ cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cipher_xform.next = NULL; - - 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; + cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL; op = rte_crypto_op_alloc(params.op_mpool, RTE_CRYPTO_OP_TYPE_SYMMETRIC); @@ -564,7 +548,9 @@ struct rte_event_crypto_request request_info = { params.session_mpool = rte_cryptodev_sym_session_pool_create( "CRYPTO_ADAPTER_SESSION_MP", - MAX_NB_SESSIONS, 0, 0, 0, SOCKET_ID_ANY); + MAX_NB_SESSIONS, 0, 0, + sizeof(union rte_event_crypto_metadata), + SOCKET_ID_ANY); TEST_ASSERT_NOT_NULL(params.session_mpool, "session mempool allocation failed\n"); diff --git a/drivers/crypto/meson.build b/drivers/crypto/meson.build index a242350..149a8e1 100644 --- a/drivers/crypto/meson.build +++ b/drivers/crypto/meson.build @@ -5,14 +5,14 @@ if is_windows subdir_done() endif -drivers = ['aesni_gcm', - 'aesni_mb', +drivers = [#'aesni_gcm', + #'aesni_mb', 'armv8', 'caam_jr', 'ccp', 'dpaa_sec', 'dpaa2_sec', - 'kasumi', + # 'kasumi', 'mvsam', 'nitrox', 'null', @@ -21,9 +21,9 @@ drivers = ['aesni_gcm', 'openssl', 'qat', 'scheduler', - 'snow3g', - 'virtio', - 'zuc'] + #'snow3g', + 'virtio'] + #'zuc'] std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' -- 1.9.1