test/crypto: support mlx5 driver
authorShiri Kuzin <shirik@nvidia.com>
Tue, 20 Jul 2021 13:09:44 +0000 (16:09 +0300)
committerAkhil Goyal <gakhil@marvell.com>
Tue, 20 Jul 2021 20:27:00 +0000 (22:27 +0200)
In order to test the new mlx5 crypto PMD, the driver is added to the
crypto test application.

Signed-off-by: Shiri Kuzin <shirik@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
app/test/test_cryptodev.c
app/test/test_cryptodev.h
doc/guides/cryptodevs/mlx5.rst

index 31201d9..c752c1e 100644 (file)
@@ -14569,6 +14569,12 @@ test_cryptodev_cpu_aesni_gcm(void)
        return rc;
 }
 
+static int
+test_cryptodev_mlx5(void)
+{
+       return run_cryptodev_testsuite(RTE_STR(CRYPTODEV_NAME_MLX5_PMD));
+}
+
 static int
 test_cryptodev_null(void)
 {
@@ -14797,6 +14803,7 @@ REGISTER_TEST_COMMAND(cryptodev_openssl_autotest, test_cryptodev_openssl);
 REGISTER_TEST_COMMAND(cryptodev_aesni_gcm_autotest, test_cryptodev_aesni_gcm);
 REGISTER_TEST_COMMAND(cryptodev_cpu_aesni_gcm_autotest,
        test_cryptodev_cpu_aesni_gcm);
+REGISTER_TEST_COMMAND(cryptodev_mlx5_autotest, test_cryptodev_mlx5);
 REGISTER_TEST_COMMAND(cryptodev_null_autotest, test_cryptodev_null);
 REGISTER_TEST_COMMAND(cryptodev_sw_snow3g_autotest, test_cryptodev_sw_snow3g);
 REGISTER_TEST_COMMAND(cryptodev_sw_kasumi_autotest, test_cryptodev_sw_kasumi);
index 5bf1e88..31e2782 100644 (file)
@@ -73,6 +73,8 @@
 #define CRYPTODEV_NAME_BCMFS_PMD       crypto_bcmfs
 #define CRYPTODEV_NAME_CN9K_PMD                crypto_cn9k
 #define CRYPTODEV_NAME_CN10K_PMD       crypto_cn10k
+#define CRYPTODEV_NAME_MLX5_PMD                crypto_mlx5
+
 
 enum cryptodev_api_test_type {
        CRYPTODEV_API_TEST = 0,
index 2199ac7..908a25a 100644 (file)
@@ -99,6 +99,11 @@ The mlxreg dedicated tool should be used as follows:
   The "wrapped_crypto_operational" value will be "0x00000001" if the mode was
   successfully changed to operational mode.
 
+  The mlx5 crypto PMD can be verfied by running the test application::
+
+     dpdk-test -c 1 -n 1 -w <dev>,class=crypto,wcs_file=<file_path>
+     RTE>>cryptodev_mlx5_autotest
+
 
 Driver options
 --------------