test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1 1/3] tests: add new case in cryptodev unit-test
@ 2019-06-06  0:23 Xinfeng Zhao
  2019-06-06  0:23 ` [dts] [PATCH V1 2/3] tests: modify cryptodev suites to avoid Reaching the maximum number of crypto devices Xinfeng Zhao
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Xinfeng Zhao @ 2019-06-06  0:23 UTC (permalink / raw)
  To: dts; +Cc: Xinfeng Zhao

add new case "cryptodev_qat_asym_autotest"

Signed-off-by: Xinfeng Zhao <xinfengx.zhao@intel.com>
---
 tests/TestSuite_unit_tests_cryptodev_func.py |  4 ++++
 tests/cryptodev_common.py                    | 16 +++++++++++++---
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_unit_tests_cryptodev_func.py b/tests/TestSuite_unit_tests_cryptodev_func.py
index 3b62e04..d6b01f0 100644
--- a/tests/TestSuite_unit_tests_cryptodev_func.py
+++ b/tests/TestSuite_unit_tests_cryptodev_func.py
@@ -57,6 +57,10 @@ class UnitTestsCryptodev(TestCase):
         eal_opt_str = cc.get_eal_opt_str(self)
         self.__run_unit_test("cryptodev_qat_autotest", eal_opt_str)
 
+    def test_cryptodev_qat_asym_autotest(self):
+        eal_opt_str = cc.get_eal_opt_str(self)
+        self.__run_unit_test("cryptodev_qat_asym_autotest", eal_opt_str)
+
     def _test_cryptodev_qat_perftest(self):
         eal_opt_str = cc.get_eal_opt_str(self)
         self.__run_unit_test("cryptodev_qat_perftest", eal_opt_str)
diff --git a/tests/cryptodev_common.py b/tests/cryptodev_common.py
index 5570f7a..2e86bca 100644
--- a/tests/cryptodev_common.py
+++ b/tests/cryptodev_common.py
@@ -56,6 +56,8 @@ def build_dpdk_with_cryptodev(test_case):
     test_case.dut.send_expect(
         "sed -i 's/CONFIG_RTE_LIBRTE_PMD_QAT_SYM=n$/CONFIG_RTE_LIBRTE_PMD_QAT_SYM=y/' config/common_base", "# ")
     test_case.dut.send_expect(
+        "sed -i 's/CONFIG_RTE_LIBRTE_PMD_QAT_ASYM=n$/CONFIG_RTE_LIBRTE_PMD_QAT_ASYM=y/' config/common_base", "# ")
+    test_case.dut.send_expect(
         "sed -i 's/CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n$/CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=y/' config/common_base", "# ")
     test_case.dut.send_expect(
         "sed -i 's/CONFIG_RTE_LIBRTE_PMD_OPENSSL=n$/CONFIG_RTE_LIBRTE_PMD_OPENSSL=y/' config/common_base", "# ")
@@ -103,6 +105,8 @@ def clear_dpdk_config(test_case):
     test_case.dut.send_expect(
         "sed -i 's/CONFIG_RTE_LIBRTE_PMD_QAT_SYM=y$/CONFIG_RTE_LIBRTE_PMD_QAT_SYM=n/' config/common_base", "# ")
     test_case.dut.send_expect(
+        "sed -i 's/CONFIG_RTE_LIBRTE_PMD_QAT_ASYM=y$/CONFIG_RTE_LIBRTE_PMD_QAT_ASYM=n/' config/common_base", "# ")
+    test_case.dut.send_expect(
         "sed -i 's/CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=y$/CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n/' config/common_base", "# ")
     test_case.dut.send_expect(
         "sed -i 's/CONFIG_RTE_LIBRTE_PMD_OPENSSL=y$/CONFIG_RTE_LIBRTE_PMD_OPENSSL=n/' config/common_base", "# ")
@@ -124,11 +128,11 @@ default_eal_opts = {
 }
 
 
-def get_eal_opt_str(test_case, override_eal_opts={}):
-    return get_opt_str(test_case, default_eal_opts, override_eal_opts)
+def get_eal_opt_str(test_case, override_eal_opts={}, add_port=False):
+    return get_opt_str(test_case, default_eal_opts, override_eal_opts, add_port)
 
 
-def get_opt_str(test_case, default_opts, override_opts={}):
+def get_opt_str(test_case, default_opts, override_opts={}, add_port=False):
     opts = default_opts.copy()
 
     # Update options with test suite/case config file
@@ -136,6 +140,12 @@ def get_opt_str(test_case, default_opts, override_opts={}):
         if key in test_case.get_case_cfg():
             opts[key] = test_case.get_case_cfg()[key]
 
+    pci_list = [port["pci"] for port in test_case.dut.ports_info]
+    if 'w' in opts.keys() and opts['w']:
+        pci_list.append(opts['w'])
+    if add_port and pci_list:
+        opts['w'] = " -w ".join(pci_list)
+
     # Update options with func input
     opts.update(override_opts)
 
-- 
2.7.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dts] [PATCH V1 2/3] tests: modify cryptodev suites to avoid Reaching the maximum number of crypto devices
  2019-06-06  0:23 [dts] [PATCH V1 1/3] tests: add new case in cryptodev unit-test Xinfeng Zhao
@ 2019-06-06  0:23 ` Xinfeng Zhao
  2019-06-06  0:23 ` [dts] [PATCH V1 3/3] conf: modify the cryptodev conf and specify the qat crypto device Xinfeng Zhao
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Xinfeng Zhao @ 2019-06-06  0:23 UTC (permalink / raw)
  To: dts; +Cc: Xinfeng Zhao

enable CONFIG_RTE_LIBRTE_PMD_QAT_ASYM in common_base, and an error was found "Reached maximum number of crypto devices",
so cryptodev case need specify the crypto devices to avoid the error

Signed-off-by: Xinfeng Zhao <xinfengx.zhao@intel.com>
---
 tests/TestSuite_crypto_perf_cryptodev_perf.py | 12 ++++++------
 tests/TestSuite_ipsec_gw_cryptodev_func.py    |  2 +-
 tests/TestSuite_l2fwd_cryptodev_func.py       |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/tests/TestSuite_crypto_perf_cryptodev_perf.py b/tests/TestSuite_crypto_perf_cryptodev_perf.py
index f7668e6..38b959f 100644
--- a/tests/TestSuite_crypto_perf_cryptodev_perf.py
+++ b/tests/TestSuite_crypto_perf_cryptodev_perf.py
@@ -106,7 +106,7 @@ class PerfTestsCryptodev(TestCase):
         if cc.is_test_skip(self):
             return
 
-        eal_opt_str = cc.get_eal_opt_str(self, {"w":None})
+        eal_opt_str = cc.get_eal_opt_str(self)
         crypto_perf_opt_str = self._get_crypto_perf_opt_str()
         result = self._run_crypto_perf_throughput(eal_opt_str,
                                                   crypto_perf_opt_str,
@@ -128,7 +128,7 @@ class PerfTestsCryptodev(TestCase):
         if cc.is_test_skip(self):
             return
 
-        eal_opt_str = cc.get_eal_opt_str(self, {"w":None})
+        eal_opt_str = cc.get_eal_opt_str(self)
         crypto_perf_opt_str = self._get_crypto_perf_opt_str()
         result = self._run_crypto_perf_throughput(eal_opt_str,
                                                   crypto_perf_opt_str,
@@ -150,7 +150,7 @@ class PerfTestsCryptodev(TestCase):
         if cc.is_test_skip(self):
             return
 
-        eal_opt_str = cc.get_eal_opt_str(self, {"w":None})
+        eal_opt_str = cc.get_eal_opt_str(self)
         crypto_perf_opt_str = self._get_crypto_perf_opt_str()
         result = self._run_crypto_perf_throughput(eal_opt_str,
                                                   crypto_perf_opt_str,
@@ -172,7 +172,7 @@ class PerfTestsCryptodev(TestCase):
         if cc.is_test_skip(self):
             return
 
-        eal_opt_str = cc.get_eal_opt_str(self, {"w":None})
+        eal_opt_str = cc.get_eal_opt_str(self)
         crypto_perf_opt_str = self._get_crypto_perf_opt_str()
         result = self._run_crypto_perf_throughput(eal_opt_str,
                                                   crypto_perf_opt_str,
@@ -194,7 +194,7 @@ class PerfTestsCryptodev(TestCase):
         if cc.is_test_skip(self):
             return
 
-        eal_opt_str = cc.get_eal_opt_str(self, {"w":None})
+        eal_opt_str = cc.get_eal_opt_str(self)
         crypto_perf_opt_str = self._get_crypto_perf_opt_str()
         result = self._run_crypto_perf_throughput(eal_opt_str,
                                                   crypto_perf_opt_str,
@@ -216,7 +216,7 @@ class PerfTestsCryptodev(TestCase):
         if cc.is_test_skip(self):
             return
 
-        eal_opt_str = cc.get_eal_opt_str(self, {"w":None})
+        eal_opt_str = cc.get_eal_opt_str(self)
         crypto_perf_opt_str = self._get_crypto_perf_opt_str()
         result = self._run_crypto_perf_throughput(eal_opt_str,
                                                   crypto_perf_opt_str,
diff --git a/tests/TestSuite_ipsec_gw_cryptodev_func.py b/tests/TestSuite_ipsec_gw_cryptodev_func.py
index dc49577..4004fc9 100644
--- a/tests/TestSuite_ipsec_gw_cryptodev_func.py
+++ b/tests/TestSuite_ipsec_gw_cryptodev_func.py
@@ -562,7 +562,7 @@ class TestIPsecGW(TestCase):
 
     def _execute_ipsec_gw_test(self, ipsec_gw_opt_str):
         result = True
-        eal_opt_str = cc.get_eal_opt_str(self)
+        eal_opt_str = cc.get_eal_opt_str(self, add_port=True)
 
         cmd_str = cc.get_dpdk_app_cmd_str(self._app_path, eal_opt_str, ipsec_gw_opt_str)
         self.logger.info("IPsec-gw cmd: " + cmd_str)
diff --git a/tests/TestSuite_l2fwd_cryptodev_func.py b/tests/TestSuite_l2fwd_cryptodev_func.py
index 7644f78..7e785dd 100644
--- a/tests/TestSuite_l2fwd_cryptodev_func.py
+++ b/tests/TestSuite_l2fwd_cryptodev_func.py
@@ -829,7 +829,7 @@ class TestL2fwdCrypto(TestCase):
 
     def __test_vector_to_cmd(self, test_vector, core_mask="", port_mask=""):
 
-        eal_opt_str = cc.get_eal_opt_str(self)
+        eal_opt_str = cc.get_eal_opt_str(self, add_port=True)
 
         EAL_SEP = " --"
         PORT_MASK = "" if port_mask == "" else " -p " + port_mask
-- 
2.7.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dts] [PATCH V1 3/3] conf: modify the cryptodev conf and specify the qat crypto device
  2019-06-06  0:23 [dts] [PATCH V1 1/3] tests: add new case in cryptodev unit-test Xinfeng Zhao
  2019-06-06  0:23 ` [dts] [PATCH V1 2/3] tests: modify cryptodev suites to avoid Reaching the maximum number of crypto devices Xinfeng Zhao
@ 2019-06-06  0:23 ` Xinfeng Zhao
  2019-06-11  7:10 ` [dts] [PATCH V1 1/3] tests: add new case in cryptodev unit-test Zhao, XinfengX
  2019-06-12  6:31 ` Tu, Lijuan
  3 siblings, 0 replies; 5+ messages in thread
From: Xinfeng Zhao @ 2019-06-06  0:23 UTC (permalink / raw)
  To: dts; +Cc: Xinfeng Zhao

Signed-off-by: Xinfeng Zhao <xinfengx.zhao@intel.com>
---
 conf/l2fwd_cryptodev_func.cfg        | 3 +++
 conf/unit_tests_cryptodev_func.cfg   | 5 ++++-
 conf/virtio_ipsec_cryptodev_func.cfg | 1 +
 conf/virtio_perf_cryptodev_func.cfg  | 1 +
 conf/virtio_unit_cryptodev_func.cfg  | 1 +
 5 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/conf/l2fwd_cryptodev_func.cfg b/conf/l2fwd_cryptodev_func.cfg
index 6f3b146..a1b2418 100644
--- a/conf/l2fwd_cryptodev_func.cfg
+++ b/conf/l2fwd_cryptodev_func.cfg
@@ -7,6 +7,9 @@ l="9,10,66"
 socket-mem="2048,0"
 n=4
 
+# specify the qat devices in eal white list
+w="0000:1a:01.0 -w 0000:1c:01.0 -w 0000:1e:01.0"
+
 [test_scheduler_rr_AES_CBC_auto]
 vdev="crypto_scheduler_pmd_1,slave=0000:1a:01.0_qat_sym,slave=0000:3f:01.0_qat_sym,slave=0000:3d:01.0_qat_sym,mode=round-robin"
 
diff --git a/conf/unit_tests_cryptodev_func.cfg b/conf/unit_tests_cryptodev_func.cfg
index 9b80025..d5b3b30 100644
--- a/conf/unit_tests_cryptodev_func.cfg
+++ b/conf/unit_tests_cryptodev_func.cfg
@@ -5,4 +5,7 @@ crypto_dev_id="37c9"
 # eal config
 l="9,10,66"
 socket-mem="2048,0 --legacy-mem"
-n=6
\ No newline at end of file
+n=4
+
+# specify the qat device in eal white list to avoid reach the maximum number of crypto devices
+w="0000:1a:01.0"
diff --git a/conf/virtio_ipsec_cryptodev_func.cfg b/conf/virtio_ipsec_cryptodev_func.cfg
index 2e727c6..0b51b7d 100644
--- a/conf/virtio_ipsec_cryptodev_func.cfg
+++ b/conf/virtio_ipsec_cryptodev_func.cfg
@@ -6,6 +6,7 @@ crypto_dev_id="37c9"
 vfio_pci="0000:60:00.0 0000:60:00.1 0000:3b:00.0 0000:3b:00.1"
 
 # default crypto device and sw device config
+w="0000:1a:01.0"
 vdev="crypto_aesni_mb_pmd_1 --vdev crypto_aesni_mb_pmd_2"
 
 [vm0]
diff --git a/conf/virtio_perf_cryptodev_func.cfg b/conf/virtio_perf_cryptodev_func.cfg
index 5a9b2cb..cdadf31 100644
--- a/conf/virtio_perf_cryptodev_func.cfg
+++ b/conf/virtio_perf_cryptodev_func.cfg
@@ -6,6 +6,7 @@ crypto_dev_id="37c9"
 vfio_pci="0000:60:00.0 0000:60:00.1"
 
 # Vhost-crypto option config
+w="0000:1a:01.0"
 vdev="crypto_aesni_mb_pmd_1"
 
 [test_aesni_mb_aes_cbc_sha1_hmac]
diff --git a/conf/virtio_unit_cryptodev_func.cfg b/conf/virtio_unit_cryptodev_func.cfg
index 1ffd418..f8165bd 100644
--- a/conf/virtio_unit_cryptodev_func.cfg
+++ b/conf/virtio_unit_cryptodev_func.cfg
@@ -6,6 +6,7 @@ crypto_dev_id="37c9"
 vfio_pci="0000:60:00.0 0000:60:00.1"
 
 # Vhost-crypto option config
+w="0000:1a:01.0"
 vdev="crypto_aesni_mb_pmd_1"
 
 [vm0]
-- 
2.7.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dts] [PATCH V1 1/3] tests: add new case in cryptodev unit-test
  2019-06-06  0:23 [dts] [PATCH V1 1/3] tests: add new case in cryptodev unit-test Xinfeng Zhao
  2019-06-06  0:23 ` [dts] [PATCH V1 2/3] tests: modify cryptodev suites to avoid Reaching the maximum number of crypto devices Xinfeng Zhao
  2019-06-06  0:23 ` [dts] [PATCH V1 3/3] conf: modify the cryptodev conf and specify the qat crypto device Xinfeng Zhao
@ 2019-06-11  7:10 ` Zhao, XinfengX
  2019-06-12  6:31 ` Tu, Lijuan
  3 siblings, 0 replies; 5+ messages in thread
From: Zhao, XinfengX @ 2019-06-11  7:10 UTC (permalink / raw)
  To: dts

Tested-by: Zhao, XinfengX <xinfengx.zhao@intel.com>

-----Original Message-----
From: Zhao, XinfengX 
Sent: Thursday, June 6, 2019 8:23 AM
To: dts@dpdk.org
Cc: Zhao, XinfengX <xinfengx.zhao@intel.com>
Subject: [dts][PATCH V1 1/3] tests: add new case in cryptodev unit-test

add new case "cryptodev_qat_asym_autotest"

Signed-off-by: Xinfeng Zhao <xinfengx.zhao@intel.com>
---
 tests/TestSuite_unit_tests_cryptodev_func.py |  4 ++++
 tests/cryptodev_common.py                    | 16 +++++++++++++---
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_unit_tests_cryptodev_func.py b/tests/TestSuite_unit_tests_cryptodev_func.py
index 3b62e04..d6b01f0 100644
--- a/tests/TestSuite_unit_tests_cryptodev_func.py
+++ b/tests/TestSuite_unit_tests_cryptodev_func.py
@@ -57,6 +57,10 @@ class UnitTestsCryptodev(TestCase):
         eal_opt_str = cc.get_eal_opt_str(self)
         self.__run_unit_test("cryptodev_qat_autotest", eal_opt_str)
 
+    def test_cryptodev_qat_asym_autotest(self):
+        eal_opt_str = cc.get_eal_opt_str(self)
+        self.__run_unit_test("cryptodev_qat_asym_autotest", 
+ eal_opt_str)
+
     def _test_cryptodev_qat_perftest(self):
         eal_opt_str = cc.get_eal_opt_str(self)
         self.__run_unit_test("cryptodev_qat_perftest", eal_opt_str) diff --git a/tests/cryptodev_common.py b/tests/cryptodev_common.py index 5570f7a..2e86bca 100644
--- a/tests/cryptodev_common.py
+++ b/tests/cryptodev_common.py
@@ -56,6 +56,8 @@ def build_dpdk_with_cryptodev(test_case):
     test_case.dut.send_expect(
         "sed -i 's/CONFIG_RTE_LIBRTE_PMD_QAT_SYM=n$/CONFIG_RTE_LIBRTE_PMD_QAT_SYM=y/' config/common_base", "# ")
     test_case.dut.send_expect(
+        "sed -i 's/CONFIG_RTE_LIBRTE_PMD_QAT_ASYM=n$/CONFIG_RTE_LIBRTE_PMD_QAT_ASYM=y/' config/common_base", "# ")
+    test_case.dut.send_expect(
         "sed -i 's/CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n$/CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=y/' config/common_base", "# ")
     test_case.dut.send_expect(
         "sed -i 's/CONFIG_RTE_LIBRTE_PMD_OPENSSL=n$/CONFIG_RTE_LIBRTE_PMD_OPENSSL=y/' config/common_base", "# ") @@ -103,6 +105,8 @@ def clear_dpdk_config(test_case):
     test_case.dut.send_expect(
         "sed -i 's/CONFIG_RTE_LIBRTE_PMD_QAT_SYM=y$/CONFIG_RTE_LIBRTE_PMD_QAT_SYM=n/' config/common_base", "# ")
     test_case.dut.send_expect(
+        "sed -i 's/CONFIG_RTE_LIBRTE_PMD_QAT_ASYM=y$/CONFIG_RTE_LIBRTE_PMD_QAT_ASYM=n/' config/common_base", "# ")
+    test_case.dut.send_expect(
         "sed -i 's/CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=y$/CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n/' config/common_base", "# ")
     test_case.dut.send_expect(
         "sed -i 's/CONFIG_RTE_LIBRTE_PMD_OPENSSL=y$/CONFIG_RTE_LIBRTE_PMD_OPENSSL=n/' config/common_base", "# ") @@ -124,11 +128,11 @@ default_eal_opts = {  }
 
 
-def get_eal_opt_str(test_case, override_eal_opts={}):
-    return get_opt_str(test_case, default_eal_opts, override_eal_opts)
+def get_eal_opt_str(test_case, override_eal_opts={}, add_port=False):
+    return get_opt_str(test_case, default_eal_opts, override_eal_opts, 
+add_port)
 
 
-def get_opt_str(test_case, default_opts, override_opts={}):
+def get_opt_str(test_case, default_opts, override_opts={}, add_port=False):
     opts = default_opts.copy()
 
     # Update options with test suite/case config file @@ -136,6 +140,12 @@ def get_opt_str(test_case, default_opts, override_opts={}):
         if key in test_case.get_case_cfg():
             opts[key] = test_case.get_case_cfg()[key]
 
+    pci_list = [port["pci"] for port in test_case.dut.ports_info]
+    if 'w' in opts.keys() and opts['w']:
+        pci_list.append(opts['w'])
+    if add_port and pci_list:
+        opts['w'] = " -w ".join(pci_list)
+
     # Update options with func input
     opts.update(override_opts)
 
--
2.7.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dts] [PATCH V1 1/3] tests: add new case in cryptodev unit-test
  2019-06-06  0:23 [dts] [PATCH V1 1/3] tests: add new case in cryptodev unit-test Xinfeng Zhao
                   ` (2 preceding siblings ...)
  2019-06-11  7:10 ` [dts] [PATCH V1 1/3] tests: add new case in cryptodev unit-test Zhao, XinfengX
@ 2019-06-12  6:31 ` Tu, Lijuan
  3 siblings, 0 replies; 5+ messages in thread
From: Tu, Lijuan @ 2019-06-12  6:31 UTC (permalink / raw)
  To: Zhao, XinfengX, dts; +Cc: Zhao, XinfengX

Applied the series.

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xinfeng Zhao
> Sent: Thursday, June 6, 2019 8:23 AM
> To: dts@dpdk.org
> Cc: Zhao, XinfengX <xinfengx.zhao@intel.com>
> Subject: [dts] [PATCH V1 1/3] tests: add new case in cryptodev unit-test
> 
> add new case "cryptodev_qat_asym_autotest"
> 
> Signed-off-by: Xinfeng Zhao <xinfengx.zhao@intel.com>
> ---
>  tests/TestSuite_unit_tests_cryptodev_func.py |  4 ++++
>  tests/cryptodev_common.py                    | 16 +++++++++++++---
>  2 files changed, 17 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/TestSuite_unit_tests_cryptodev_func.py
> b/tests/TestSuite_unit_tests_cryptodev_func.py
> index 3b62e04..d6b01f0 100644
> --- a/tests/TestSuite_unit_tests_cryptodev_func.py
> +++ b/tests/TestSuite_unit_tests_cryptodev_func.py
> @@ -57,6 +57,10 @@ class UnitTestsCryptodev(TestCase):
>          eal_opt_str = cc.get_eal_opt_str(self)
>          self.__run_unit_test("cryptodev_qat_autotest", eal_opt_str)
> 
> +    def test_cryptodev_qat_asym_autotest(self):
> +        eal_opt_str = cc.get_eal_opt_str(self)
> +        self.__run_unit_test("cryptodev_qat_asym_autotest",
> + eal_opt_str)
> +
>      def _test_cryptodev_qat_perftest(self):
>          eal_opt_str = cc.get_eal_opt_str(self)
>          self.__run_unit_test("cryptodev_qat_perftest", eal_opt_str) diff --git
> a/tests/cryptodev_common.py b/tests/cryptodev_common.py index
> 5570f7a..2e86bca 100644
> --- a/tests/cryptodev_common.py
> +++ b/tests/cryptodev_common.py
> @@ -56,6 +56,8 @@ def build_dpdk_with_cryptodev(test_case):
>      test_case.dut.send_expect(
>          "sed -i
> 's/CONFIG_RTE_LIBRTE_PMD_QAT_SYM=n$/CONFIG_RTE_LIBRTE_PMD_QAT_
> SYM=y/' config/common_base", "# ")
>      test_case.dut.send_expect(
> +        "sed -i
> 's/CONFIG_RTE_LIBRTE_PMD_QAT_ASYM=n$/CONFIG_RTE_LIBRTE_PMD_QAT
> _ASYM=y/' config/common_base", "# ")
> +    test_case.dut.send_expect(
>          "sed -i
> 's/CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n$/CONFIG_RTE_LIBRTE_PMD_AE
> SNI_GCM=y/' config/common_base", "# ")
>      test_case.dut.send_expect(
>          "sed -i
> 's/CONFIG_RTE_LIBRTE_PMD_OPENSSL=n$/CONFIG_RTE_LIBRTE_PMD_OPENS
> SL=y/' config/common_base", "# ") @@ -103,6 +105,8 @@ def
> clear_dpdk_config(test_case):
>      test_case.dut.send_expect(
>          "sed -i
> 's/CONFIG_RTE_LIBRTE_PMD_QAT_SYM=y$/CONFIG_RTE_LIBRTE_PMD_QAT_
> SYM=n/' config/common_base", "# ")
>      test_case.dut.send_expect(
> +        "sed -i
> 's/CONFIG_RTE_LIBRTE_PMD_QAT_ASYM=y$/CONFIG_RTE_LIBRTE_PMD_QAT
> _ASYM=n/' config/common_base", "# ")
> +    test_case.dut.send_expect(
>          "sed -i
> 's/CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=y$/CONFIG_RTE_LIBRTE_PMD_AES
> NI_GCM=n/' config/common_base", "# ")
>      test_case.dut.send_expect(
>          "sed -i
> 's/CONFIG_RTE_LIBRTE_PMD_OPENSSL=y$/CONFIG_RTE_LIBRTE_PMD_OPENS
> SL=n/' config/common_base", "# ") @@ -124,11 +128,11 @@
> default_eal_opts = {  }
> 
> 
> -def get_eal_opt_str(test_case, override_eal_opts={}):
> -    return get_opt_str(test_case, default_eal_opts, override_eal_opts)
> +def get_eal_opt_str(test_case, override_eal_opts={}, add_port=False):
> +    return get_opt_str(test_case, default_eal_opts, override_eal_opts,
> +add_port)
> 
> 
> -def get_opt_str(test_case, default_opts, override_opts={}):
> +def get_opt_str(test_case, default_opts, override_opts={}, add_port=False):
>      opts = default_opts.copy()
> 
>      # Update options with test suite/case config file @@ -136,6 +140,12 @@
> def get_opt_str(test_case, default_opts, override_opts={}):
>          if key in test_case.get_case_cfg():
>              opts[key] = test_case.get_case_cfg()[key]
> 
> +    pci_list = [port["pci"] for port in test_case.dut.ports_info]
> +    if 'w' in opts.keys() and opts['w']:
> +        pci_list.append(opts['w'])
> +    if add_port and pci_list:
> +        opts['w'] = " -w ".join(pci_list)
> +
>      # Update options with func input
>      opts.update(override_opts)
> 
> --
> 2.7.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-06-12  6:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06  0:23 [dts] [PATCH V1 1/3] tests: add new case in cryptodev unit-test Xinfeng Zhao
2019-06-06  0:23 ` [dts] [PATCH V1 2/3] tests: modify cryptodev suites to avoid Reaching the maximum number of crypto devices Xinfeng Zhao
2019-06-06  0:23 ` [dts] [PATCH V1 3/3] conf: modify the cryptodev conf and specify the qat crypto device Xinfeng Zhao
2019-06-11  7:10 ` [dts] [PATCH V1 1/3] tests: add new case in cryptodev unit-test Zhao, XinfengX
2019-06-12  6:31 ` Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).