test/crypto: fix device id when stopping port
authorHemant Agrawal <hemant.agrawal@nxp.com>
Wed, 4 Jul 2018 09:49:38 +0000 (15:19 +0530)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Tue, 10 Jul 2018 22:57:51 +0000 (00:57 +0200)
dev_id is valid, while ts_params->valid_devs[devid] may
result a different value in case multiple devices are present
and any of the device is being used.

Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
test/test/test_cryptodev.c

index 389f796..e252fee 100644 (file)
@@ -585,7 +585,7 @@ test_device_configure_invalid_dev_id(void)
        dev_id = ts_params->valid_devs[ts_params->valid_dev_count - 1];
 
        /* Stop the device in case it's started so it can be configured */
-       rte_cryptodev_stop(ts_params->valid_devs[dev_id]);
+       rte_cryptodev_stop(dev_id);
 
        TEST_ASSERT_SUCCESS(rte_cryptodev_configure(dev_id, &ts_params->conf),
                        "Failed test for rte_cryptodev_configure: "