[V1] tests/TestSuite_crypto_perf_cryptodev_perf.py tests/TestSuite_l2fwd_cryptodev_func.py tests/TestSuite_ipsec_gw_cryptodev_func.py framework/settings.py Included changes for qat_legacy_capa flag

Message ID 20231212161622.2483630-1-varalakshmi.s@intel.com (mailing list archive)
State Rejected
Headers
Series [V1] tests/TestSuite_crypto_perf_cryptodev_perf.py tests/TestSuite_l2fwd_cryptodev_func.py tests/TestSuite_ipsec_gw_cryptodev_func.py framework/settings.py Included changes for qat_legacy_capa flag |

Commit Message

Varalakshmi S Dec. 12, 2023, 4:16 p.m. UTC
Signed-off-by: Varalakshmi S <varalakshmi.s@intel.com>
---
 framework/settings.py                         | 11 +--
 tests/TestSuite_crypto_perf_cryptodev_perf.py | 13 ++-
 tests/TestSuite_ipsec_gw_cryptodev_func.py    |  5 +
 tests/TestSuite_l2fwd_cryptodev_func.py       | 92 ++++++++++++++-----
 4 files changed, 89 insertions(+), 32 deletions(-)
  

Patch

diff --git a/framework/settings.py b/framework/settings.py
index d86cd74a..342e2361 100644
--- a/framework/settings.py
+++ b/framework/settings.py
@@ -59,6 +59,7 @@  NICS = {
     "I40E_1G-1G_BASE_T_X722": "8086:37d1",
     "I40E_10G-SFP_X722": "8086:37d0",
     "I40E_10G-10G_BASE_T_X722": "8086:37d2",
+    "X710-X557-AT-10GBASE-T":"8086:1589",
     "IAVF_10G-X722_VF": "8086:37cd",
     "IAVF-VF": "8086:154c",
     "ConnectX3_MT4103": "15b3:1007",
@@ -73,12 +74,11 @@  NICS = {
     "IXGBE_10G-X550EM_X_SFP": "8086:15ac",
     "cavium_a063": "177d:a063",
     "cavium_a064": "177d:a064",
+    "ICE_100G-E823-L":"8086:124c",
     "ICE_100G-E810C_QSFP": "8086:1592",
     "ICE_25G-E823C_QSFP": "8086:188b",
-    "ICE_25G-E823L_SFP": "8086:124c",
     "ICE_25G-E810C_SFP": "8086:1593",
     "ICE_25G-E810_XXV_SFP": "8086:159b",
-    "ICE_25G-E822C_SFP": "8086:1892",
     "IAVF-ADAPTIVE_VF": "8086:1889",
     "fastlinq_ql45000": "1077:1656",
     "fastlinq_ql45000_vf": "1077:1664",
@@ -117,8 +117,7 @@  ETH_800_SERIES = (
     "ICE_25G-E810_XXV_SFP",
     "IAVF-ADAPTIVE_VF",
     "ICE_25G-E823C_QSFP",
-    "ICE_25G-E823L_SFP",
-    "ICE_25G-E822C_SFP",
+    "ICE_100G-E823-L",
 )
 
 DRIVERS = {
@@ -158,6 +157,7 @@  DRIVERS = {
     "I40E_1G-1G_BASE_T_X722": "i40e",
     "I40E_10G-SFP_X722": "i40e",
     "I40E_10G-10G_BASE_T_X722": "i40e",
+    "X710-X557-AT-10GBASE-T":"i40e",
     "IAVF_10G-X722_VF": "iavf",
     "IAVF-VF": "iavf",
     "ConnectX3_MT4103": "mlx4_core",
@@ -172,10 +172,10 @@  DRIVERS = {
     "IXGBE_10G-X550EM_X_SFP": "ixgbe",
     "cavium_a063": "octeontx2-nicpf",
     "cavium_a064": "octeontx2-nicvf",
+    "ICE_100G-E823-L":"ice",
     "ICE_100G-E810C_QSFP": "ice",
     "ICE_25G-E810C_SFP": "ice",
     "ICE_25G-E823C_QSFP": "ice",
-    "ICE_25G-E823L_SFP": "ice",
     "ICE_25G-E810_XXV_SFP": "ice",
     "IAVF-ADAPTIVE_VF": "iavf",
     "fastlinq_ql45000": "qede",
@@ -198,7 +198,6 @@  DRIVERS = {
     "corigine_4000_pf": "nfp",
     "corigine_6000_pf": "nfp",
     "corigine_6000_vf": "nfp_vf",
-    "ICE_25G-E822C_SFP": "ice",
 }
 
 """
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":
diff --git a/tests/TestSuite_l2fwd_cryptodev_func.py b/tests/TestSuite_l2fwd_cryptodev_func.py
index a1f562ab..efeff5b3 100644
--- a/tests/TestSuite_l2fwd_cryptodev_func.py
+++ b/tests/TestSuite_l2fwd_cryptodev_func.py
@@ -1,12 +1,10 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2016-2017 Intel Corporation
 #
-
 import binascii
 import hashlib
 import hmac
 import time
-
 # Manually Install the CryptoMobile Python Library,
 # Before running this test suite
 # Web link : https://github.com/mitshell/CryptoMobile
@@ -181,7 +179,14 @@  class TestL2fwdCryptodevFunc(TestCase):
         self.__execute_l2fwd_crypto_test(test_vectors, "openssl_DES_CBC_00")
 
     def test_scheduler_rr_AES_CBC_auto(self):
-        vdev = "-a " + " -a ".join(cc.get_qat_devices(self, num=3))
+
+        w = cc.get_qat_devices(self, num=3)
+        legacy_capa_flag=",qat_legacy_capa=1"
+        i = 0
+        for s in w:
+            w[i] = s+legacy_capa_flag
+            i = i + 1
+        vdev = "-a" + " -a ".join(w)
         vdev += (
             " --vdev crypto_scheduler0,worker=%s_qat_sym,worker=%s_qat_sym,worker=%s_qat_sym,\
                 mode=round-robin"
@@ -201,7 +206,14 @@  class TestL2fwdCryptodevFunc(TestCase):
         self.__execute_l2fwd_crypto_test(test_vectors, "scheduler_AES_GCM_00")
 
     def test_scheduler_psb_AES_CBC_auto(self):
-        vdev = "-a " + " -a ".join(cc.get_qat_devices(self, num=2))
+        w = cc.get_qat_devices(self, num=2)
+        legacy_capa_flag=",qat_legacy_capa=1"
+        i = 0
+        for s in w:
+            w[i] = s+legacy_capa_flag
+            i = i + 1
+        vdev = "-a" + " -a ".join(w)
+
         vdev += (
             " --vdev crypto_scheduler0,worker=%s_qat_sym,worker=%s_qat_sym,\
                 mode=packet-size-distr"
@@ -224,7 +236,14 @@  class TestL2fwdCryptodevFunc(TestCase):
         self.__execute_l2fwd_crypto_test(test_vectors, "scheduler_AES_GCM_00")
 
     def test_scheduler_fo_AES_CBC_auto(self):
-        vdev = "-a " + " -a ".join(cc.get_qat_devices(self, num=2))
+        w = cc.get_qat_devices(self, num=2)
+        legacy_capa_flag=",qat_legacy_capa=1"
+        i = 0
+        for s in w:
+            w[i] = s+legacy_capa_flag
+            i = i + 1
+        vdev = "-a" + " -a ".join(w)
+
         vdev += (
             " --vdev crypto_scheduler0,worker=%s_qat_sym,worker=%s_qat_sym,\
                 mode=fail-over"
@@ -247,7 +266,13 @@  class TestL2fwdCryptodevFunc(TestCase):
         self.__execute_l2fwd_crypto_test(test_vectors, "scheduler_AES_GCM_00")
 
     def test_scheduler_mm_AES_CBC_auto(self):
-        vdev = "-a " + " -a ".join(cc.get_qat_devices(self, num=2))
+        w = cc.get_qat_devices(self, num=2)
+        legacy_capa_flag=",qat_legacy_capa=1"
+        i = 0
+        for s in w:
+            w[i] = s+legacy_capa_flag
+            i = i + 1
+        vdev = "-a" + " -a ".join(w)
         vdev += (
             " --vdev crypto_scheduler0,worker=%s_qat_sym,worker=%s_qat_sym\
                 mode=multi-core"
@@ -506,6 +531,8 @@  class TestL2fwdCryptodevFunc(TestCase):
         pass
 
     def __test_vector_to_cmd(self, test_vector, core_mask="", port_mask=""):
+
+        Enable_legacy_Flag=0
         cores = ",".join(self.core_list)
         eal_opt_str = cc.get_eal_opt_str(self, {"l": cores}, add_port=True)
 
@@ -513,24 +540,6 @@  class TestL2fwdCryptodevFunc(TestCase):
         PORT_MASK = "" if port_mask == "" else " -p " + port_mask
         QUEUE_NUM = ""
 
-        vdev = ""
-        if test_vector["vdev"].find("scheduler") != -1:
-            vdev = test_vector["vdev"]
-            self.vector.append("Scheduler_" + test_vector["mode"])
-        elif self.__check_field_in_vector(test_vector, "vdev"):
-            vdev = (
-                "--vdev "
-                + test_vector["vdev"]
-                + "1"
-                + " --vdev "
-                + test_vector["vdev"]
-                + "2"
-                + " -a 0000:00:00.0"
-            )
-            self.vector.append(test_vector["vdev"].upper())
-        else:
-            vdev = "-a " + " -a ".join(cc.get_qat_devices(self, num=2))
-            self.vector.append("QAT")
 
         chain = ""
         if self.__check_field_in_vector(test_vector, "chain"):
@@ -579,6 +588,9 @@  class TestL2fwdCryptodevFunc(TestCase):
         else:
             if self.__check_field_in_vector(test_vector, "cipher_algo"):
                 cipher_algo = " --cipher_algo " + test_vector["cipher_algo"]
+                cipher_algo_list={"des-docsisbpi","3des-cbc","3des-ctr"}
+                if(test_vector["cipher_algo"] in cipher_algo_list):
+                   Enable_legacy_Flag=1
                 self.vector.append(test_vector["cipher_algo"])
             if self.__check_field_in_vector(test_vector, "cipher_op"):
                 cipher_op = " --cipher_op " + test_vector["cipher_op"]
@@ -597,8 +609,10 @@  class TestL2fwdCryptodevFunc(TestCase):
 
             if self.__check_field_in_vector(test_vector, "auth_algo"):
                 auth_algo = " --auth_algo " + test_vector["auth_algo"]
+                auth_algo_list={'md5-hmac' , 'sha1-hmac', 'sha2-512-hmac','sha2-224-hmac'}
+                if(test_vector["auth_algo"] in auth_algo_list):
+                    Enable_legacy_Flag=1
                 self.vector.append(test_vector["auth_algo"])
-
             if self.__check_field_in_vector(test_vector, "auth_op"):
                 auth_op = " --auth_op " + test_vector["auth_op"]
                 self.vector.append(test_vector["auth_op"].lower())
@@ -630,6 +644,33 @@  class TestL2fwdCryptodevFunc(TestCase):
             if self.__check_field_in_vector(test_vector, "digest_size"):
                 digest_size = " --digest " + str(test_vector["digest_size"])
                 self.vector.append("digest_%d" % test_vector["digest_size"])
+        vdev = ""
+        if test_vector["vdev"].find("scheduler") != -1:
+            vdev = test_vector["vdev"]
+            self.vector.append("Scheduler_" + test_vector["mode"])
+        elif self.__check_field_in_vector(test_vector, "vdev"):
+            vdev = (
+                "--vdev "
+                + test_vector["vdev"]
+                + "1"
+                + " --vdev "
+                + test_vector["vdev"]
+                + "2"
+                + " -a 0000:00:00.0"
+            )
+            self.vector.append(test_vector["vdev"].upper())
+        else:
+            if (Enable_legacy_Flag == 0):
+              vdev = "-a " + " -a ".join(cc.get_qat_devices(self, num=2))
+            else:
+              w = cc.get_qat_devices(self, num=2)
+              legacy_capa_flag=",qat_legacy_capa=1"
+              i = 0
+              for s in w:
+                w[i] = s+legacy_capa_flag
+                i = i + 1
+              vdev = "-a " + " -a ".join(w)
+            self.vector.append("QAT")
 
         cmd_str = " ".join(
             [
@@ -2263,3 +2304,4 @@  fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc8454b6be54e53e3f9c99f0f830b16
         "output_hash": "*",
     },
 }
+