[V2] tests/TestSuite_ipsec_gw_cryptodev_func.py tests/TestSuite_crypto_perf_cryptodev_perf.py: Modified to accomodate qat_legacy_capa flag

Message ID 20230922091854.100135-1-varalakshmi.s@intel.com (mailing list archive)
State Rejected
Delegated to: LIjuan Tu
Headers
Series [V2] tests/TestSuite_ipsec_gw_cryptodev_func.py tests/TestSuite_crypto_perf_cryptodev_perf.py: Modified to accomodate qat_legacy_capa flag |

Commit Message

Varalakshmi S Sept. 22, 2023, 9:18 a.m. UTC
Fix the script to include qat_legacy_capa flag with QAT devices.

Signed-off-by: svaralak <varalakshmi.s@intel.com>
---
 tests/TestSuite_crypto_perf_cryptodev_perf.py | 13 ++++++++++++-
 tests/TestSuite_ipsec_gw_cryptodev_func.py    |  5 +++++
 2 files changed, 17 insertions(+), 1 deletion(-)
  

Patch

diff --git a/tests/TestSuite_crypto_perf_cryptodev_perf.py b/tests/TestSuite_crypto_perf_cryptodev_perf.py
index 0531b9c6..7c4f8de6 100644
--- a/tests/TestSuite_crypto_perf_cryptodev_perf.py
+++ b/tests/TestSuite_crypto_perf_cryptodev_perf.py
@@ -349,6 +349,11 @@  class TestCryptoPerfCryptodevPerf(TestCase):
             dev = "crypto_aesni_mb"
         elif self.get_case_cfg()["devtype"] == "crypto_qat":
             w = cc.get_qat_devices(self, cpm_num=1, num=num)
+            legacy_capa_flag=",qat_legacy_capa=1"
+            i = 0
+            for s in w:
+                w[i] = s+legacy_capa_flag
+                i = i + 1
             device["a"] = " -a ".join(w)
             device["vdev"] = None
         elif self.get_case_cfg()["devtype"] == "crypto_openssl":
@@ -364,6 +369,7 @@  class TestCryptoPerfCryptodevPerf(TestCase):
         elif self.get_case_cfg()["devtype"] == "crypto_scheduler":
             dev = "crypto_scheduler"
             w = cc.get_qat_devices(self, cpm_num=3, num=num * 3)
+
             if not w:
                 return {}
             vdev_list = []
@@ -371,7 +377,12 @@  class TestCryptoPerfCryptodevPerf(TestCase):
                 vdev = "{}{},worker={}_qat_sym,worker={}_qat_sym,worker={}_qat_sym,mode=round-robin".format(
                     dev, i, w[i * 3], w[i * 3 + 1], w[i * 3 + 2]
                 )
-                vdev_list.append(vdev)
+            vdev_list.append(vdev)
+            legacy_capa_flag=",qat_legacy_capa=1"
+            i = 0
+            for s in w:
+                w[i] = s+legacy_capa_flag
+                i = i + 1
             device["a"] = " -a ".join(w)
             device["vdev"] = " --vdev ".join(vdev_list)
         else:
diff --git a/tests/TestSuite_ipsec_gw_cryptodev_func.py b/tests/TestSuite_ipsec_gw_cryptodev_func.py
index d9f6f626..fe4222d5 100644
--- a/tests/TestSuite_ipsec_gw_cryptodev_func.py
+++ b/tests/TestSuite_ipsec_gw_cryptodev_func.py
@@ -225,6 +225,11 @@  class TestIPsecGwCryptodevFunc(TestCase):
             dev = "crypto_aesni_mb"
         elif self.get_case_cfg()["devtype"] == "crypto_qat":
             w = cc.get_qat_devices(self, cpm_num=1, num=num)
+            legacy_capa_flag=",qat_legacy_capa=1"
+            i = 0
+            for s in w:
+                w[i] = s+legacy_capa_flag
+                i = i + 1
             device["a"] = " -a ".join(w)
             device["vdev"] = None
         elif self.get_case_cfg()["devtype"] == "crypto_openssl":