From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C2C3C04AB5 for ; Mon, 3 Jun 2019 14:55:50 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id F011D27A36 for ; Mon, 3 Jun 2019 14:55:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F011D27A36 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AF9771B9C4; Mon, 3 Jun 2019 16:54:35 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 1FE581B9A0 for ; Mon, 3 Jun 2019 16:54:19 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jun 2019 07:54:19 -0700 X-ExtLoop1: 1 Received: from damiannx-mobl1.ger.corp.intel.com ([10.103.104.100]) by fmsmga001.fm.intel.com with ESMTP; 03 Jun 2019 07:54:18 -0700 From: Nowak To: dev@dpdk.org Cc: fiona.trahe@intel.com, arkadiuszx.kusztal@intel.com, Damian Nowak Date: Mon, 3 Jun 2019 16:50:47 +0200 Message-Id: <20190603145048.2596-9-damianx.nowak@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190603145048.2596-1-damianx.nowak@intel.com> References: <20190603145048.2596-1-damianx.nowak@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 8/9] test/crypto: add digest encrypted feature flag check 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: Damian Nowak This patch adds checking of digest encrypted feature flag for auth-cipher out-of-place operations test cases to determine if the operations are supported. Signed-off-by: Damian Nowak --- app/test/test_cryptodev.c | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 231039f..937849e 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -4339,6 +4339,19 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata, unsigned int ciphertext_pad_len; unsigned int ciphertext_len; + struct rte_cryptodev_info dev_info; + + rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); + + uint64_t feat_flags = dev_info.feature_flags; + + if (op_mode == OUT_OF_PLACE) { + if (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) { + printf("Device doesn't support digest encrypted.\n"); + return -ENOTSUP; + } + } + /* Create SNOW 3G session */ retval = create_wireless_algo_auth_cipher_session( ts_params->valid_devs[0], @@ -4501,16 +4514,18 @@ test_snow3g_auth_cipher_sgl(const struct snow3g_test_data *tdata, if (op_mode == IN_PLACE) { if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) { printf("Device doesn't support in-place scatter-gather " - "in both input and output mbufs. " - "Test Skipped.\n"); - return 0; + "in both input and output mbufs.\n"); + return -ENOTSUP; } } else { if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) { printf("Device doesn't support out-of-place scatter-gather " - "in both input and output mbufs. " - "Test Skipped.\n"); - return 0; + "in both input and output mbufs.\n"); + return -ENOTSUP; + } + if (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) { + printf("Device doesn't support digest encrypted.\n"); + return -ENOTSUP; } } @@ -4672,6 +4687,19 @@ test_kasumi_auth_cipher(const struct kasumi_test_data *tdata, unsigned int ciphertext_pad_len; unsigned int ciphertext_len; + struct rte_cryptodev_info dev_info; + + rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); + + uint64_t feat_flags = dev_info.feature_flags; + + if (op_mode == OUT_OF_PLACE) { + if (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) { + printf("Device doesn't support digest encrypted.\n"); + return -ENOTSUP; + } + } + /* Create KASUMI session */ retval = create_wireless_algo_auth_cipher_session( ts_params->valid_devs[0], -- 2.7.4