From patchwork Sat Sep 22 13:33:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fiona Trahe X-Patchwork-Id: 45172 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E2660F04; Sat, 22 Sep 2018 15:33:48 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 84B7FA49; Sat, 22 Sep 2018 15:33:46 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Sep 2018 06:33:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,289,1534834800"; d="scan'208";a="265806171" Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain) ([10.237.217.45]) by fmsmga006.fm.intel.com with ESMTP; 22 Sep 2018 06:33:44 -0700 From: Fiona Trahe To: dev@dpdk.org Cc: akhil.goyal@nxp.com, stable@dpdk.org, Fiona Trahe Date: Sat, 22 Sep 2018 14:33:36 +0100 Message-Id: <1537623216-592-1-git-send-email-fiona.trahe@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] test/crypto: fix number of queue pairs 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" Some of the tests use a QAT-specific value (2) for maximum nr of queue pairs to create valid/invalid test cases. This has accidentally worked ok as default max_qps for all PMDs is larger. It is incorrect however and would fail if a device had a max lower than the QAT value. Instead use the value returned by the PMD in the rte_cryptodev_get_info query, this value is stored in the ts_params. Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests") Cc: stable@dpdk.org Signed-off-by: Fiona Trahe Acked-by: Akhil Goyal --- test/test/test_cryptodev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c index a6044b2..c63662d 100644 --- a/test/test/test_cryptodev.c +++ b/test/test/test_cryptodev.c @@ -635,7 +635,7 @@ test_device_configure_invalid_queue_pair_ids(void) /* valid - max value queue pairs */ - ts_params->conf.nb_queue_pairs = MAX_NUM_QPS_PER_QAT_DEVICE; + ts_params->conf.nb_queue_pairs = orig_nb_qps; TEST_ASSERT_SUCCESS(rte_cryptodev_configure(ts_params->valid_devs[0], &ts_params->conf), @@ -667,7 +667,7 @@ test_device_configure_invalid_queue_pair_ids(void) /* invalid - max value + 1 queue pairs */ - ts_params->conf.nb_queue_pairs = MAX_NUM_QPS_PER_QAT_DEVICE + 1; + ts_params->conf.nb_queue_pairs = orig_nb_qps + 1; TEST_ASSERT_FAIL(rte_cryptodev_configure(ts_params->valid_devs[0], &ts_params->conf), @@ -819,7 +819,7 @@ test_queue_pair_descriptor_setup(void) /* test invalid queue pair id */ qp_conf.nb_descriptors = DEFAULT_NUM_OPS_INFLIGHT; /*valid */ - qp_id = DEFAULT_NUM_QPS_PER_QAT_DEVICE; /*invalid */ + qp_id = ts_params->conf.nb_queue_pairs; /*invalid */ TEST_ASSERT_FAIL(rte_cryptodev_queue_pair_setup( ts_params->valid_devs[0],