From patchwork Fri Jul 3 05:41:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Dwivedi X-Patchwork-Id: 72930 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D2F4BA0519; Fri, 3 Jul 2020 07:42:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 07BC61D916; Fri, 3 Jul 2020 07:42:28 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 8C3991D913; Fri, 3 Jul 2020 07:42:26 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0635ds1m011402; Thu, 2 Jul 2020 22:42:25 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=UBUsj/u4ncmqPcJbxu/YZE2ki89IUoO9BiYSgGauUtk=; b=dMz49ls2+NsSJTvjbs6rfrZCy1jSDDhiw8OLMfli9GutC/xG9TuOuprHyiiJTTm65tlY upwre+0vNLkCWwO7d7TofLLK9x8qrTmcx545/Yuj8awAVT7snsPhc2emQQoTBYV4RUsM ujO7A9k9Ozsmrg7C8KVTeW2LGJTnz8ntKRP0M0Ln5WcA2pfhEapsCigeI6U9Yhr1WkzR oLC1BOQzonYgg/Cfm1Drc4dXAxT8b28pk+4yvGNCJtZM0IasJhFdyyTimVbF01jFV8a4 HnUZtLyQSvj9AOmcBscMcTnXgTC9gMHxP+SzqRUBFmEA6NAjCpcjI+45cKWgIUcVHg+C nw== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 321m92tc6v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 02 Jul 2020 22:42:25 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 2 Jul 2020 22:42:24 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 2 Jul 2020 22:42:24 -0700 Received: from hyd1349.t110.caveonetworks.com (unknown [10.29.45.13]) by maili.marvell.com (Postfix) with ESMTP id AF5833F703F; Thu, 2 Jul 2020 22:42:22 -0700 (PDT) From: Ankur Dwivedi To: CC: , , , Ankur Dwivedi , Date: Fri, 3 Jul 2020 11:11:37 +0530 Message-ID: <1593754904-1264-1-git-send-email-adwivedi@marvell.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1591853907-2501-1-git-send-email-adwivedi@marvell.com> References: <1591853907-2501-1-git-send-email-adwivedi@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-03_01:2020-07-02, 2020-07-03 signatures=0 Subject: [dpdk-dev] [PATCH v2 1/8] common/cpt: fix encryption offset 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" In case of gmac auth the encryption offset should be set to zero. Fixes: b74652f3a91f ("common/cpt: add microcode interface for encryption") Fixes: 177b41ceee61 ("common/cpt: add microcode interface for decryption") Cc: stable@dpdk.org Signed-off-by: Ankur Dwivedi --- drivers/common/cpt/cpt_ucode.h | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h index 34ccd08..ab595eb 100644 --- a/drivers/common/cpt/cpt_ucode.h +++ b/drivers/common/cpt/cpt_ucode.h @@ -682,9 +682,6 @@ m_vaddr = (uint8_t *)m_vaddr + size; m_dma += size; - if (hash_type == GMAC_TYPE) - encr_data_len = 0; - if (unlikely(!(flags & VALID_IV_BUF))) { iv_len = 0; iv_offset = ENCR_IV_OFFSET(d_offs); @@ -716,6 +713,11 @@ opcode.s.major = CPT_MAJOR_OP_FC; opcode.s.minor = 0; + if (hash_type == GMAC_TYPE) { + encr_offset = 0; + encr_data_len = 0; + } + auth_dlen = auth_offset + auth_data_len; enc_dlen = encr_data_len + encr_offset; if (unlikely(encr_data_len & 0xf)) { @@ -726,11 +728,6 @@ enc_dlen = ROUNDUP16(encr_data_len) + encr_offset; } - if (unlikely(hash_type == GMAC_TYPE)) { - encr_offset = auth_dlen; - enc_dlen = 0; - } - if (unlikely(auth_dlen > enc_dlen)) { inputlen = auth_dlen; outputlen = auth_dlen + mac_len; @@ -1033,9 +1030,6 @@ hash_type = cpt_ctx->hash_type; mac_len = cpt_ctx->mac_len; - if (hash_type == GMAC_TYPE) - encr_data_len = 0; - if (unlikely(!(flags & VALID_IV_BUF))) { iv_len = 0; iv_offset = ENCR_IV_OFFSET(d_offs); @@ -1092,6 +1086,11 @@ opcode.s.major = CPT_MAJOR_OP_FC; opcode.s.minor = 1; + if (hash_type == GMAC_TYPE) { + encr_offset = 0; + encr_data_len = 0; + } + enc_dlen = encr_offset + encr_data_len; auth_dlen = auth_offset + auth_data_len; @@ -1103,9 +1102,6 @@ outputlen = enc_dlen; } - if (hash_type == GMAC_TYPE) - encr_offset = inputlen; - vq_cmd_w0.u64 = 0; vq_cmd_w0.s.param1 = encr_data_len; vq_cmd_w0.s.param2 = auth_data_len; From patchwork Fri Jul 3 05:41:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Dwivedi X-Patchwork-Id: 72931 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A6EEFA0519; Fri, 3 Jul 2020 07:43:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 903351D94B; Fri, 3 Jul 2020 07:43:00 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 58ED41D929 for ; Fri, 3 Jul 2020 07:42:58 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0635ds15011405; Thu, 2 Jul 2020 22:42:57 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=kmEQf1h6veqWJ02RPJlHRVSc+aP+TaMWn/gTFDg2fQs=; b=rzNACZSBlH1s/CVknPSHUKniUwPqk56y/4VbZIh79RP5yLYZnFYvjLlaCPpw3Q7vueX+ 3j4O+HjJvn9sVJ56S6BkOd8iu31JKpCZs4ztYLdWUYxhub6NrfPFCrF/7fbrfbUL4gJM QlNogLwnWXYEegRctHTg5SFQLzwjS4KywRabMYKepdvclNomGmtXW3+VStfWy8mD78hc q3FNprrKgS1j1mIqvgykvp+xAupYRwX/58F6FTJcdb7sgRdNKCbX6z5ajxfyUVGxQUpo cVbeCBVqAHgnUiFQkqbb5dNJ6dNCNi31q765/4+PttVF/zKGHGfAiEBxOLZdErEfK2bk OA== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 321m92tc89-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 02 Jul 2020 22:42:57 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 2 Jul 2020 22:42:56 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 2 Jul 2020 22:42:56 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 2 Jul 2020 22:42:56 -0700 Received: from hyd1349.t110.caveonetworks.com (unknown [10.29.45.13]) by maili.marvell.com (Postfix) with ESMTP id 9DE243F703F; Thu, 2 Jul 2020 22:42:54 -0700 (PDT) From: Ankur Dwivedi To: CC: , , , Ankur Dwivedi Date: Fri, 3 Jul 2020 11:11:38 +0530 Message-ID: <1593754904-1264-2-git-send-email-adwivedi@marvell.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1593754904-1264-1-git-send-email-adwivedi@marvell.com> References: <1591853907-2501-1-git-send-email-adwivedi@marvell.com> <1593754904-1264-1-git-send-email-adwivedi@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-03_01:2020-07-02, 2020-07-03 signatures=0 Subject: [dpdk-dev] [PATCH v2 2/8] crypto/octeontx: remove stats callback 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 stats get and reset functions for octeontx crypto PMD are unimplemented. So removing them. Signed-off-by: Ankur Dwivedi --- drivers/crypto/octeontx/otx_cryptodev_ops.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c index 60efd7c..265e10e 100644 --- a/drivers/crypto/octeontx/otx_cryptodev_ops.c +++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c @@ -127,19 +127,6 @@ } } -static void -otx_cpt_stats_get(struct rte_cryptodev *dev __rte_unused, - struct rte_cryptodev_stats *stats __rte_unused) -{ - CPT_PMD_INIT_FUNC_TRACE(); -} - -static void -otx_cpt_stats_reset(struct rte_cryptodev *dev __rte_unused) -{ - CPT_PMD_INIT_FUNC_TRACE(); -} - static int otx_cpt_que_pair_setup(struct rte_cryptodev *dev, uint16_t que_pair_id, @@ -915,8 +902,8 @@ .dev_close = otx_cpt_dev_close, .dev_infos_get = otx_cpt_dev_info_get, - .stats_get = otx_cpt_stats_get, - .stats_reset = otx_cpt_stats_reset, + .stats_get = NULL, + .stats_reset = NULL, .queue_pair_setup = otx_cpt_que_pair_setup, .queue_pair_release = otx_cpt_que_pair_release, From patchwork Fri Jul 3 05:41:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Dwivedi X-Patchwork-Id: 72932 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 631B6A0519; Fri, 3 Jul 2020 07:43:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 402071D945; Fri, 3 Jul 2020 07:43:19 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 5A7B81D916 for ; Fri, 3 Jul 2020 07:43:18 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0635fK8a002034; Thu, 2 Jul 2020 22:43:17 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=qjuA3duY6B/bxG5EFehYvI6DfnhewucsNikOXB8VFJs=; b=IVHXIxaZ5MOOpDNIITvafwDq+flCVOek4yX6M7gGre3E1w2ibr+Id3IT+z8C/r/k1aMt 3Dr/BgWEcj+55dxOYTJiemHhT5u9P9vQPsgU4ud6oJr+oQEmPCwcUlV8u/T9VpaAQ3Wj /++/2jqAsAiaQMI6DrPT2sGWTLs6gbMCNw1MxXF2IjzuigowA+Vh7AjLH1SiEOMvwfUD TrJhz4R9gJ1H6RJ5wulaKpyJCP9zNSk1vfaYv51laKVcFpZGAr2iUI7NY+yap3+GJhLG G0DYr8wdONawMAqiIAxR5VBG3JoQA764nTpBn9WFvWD/pNvk9HLwWhB60/YZn9fd9Kk1 XA== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 31x5mp0h5u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 02 Jul 2020 22:43:16 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 2 Jul 2020 22:43:13 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 2 Jul 2020 22:43:14 -0700 Received: from hyd1349.t110.caveonetworks.com (unknown [10.29.45.13]) by maili.marvell.com (Postfix) with ESMTP id 0F9C23F703F; Thu, 2 Jul 2020 22:43:11 -0700 (PDT) From: Ankur Dwivedi To: CC: , , , Ankur Dwivedi Date: Fri, 3 Jul 2020 11:11:39 +0530 Message-ID: <1593754904-1264-3-git-send-email-adwivedi@marvell.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1593754904-1264-1-git-send-email-adwivedi@marvell.com> References: <1591853907-2501-1-git-send-email-adwivedi@marvell.com> <1593754904-1264-1-git-send-email-adwivedi@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-03_01:2020-07-02, 2020-07-03 signatures=0 Subject: [dpdk-dev] [PATCH v2 3/8] crypto/octeontx: set session private data 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 sets the first 32 bytes of session private data to zero. This prevents garbage data to be used in code logic. Signed-off-by: Ankur Dwivedi --- drivers/crypto/octeontx/otx_cryptodev_ops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c index 265e10e..8f58fe2 100644 --- a/drivers/crypto/octeontx/otx_cryptodev_ops.c +++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c @@ -252,6 +252,9 @@ return -ENOMEM; } + memset(priv, 0, sizeof(struct cpt_sess_misc) + + offsetof(struct cpt_ctx, fctx)); + misc = priv; for ( ; xform != NULL; xform = xform->next) { From patchwork Fri Jul 3 05:41:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Dwivedi X-Patchwork-Id: 72933 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3DE84A0519; Fri, 3 Jul 2020 07:43:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8DD061D9C7; Fri, 3 Jul 2020 07:43:22 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id C0EE71D9C3 for ; Fri, 3 Jul 2020 07:43:20 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0635drLX011383; Thu, 2 Jul 2020 22:43:20 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=MYe/maIaTPyDTGADcRw4efLMCWM2kXvpXInZ24/M7Y4=; b=EQ4XiJcGITZ9lkD1i+Lb4aa1j5XoZUUfzbe10TmAufYMn2DZKJj6xNgIeg3z7ESQg8yY 0TVdy0bCc5QSc6K1GcWnZaTw4HQfaJcI6jZCBbU9Mqt/R8GfkmP188ul+BPtSJDGiz0b Na/MEJhZznB3U9/uhUZqQ2zmgyaf7oTiH5gnDx0EK8a0t5Vetq+LNseMdfMdoNQh/dqg Fw8faNImF1E7qaIGdTZQFi7BOEm4Zunt7LlCZZ5UtkFZ9Q51L/vXkRPfoO58gYYqtSFu an+J4X1Y+vsZE1lVe16qh83H4S+Pfr7iw21L2WJiZIWNG9QzKg5wIisErHt/2cVogvZH ng== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 321m92tc9v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 02 Jul 2020 22:43:19 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 2 Jul 2020 22:43:18 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 2 Jul 2020 22:43:19 -0700 Received: from hyd1349.t110.caveonetworks.com (unknown [10.29.45.13]) by maili.marvell.com (Postfix) with ESMTP id 485543F703F; Thu, 2 Jul 2020 22:43:17 -0700 (PDT) From: Ankur Dwivedi To: CC: , , , Ankur Dwivedi Date: Fri, 3 Jul 2020 11:11:40 +0530 Message-ID: <1593754904-1264-4-git-send-email-adwivedi@marvell.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1593754904-1264-1-git-send-email-adwivedi@marvell.com> References: <1591853907-2501-1-git-send-email-adwivedi@marvell.com> <1593754904-1264-1-git-send-email-adwivedi@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-03_01:2020-07-02, 2020-07-03 signatures=0 Subject: [dpdk-dev] [PATCH v2 4/8] crypto/octeontx2: set session private data 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 sets the first 32 bytes of session private data to zero. This prevents garbage data to be used in code logic. Signed-off-by: Ankur Dwivedi --- drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c index ad292a0..c0aed61 100644 --- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c +++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c @@ -364,6 +364,9 @@ return -ENOMEM; } + memset(priv, 0, sizeof(struct cpt_sess_misc) + + offsetof(struct cpt_ctx, fctx)); + misc = priv; for ( ; xform != NULL; xform = xform->next) { From patchwork Fri Jul 3 05:41:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Dwivedi X-Patchwork-Id: 72934 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E643BA0519; Fri, 3 Jul 2020 07:43:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2AF391D9FA; Fri, 3 Jul 2020 07:43:31 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id AEF381D916; Fri, 3 Jul 2020 07:43:29 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0635drLZ011383; Thu, 2 Jul 2020 22:43:28 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=a3G2aMa4Sk+ApY1CixH4/Kcvbl+oeKFMFXSw8DDVRBg=; b=bdPv0YFYHum1YUCv0CST2tl/hgA1sYNATZj35d2JdiRlfFPRB1S3Va9aKE6sLylibWjx frNyJP/KIJHPuMKUGzeTecsuLQaD1/OAXlPuTliOHnQcS4QrXfm8X9t8bbevc/CS61rm OuBl39ueUUJo2Ale/DQlVEGxkGtYoVb3qF+4q2uNbHesq+fdeTanhpBHDjXuwX35h4mM UBo9EmMJIGf4EYd1jonI4h+8XciUDO5dxPPuETSrXkbTtw6yPalV7lfDizB/S7xA5ylJ 4AiytewdIK98jT6GGfz8sepceEBL51NLCInJkATv5YLAuoAI0a5RrIrTZyb0+fnXFfJ2 8Q== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 321m92tca7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 02 Jul 2020 22:43:28 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 2 Jul 2020 22:43:28 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 2 Jul 2020 22:43:27 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 2 Jul 2020 22:43:27 -0700 Received: from hyd1349.t110.caveonetworks.com (unknown [10.29.45.13]) by maili.marvell.com (Postfix) with ESMTP id 9A9663F703F; Thu, 2 Jul 2020 22:43:25 -0700 (PDT) From: Ankur Dwivedi To: CC: , , , Ankur Dwivedi , Date: Fri, 3 Jul 2020 11:11:41 +0530 Message-ID: <1593754904-1264-5-git-send-email-adwivedi@marvell.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1593754904-1264-1-git-send-email-adwivedi@marvell.com> References: <1591853907-2501-1-git-send-email-adwivedi@marvell.com> <1593754904-1264-1-git-send-email-adwivedi@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-03_01:2020-07-02, 2020-07-03 signatures=0 Subject: [dpdk-dev] [PATCH v2 5/8] crypto/octeontx: revert non-byte aligned data feature 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 reverts commit 32b8f26adf8b26a55230408ff6adffd4b2327e52. For SNOW and ZUC algos the offset value for enryption and decryption is converted to bytes. Hence RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA feature is not supported by the octeontx crypto pmd. Fixes: 32b8f26adf8b ("crypto/octeontx: enable non-byte aligned data") Cc: stable@dpdk.org Signed-off-by: Ankur Dwivedi --- doc/guides/cryptodevs/features/octeontx.ini | 1 - drivers/crypto/octeontx/otx_cryptodev_ops.c | 1 - 2 files changed, 2 deletions(-) diff --git a/doc/guides/cryptodevs/features/octeontx.ini b/doc/guides/cryptodevs/features/octeontx.ini index 09affb2..4ce4ff1 100644 --- a/doc/guides/cryptodevs/features/octeontx.ini +++ b/doc/guides/cryptodevs/features/octeontx.ini @@ -13,7 +13,6 @@ OOP SGL In LB Out = Y OOP SGL In SGL Out = Y RSA PRIV OP KEY QT = Y Symmetric sessionless = Y -Non-Byte aligned data = Y ; ; Supported crypto algorithms of 'octeontx' crypto driver. diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c index 8f58fe2..2cedf7d 100644 --- a/drivers/crypto/octeontx/otx_cryptodev_ops.c +++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c @@ -979,7 +979,6 @@ RTE_CRYPTODEV_FF_IN_PLACE_SGL | RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT | RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT | - RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA | RTE_CRYPTODEV_FF_SYM_SESSIONLESS; break; default: From patchwork Fri Jul 3 05:41:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Dwivedi X-Patchwork-Id: 72935 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B215CA0519; Fri, 3 Jul 2020 07:43:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1FB3F1D9F0; Fri, 3 Jul 2020 07:43:37 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id BBC021DA08; Fri, 3 Jul 2020 07:43:34 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0635eATg011591; Thu, 2 Jul 2020 22:43:33 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=5jqKI494CgZeQqqM/i+0kmAjlGgvcDFxgsLwv2thIZA=; b=VJ+VHaFC8mLmhc5/NJaNNew6SnxEmziJ64Gl/sSqLoPz037RWGBVsZ+9diENxRNZatHg 9NbJIdso3sjJNlqgnu6HZmBEa/JC8BIjnohVRaZFY2feJ9bp/k4GR8UFPacKSLxQgBGx OKkGkBdY4s3STEweBYBdn0p45qdjRStSR8pWI7RF0ZrxKL+JPplNuyVJhW0sznNIWGt3 Jh8A8iV1VS63fDmQXetjfaKN0zDGtELVWXFUj3hjKMrPCQIxzYbxBY/36sP6FSku+YAw 3DzUxSmYuu8IrYoxDD73HtWaCkbEYUd1q7TFFHm+qIarviz8R4/4ZEUm2J90fD2516Y8 tw== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 321m92tcac-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 02 Jul 2020 22:43:33 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 2 Jul 2020 22:43:32 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 2 Jul 2020 22:43:33 -0700 Received: from hyd1349.t110.caveonetworks.com (unknown [10.29.45.13]) by maili.marvell.com (Postfix) with ESMTP id D64A63F703F; Thu, 2 Jul 2020 22:43:30 -0700 (PDT) From: Ankur Dwivedi To: CC: , , , Ankur Dwivedi , Date: Fri, 3 Jul 2020 11:11:42 +0530 Message-ID: <1593754904-1264-6-git-send-email-adwivedi@marvell.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1593754904-1264-1-git-send-email-adwivedi@marvell.com> References: <1591853907-2501-1-git-send-email-adwivedi@marvell.com> <1593754904-1264-1-git-send-email-adwivedi@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-03_01:2020-07-02, 2020-07-03 signatures=0 Subject: [dpdk-dev] [PATCH v2 6/8] crypto/octeontx2: revert non-byte aligned data feature 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 reverts commit 51f3e107aca23a1cbc1a5ad9fdce7921340307b5. For SNOW and ZUC algos the offset value for enryption and decryption is converted to bytes. Hence RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA feature is not supported by the octeontx2 crypto pmd. Fixes: 51f3e107aca2 ("crypto/octeontx2: enable non-byte aligned data") Cc: stable@dpdk.org Signed-off-by: Ankur Dwivedi --- doc/guides/cryptodevs/features/octeontx2.ini | 1 - drivers/crypto/octeontx2/otx2_cryptodev.c | 1 - 2 files changed, 2 deletions(-) diff --git a/doc/guides/cryptodevs/features/octeontx2.ini b/doc/guides/cryptodevs/features/octeontx2.ini index cdcaf70..e9ce26c 100644 --- a/doc/guides/cryptodevs/features/octeontx2.ini +++ b/doc/guides/cryptodevs/features/octeontx2.ini @@ -13,7 +13,6 @@ OOP SGL In LB Out = Y OOP SGL In SGL Out = Y RSA PRIV OP KEY QT = Y Symmetric sessionless = Y -Non-Byte aligned data = Y ; ; Supported crypto algorithms of 'octeontx2' crypto driver. diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c index 6ffbc2e..7cda077 100644 --- a/drivers/crypto/octeontx2/otx2_cryptodev.c +++ b/drivers/crypto/octeontx2/otx2_cryptodev.c @@ -104,7 +104,6 @@ RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT | RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO | RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT | - RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA | RTE_CRYPTODEV_FF_SYM_SESSIONLESS; return 0; From patchwork Fri Jul 3 05:41:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Dwivedi X-Patchwork-Id: 72936 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D2561A0519; Fri, 3 Jul 2020 07:43:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 20F1E1D9F6; Fri, 3 Jul 2020 07:43:41 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 4F0A31DA14 for ; Fri, 3 Jul 2020 07:43:39 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0635dsWc011399; Thu, 2 Jul 2020 22:43:38 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=x5o3V2eSLEmiMTTg7yi3o1ZzxqsP0fGyOxKpGmTXJk8=; b=oHq3DxGTW44LoXgEFBPzfOqx7msIu6hELEm0VCSR4AxLmPdD9/7gxys04ti4+1nGPayd DXnseVw5JjBcMqENXDab69y3CyzXrrwxeB/ezzwfgn5DVtOGEOUlwj1bPUHH7sptJ/MQ E3LfIviR4o6/dYICQaw8Um+BbzO+593fPfdOQz2zStVe7b6tR+z7PwHkAG4WEJdy+AmO srGHWoiNSJP8mKXwVgwUe9pQ0J7C7aFHKnRmgFVq1SRC8nFYG+ifclwtWjn60fNLkVKc voedJQLqRUebvjJCVW99Db01T/ksSs6GESR8JUdGOr+yc5c2B8lhYIbT8Ka6YWFtEZ9i UA== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 321m92tcag-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 02 Jul 2020 22:43:38 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 2 Jul 2020 22:43:37 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 2 Jul 2020 22:43:37 -0700 Received: from hyd1349.t110.caveonetworks.com (unknown [10.29.45.13]) by maili.marvell.com (Postfix) with ESMTP id ACB993F703F; Thu, 2 Jul 2020 22:43:35 -0700 (PDT) From: Ankur Dwivedi To: CC: , , , Ankur Dwivedi Date: Fri, 3 Jul 2020 11:11:43 +0530 Message-ID: <1593754904-1264-7-git-send-email-adwivedi@marvell.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1593754904-1264-1-git-send-email-adwivedi@marvell.com> References: <1591853907-2501-1-git-send-email-adwivedi@marvell.com> <1593754904-1264-1-git-send-email-adwivedi@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-03_01:2020-07-02, 2020-07-03 signatures=0 Subject: [dpdk-dev] [PATCH v2 7/8] test/crypto: remove PMD specific tests 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: Anoob Joseph This patch removes the OCTEON TX and OCTEON TX2 PMDs specific test cases related to null cipher. Signed-off-by: Ankur Dwivedi Signed-off-by: Anoob Joseph --- app/test/test_cryptodev.c | 371 ---------------------------------------------- 1 file changed, 371 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 8f63146..92b0b87 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -9247,361 +9247,10 @@ struct multi_session_params { return TEST_SUCCESS; } -static int -test_null_cipher_only_operation(void) -{ - struct crypto_testsuite_params *ts_params = &testsuite_params; - struct crypto_unittest_params *ut_params = &unittest_params; - - /* Verify the capabilities */ - struct rte_cryptodev_sym_capability_idx cap_idx; - cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; - cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_NULL; - if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], - &cap_idx) == NULL) - return -ENOTSUP; - - /* Generate test mbuf data and space for digest */ - ut_params->ibuf = setup_test_string(ts_params->mbuf_pool, - catch_22_quote, QUOTE_512_BYTES, 0); - - /* Setup Cipher Parameters */ - ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER; - ut_params->cipher_xform.next = NULL; - - ut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL; - ut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT; - - ut_params->sess = rte_cryptodev_sym_session_create( - ts_params->session_mpool); - - /* Create Crypto session*/ - rte_cryptodev_sym_session_init(ts_params->valid_devs[0], - ut_params->sess, - &ut_params->cipher_xform, - ts_params->session_priv_mpool); - TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed"); - - /* Generate Crypto op data structure */ - ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool, - RTE_CRYPTO_OP_TYPE_SYMMETRIC); - TEST_ASSERT_NOT_NULL(ut_params->op, - "Failed to allocate symmetric crypto operation struct"); - - /* Set crypto operation data parameters */ - rte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess); - - struct rte_crypto_sym_op *sym_op = ut_params->op->sym; - - /* set crypto operation source mbuf */ - sym_op->m_src = ut_params->ibuf; - - sym_op->cipher.data.offset = 0; - sym_op->cipher.data.length = QUOTE_512_BYTES; - - /* Process crypto operation */ - ut_params->op = process_crypto_request(ts_params->valid_devs[0], - ut_params->op); - TEST_ASSERT_NOT_NULL(ut_params->op, "no crypto operation returned"); - - TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS, - "crypto operation processing failed"); - - /* Validate obuf */ - TEST_ASSERT_BUFFERS_ARE_EQUAL( - rte_pktmbuf_mtod(ut_params->op->sym->m_src, uint8_t *), - catch_22_quote, - QUOTE_512_BYTES, - "Ciphertext data not as expected"); - - return TEST_SUCCESS; -} uint8_t orig_data[] = {0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab}; -static int -test_null_auth_only_operation(void) -{ - struct crypto_testsuite_params *ts_params = &testsuite_params; - struct crypto_unittest_params *ut_params = &unittest_params; - uint8_t *digest; - - /* Verify the capabilities */ - struct rte_cryptodev_sym_capability_idx cap_idx; - cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH; - cap_idx.algo.auth = RTE_CRYPTO_AUTH_NULL; - if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], - &cap_idx) == NULL) - return -ENOTSUP; - - /* Generate test mbuf data and space for digest */ - ut_params->ibuf = setup_test_string(ts_params->mbuf_pool, - catch_22_quote, QUOTE_512_BYTES, 0); - - /* create a pointer for digest, but don't expect anything to be written - * here in a NULL auth algo so no mbuf append done. - */ - digest = rte_pktmbuf_mtod_offset(ut_params->ibuf, uint8_t *, - QUOTE_512_BYTES); - /* prefill the memory pointed to by digest */ - memcpy(digest, orig_data, sizeof(orig_data)); - - /* Setup HMAC Parameters */ - ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH; - ut_params->auth_xform.next = NULL; - - ut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_NULL; - ut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE; - - ut_params->sess = rte_cryptodev_sym_session_create( - ts_params->session_mpool); - - /* Create Crypto session*/ - rte_cryptodev_sym_session_init(ts_params->valid_devs[0], - ut_params->sess, &ut_params->auth_xform, - ts_params->session_priv_mpool); - TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed"); - - /* Generate Crypto op data structure */ - ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool, - RTE_CRYPTO_OP_TYPE_SYMMETRIC); - TEST_ASSERT_NOT_NULL(ut_params->op, - "Failed to allocate symmetric crypto operation struct"); - - /* Set crypto operation data parameters */ - rte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess); - - struct rte_crypto_sym_op *sym_op = ut_params->op->sym; - - sym_op->m_src = ut_params->ibuf; - - sym_op->auth.data.offset = 0; - sym_op->auth.data.length = QUOTE_512_BYTES; - sym_op->auth.digest.data = digest; - sym_op->auth.digest.phys_addr = rte_pktmbuf_iova_offset(ut_params->ibuf, - QUOTE_512_BYTES); - - /* Process crypto operation */ - ut_params->op = process_crypto_request(ts_params->valid_devs[0], - ut_params->op); - TEST_ASSERT_NOT_NULL(ut_params->op, "no crypto operation returned"); - - TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS, - "crypto operation processing failed"); - /* Make sure memory pointed to by digest hasn't been overwritten */ - TEST_ASSERT_BUFFERS_ARE_EQUAL( - orig_data, - digest, - sizeof(orig_data), - "Memory at digest ptr overwritten unexpectedly"); - - return TEST_SUCCESS; -} - - -static int -test_null_cipher_auth_operation(void) -{ - struct crypto_testsuite_params *ts_params = &testsuite_params; - struct crypto_unittest_params *ut_params = &unittest_params; - uint8_t *digest; - - /* Verify the capabilities */ - struct rte_cryptodev_sym_capability_idx cap_idx; - cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH; - cap_idx.algo.auth = RTE_CRYPTO_AUTH_NULL; - if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], - &cap_idx) == NULL) - return -ENOTSUP; - cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; - cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_NULL; - if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], - &cap_idx) == NULL) - return -ENOTSUP; - - /* Generate test mbuf data and space for digest */ - ut_params->ibuf = setup_test_string(ts_params->mbuf_pool, - catch_22_quote, QUOTE_512_BYTES, 0); - - /* create a pointer for digest, but don't expect anything to be written - * here in a NULL auth algo so no mbuf append done. - */ - digest = rte_pktmbuf_mtod_offset(ut_params->ibuf, uint8_t *, - QUOTE_512_BYTES); - /* prefill the memory pointed to by digest */ - memcpy(digest, orig_data, sizeof(orig_data)); - - /* Setup Cipher Parameters */ - ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER; - ut_params->cipher_xform.next = &ut_params->auth_xform; - - ut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL; - ut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT; - - /* Setup HMAC Parameters */ - ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH; - ut_params->auth_xform.next = NULL; - - ut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_NULL; - ut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE; - - ut_params->sess = rte_cryptodev_sym_session_create( - ts_params->session_mpool); - - /* Create Crypto session*/ - rte_cryptodev_sym_session_init(ts_params->valid_devs[0], - ut_params->sess, &ut_params->cipher_xform, - ts_params->session_priv_mpool); - TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed"); - - /* Generate Crypto op data structure */ - ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool, - RTE_CRYPTO_OP_TYPE_SYMMETRIC); - TEST_ASSERT_NOT_NULL(ut_params->op, - "Failed to allocate symmetric crypto operation struct"); - - /* Set crypto operation data parameters */ - rte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess); - - struct rte_crypto_sym_op *sym_op = ut_params->op->sym; - - sym_op->m_src = ut_params->ibuf; - - sym_op->cipher.data.offset = 0; - sym_op->cipher.data.length = QUOTE_512_BYTES; - - sym_op->auth.data.offset = 0; - sym_op->auth.data.length = QUOTE_512_BYTES; - sym_op->auth.digest.data = digest; - sym_op->auth.digest.phys_addr = rte_pktmbuf_iova_offset(ut_params->ibuf, - QUOTE_512_BYTES); - - /* Process crypto operation */ - ut_params->op = process_crypto_request(ts_params->valid_devs[0], - ut_params->op); - TEST_ASSERT_NOT_NULL(ut_params->op, "no crypto operation returned"); - - TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS, - "crypto operation processing failed"); - - /* Validate obuf */ - TEST_ASSERT_BUFFERS_ARE_EQUAL( - rte_pktmbuf_mtod(ut_params->op->sym->m_src, uint8_t *), - catch_22_quote, - QUOTE_512_BYTES, - "Ciphertext data not as expected"); - /* Make sure memory pointed to by digest hasn't been overwritten */ - TEST_ASSERT_BUFFERS_ARE_EQUAL( - orig_data, - digest, - sizeof(orig_data), - "Memory at digest ptr overwritten unexpectedly"); - - return TEST_SUCCESS; -} - -static int -test_null_auth_cipher_operation(void) -{ - struct crypto_testsuite_params *ts_params = &testsuite_params; - struct crypto_unittest_params *ut_params = &unittest_params; - uint8_t *digest; - - /* Verify the capabilities */ - struct rte_cryptodev_sym_capability_idx cap_idx; - cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH; - cap_idx.algo.auth = RTE_CRYPTO_AUTH_NULL; - if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], - &cap_idx) == NULL) - return -ENOTSUP; - cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; - cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_NULL; - if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0], - &cap_idx) == NULL) - return -ENOTSUP; - - /* Generate test mbuf data */ - ut_params->ibuf = setup_test_string(ts_params->mbuf_pool, - catch_22_quote, QUOTE_512_BYTES, 0); - - /* create a pointer for digest, but don't expect anything to be written - * here in a NULL auth algo so no mbuf append done. - */ - digest = rte_pktmbuf_mtod_offset(ut_params->ibuf, uint8_t *, - QUOTE_512_BYTES); - /* prefill the memory pointed to by digest */ - memcpy(digest, orig_data, sizeof(orig_data)); - - /* Setup Cipher Parameters */ - ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER; - ut_params->cipher_xform.next = NULL; - - ut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL; - ut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT; - - /* Setup HMAC Parameters */ - ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH; - ut_params->auth_xform.next = &ut_params->cipher_xform; - - ut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_NULL; - ut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE; - - ut_params->sess = rte_cryptodev_sym_session_create( - ts_params->session_mpool); - - /* Create Crypto session*/ - rte_cryptodev_sym_session_init(ts_params->valid_devs[0], - ut_params->sess, &ut_params->cipher_xform, - ts_params->session_priv_mpool); - TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed"); - - /* Generate Crypto op data structure */ - ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool, - RTE_CRYPTO_OP_TYPE_SYMMETRIC); - TEST_ASSERT_NOT_NULL(ut_params->op, - "Failed to allocate symmetric crypto operation struct"); - - /* Set crypto operation data parameters */ - rte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess); - - struct rte_crypto_sym_op *sym_op = ut_params->op->sym; - - sym_op->m_src = ut_params->ibuf; - - sym_op->cipher.data.offset = 0; - sym_op->cipher.data.length = QUOTE_512_BYTES; - - sym_op->auth.data.offset = 0; - sym_op->auth.data.length = QUOTE_512_BYTES; - sym_op->auth.digest.data = digest; - sym_op->auth.digest.phys_addr = rte_pktmbuf_iova_offset(ut_params->ibuf, - QUOTE_512_BYTES); - - /* Process crypto operation */ - ut_params->op = process_crypto_request(ts_params->valid_devs[0], - ut_params->op); - TEST_ASSERT_NOT_NULL(ut_params->op, "no crypto operation returned"); - - TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS, - "crypto operation processing failed"); - - /* Validate obuf */ - TEST_ASSERT_BUFFERS_ARE_EQUAL( - rte_pktmbuf_mtod(ut_params->op->sym->m_src, uint8_t *), - catch_22_quote, - QUOTE_512_BYTES, - "Ciphertext data not as expected"); - /* Make sure memory pointed to by digest hasn't been overwritten */ - TEST_ASSERT_BUFFERS_ARE_EQUAL( - orig_data, - digest, - sizeof(orig_data), - "Memory at digest ptr overwritten unexpectedly"); - - return TEST_SUCCESS; -} - static int test_null_invalid_operation(void) @@ -12631,16 +12280,6 @@ struct test_crypto_vector { TEST_CASE_ST(ut_setup, ut_teardown, test_kasumi_hash_verify_test_case_5), - /** NULL tests */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_null_cipher_only_operation), - TEST_CASE_ST(ut_setup, ut_teardown, - test_null_auth_only_operation), - TEST_CASE_ST(ut_setup, ut_teardown, - test_null_cipher_auth_operation), - TEST_CASE_ST(ut_setup, ut_teardown, - test_null_auth_cipher_operation), - /** Negative tests */ TEST_CASE_ST(ut_setup, ut_teardown, authentication_verify_HMAC_SHA1_fail_data_corrupt), @@ -12854,16 +12493,6 @@ struct test_crypto_vector { TEST_CASE_ST(ut_setup, ut_teardown, test_kasumi_hash_verify_test_case_5), - /** NULL tests */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_null_cipher_only_operation), - TEST_CASE_ST(ut_setup, ut_teardown, - test_null_auth_only_operation), - TEST_CASE_ST(ut_setup, ut_teardown, - test_null_cipher_auth_operation), - TEST_CASE_ST(ut_setup, ut_teardown, - test_null_auth_cipher_operation), - /** Negative tests */ TEST_CASE_ST(ut_setup, ut_teardown, authentication_verify_HMAC_SHA1_fail_data_corrupt), From patchwork Fri Jul 3 05:41:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Dwivedi X-Patchwork-Id: 72937 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 536D3A0519; Fri, 3 Jul 2020 07:44:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AA3391DA1F; Fri, 3 Jul 2020 07:43:45 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 36A901D9E8 for ; Fri, 3 Jul 2020 07:43:44 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0635eATh011591; Thu, 2 Jul 2020 22:43:43 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=TVFGkT92+gicbRY8YcCgmVilh8ubOs4clUr7DSXF9r8=; b=fBUi3CuGv7e6B6WvarL4Gv4Y+4jygNvNzyGWP6YJZ8AbHwbdHT3yDLp8YZEhj/uFsQvz tkLuPjDkFCQK/EXD/Dr+UEy6wGA/IqPBRi+ODbjvnksP3ugFNUoNOnLE0fxuGA50e3aN NZP309FZwFEK5vfRNebq4Fpu8Da2HWRuo/14kt/0dzKhx2YIfoHEzNWbMpujg+ALgO5M QR37plW94+UmmbyrJ5tCBCsN73/TxLGjQuRxPiHUtHFAErTNovkYjXM/AM+IJKQzgZXs wD7dTsYxLQXmsIxapCZaXxRSWUiufrH6UYweKPPa2tlu/QRuUl7ZiMWxVDzymJz34t/Y xg== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 321m92tcaq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 02 Jul 2020 22:43:43 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 2 Jul 2020 22:43:42 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 2 Jul 2020 22:43:42 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 2 Jul 2020 22:43:42 -0700 Received: from hyd1349.t110.caveonetworks.com (unknown [10.29.45.13]) by maili.marvell.com (Postfix) with ESMTP id 4AF143F703F; Thu, 2 Jul 2020 22:43:40 -0700 (PDT) From: Ankur Dwivedi To: CC: , , , Ankur Dwivedi Date: Fri, 3 Jul 2020 11:11:44 +0530 Message-ID: <1593754904-1264-8-git-send-email-adwivedi@marvell.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1593754904-1264-1-git-send-email-adwivedi@marvell.com> References: <1591853907-2501-1-git-send-email-adwivedi@marvell.com> <1593754904-1264-1-git-send-email-adwivedi@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-03_01:2020-07-02, 2020-07-03 signatures=0 Subject: [dpdk-dev] [PATCH v2 8/8] test/crypto: use generic testsuite for OCTEON TX/TX2 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: Anoob Joseph This patch enables the generic crypto tests for OCTEON TX and OCTEON TX2 PMDs. Removes the PMD specific tests. Signed-off-by: Ankur Dwivedi Signed-off-by: Anoob Joseph --- app/test/test_cryptodev.c | 398 +--------------------------------------------- 1 file changed, 2 insertions(+), 396 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 92b0b87..d95f759 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -12100,203 +12100,6 @@ struct test_crypto_vector { } }; -static struct unit_test_suite cryptodev_octeontx_testsuite = { - .suite_name = "Crypto Device OCTEONTX Unit Test Suite", - .setup = testsuite_setup, - .teardown = testsuite_teardown, - .unit_test_cases = { - TEST_CASE_ST(ut_setup, ut_teardown, test_AES_chain_all), - TEST_CASE_ST(ut_setup, ut_teardown, test_AES_cipheronly_all), - TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_chain_all), - TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_cipheronly_all), - TEST_CASE_ST(ut_setup, ut_teardown, test_authonly_all), - - /** AES GCM Authenticated Encryption */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_7), - - /** AES GCM Authenticated Decryption */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_7), - /** AES GMAC Authentication */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GMAC_authentication_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GMAC_authentication_verify_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GMAC_authentication_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GMAC_authentication_verify_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GMAC_authentication_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GMAC_authentication_verify_test_case_3), - - /** SNOW 3G encrypt only (UEA2) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_5), - - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1_oop), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_1_oop), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1_oop_sgl), - - /** SNOW 3G decrypt only (UEA2) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_5), - - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_3), - - /** ZUC encrypt only (EEA3) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_6_sgl), - - /** KASUMI encrypt only (UEA1) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_encryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_encryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_encryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_encryption_test_case_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1_sgl), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1_oop_sgl), - /** KASUMI decrypt only (UEA1) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_decryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_decryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_decryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_decryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_decryption_test_case_5), - - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1_oop), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_decryption_test_case_1_oop), - - /** KASUMI hash only (UIA1) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_5), - - /** Negative tests */ - TEST_CASE_ST(ut_setup, ut_teardown, - authentication_verify_HMAC_SHA1_fail_data_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - authentication_verify_HMAC_SHA1_fail_tag_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - authentication_verify_AES128_GMAC_fail_data_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - authentication_verify_AES128_GMAC_fail_tag_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - auth_decryption_AES128CBC_HMAC_SHA1_fail_data_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt), - TEST_CASES_END() /**< NULL terminate unit test array */ - } -}; - static struct unit_test_suite cryptodev_nitrox_testsuite = { .suite_name = "Crypto NITROX Unit Test Suite", .setup = testsuite_setup, @@ -12313,203 +12116,6 @@ struct test_crypto_vector { } }; -static struct unit_test_suite cryptodev_octeontx2_testsuite = { - .suite_name = "Crypto Device OCTEON TX2 Unit Test Suite", - .setup = testsuite_setup, - .teardown = testsuite_teardown, - .unit_test_cases = { - TEST_CASE_ST(ut_setup, ut_teardown, test_AES_chain_all), - TEST_CASE_ST(ut_setup, ut_teardown, test_AES_cipheronly_all), - TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_chain_all), - TEST_CASE_ST(ut_setup, ut_teardown, test_3DES_cipheronly_all), - TEST_CASE_ST(ut_setup, ut_teardown, test_authonly_all), - - /** AES GCM Authenticated Encryption */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_7), - - /** AES GCM Authenticated Decryption */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_7), - /** AES GMAC Authentication */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GMAC_authentication_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GMAC_authentication_verify_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GMAC_authentication_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GMAC_authentication_verify_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GMAC_authentication_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_AES_GMAC_authentication_verify_test_case_3), - - /** SNOW 3G encrypt only (UEA2) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_5), - - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1_oop), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_1_oop), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1_oop_sgl), - - /** SNOW 3G decrypt only (UEA2) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_decryption_test_case_5), - - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_3), - - /** ZUC encrypt only (EEA3) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_zuc_encryption_test_case_6_sgl), - - /** KASUMI encrypt only (UEA1) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_encryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_encryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_encryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_encryption_test_case_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1_sgl), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1_oop_sgl), - /** KASUMI decrypt only (UEA1) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_decryption_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_decryption_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_decryption_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_decryption_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_decryption_test_case_5), - - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1_oop), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_decryption_test_case_1_oop), - - /** KASUMI hash only (UIA1) */ - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_5), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_6), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_1), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_2), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_3), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_4), - TEST_CASE_ST(ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_5), - - /** Negative tests */ - TEST_CASE_ST(ut_setup, ut_teardown, - authentication_verify_HMAC_SHA1_fail_data_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - authentication_verify_HMAC_SHA1_fail_tag_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - authentication_verify_AES128_GMAC_fail_data_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - authentication_verify_AES128_GMAC_fail_tag_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - auth_decryption_AES128CBC_HMAC_SHA1_fail_data_corrupt), - TEST_CASE_ST(ut_setup, ut_teardown, - auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt), - TEST_CASES_END() /**< NULL terminate unit test array */ - } -}; - static int test_cryptodev_qat(void /*argv __rte_unused, int argc __rte_unused*/) { @@ -12820,7 +12426,7 @@ struct test_crypto_vector { "testsuite.\n"); return TEST_FAILED; } - return unit_test_suite_runner(&cryptodev_octeontx_testsuite); + return unit_test_suite_runner(&cryptodev_testsuite); } static int @@ -12835,7 +12441,7 @@ struct test_crypto_vector { "testsuite.\n"); return TEST_FAILED; } - return unit_test_suite_runner(&cryptodev_octeontx2_testsuite); + return unit_test_suite_runner(&cryptodev_testsuite); } static int