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 05684A0588; Thu, 16 Apr 2020 15:26:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 60BC01DCC4; Thu, 16 Apr 2020 15:26:18 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id EC5771DCB9 for ; Thu, 16 Apr 2020 15:26:15 +0200 (CEST) IronPort-SDR: ZBWPpUv1Zn/Hu+h4S4HYjEO76DjEU4xUc5j9X/IkV8RA9CHxUZIn8O6uuoHjWNkTE0tcgTlFaW Edp10yt1bV6Q== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2020 06:26:15 -0700 IronPort-SDR: /pGmJOxjGRwwRCwF8E+9AmMEqX7tXkcITwIug3v5RuEt7GPv8qscAwqmpk1hgkztyGnvxXlzik OBCPD2KUO+/Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,391,1580803200"; d="scan'208";a="244396660" Received: from silpixa00400565.ir.intel.com (HELO silpixa00400565.ger.corp.intel.com) ([10.237.222.249]) by fmsmga007.fm.intel.com with ESMTP; 16 Apr 2020 06:26:12 -0700 From: Pablo de Lara To: declan.doherty@intel.com, ravi1.kumar@amd.com, ruifeng.wang@arm.com, anoobj@marvell.com, roy.fan.zhang@intel.com, fiona.trahe@intel.com, tdu@semihalf.com, rnagadheeraj@marvell.com, adwivedi@marvell.com, g.singh@nxp.com, hemant.agrawal@nxp.com, jianjay.zhou@huawei.com Cc: dev@dpdk.org, akhil.goyal@nxp.com, Pablo de Lara , Adam Dybkowski Date: Thu, 16 Apr 2020 10:25:30 +0100 Message-Id: <20200416092532.1922099-3-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200416092532.1922099-1-pablo.de.lara.guarch@intel.com> References: <1586887459-222433-1-git-send-email-pablo.de.lara.guarch@intel.com> <20200416092532.1922099-1-pablo.de.lara.guarch@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 2/4] test/crypto: check if device supports sessionless 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" Before running any sessionless test cases, check if device supports this mode. Signed-off-by: Pablo de Lara Acked-by: Adam Dybkowski --- app/test/test_cryptodev_blockcipher.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c index 845347088..43f9d17da 100644 --- a/app/test/test_cryptodev_blockcipher.c +++ b/app/test/test_cryptodev_blockcipher.c @@ -131,9 +131,18 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t, uint32_t nb_iterates = 0; rte_cryptodev_info_get(dev_id, &dev_info); + uint64_t feat_flags = dev_info.feature_flags; + if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SESSIONLESS) { + if (!(feat_flags & RTE_CRYPTODEV_FF_SYM_SESSIONLESS)) { + printf("Device doesn't support sesionless operations " + "Test Skipped.\n"); + snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, + "SKIPPED"); + return 0; + } + } if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SG) { - uint64_t feat_flags = dev_info.feature_flags; uint64_t oop_flag = RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT; if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_OOP) { -- 2.25.2