* [dts] [PATCH V2 0/2]test-crypto-perf: Add crypto performance auto test code and test plain
@ 2017-03-14 7:24 gangx.yang
2017-03-14 7:24 ` [dts] [PATCH V2 1/2]test-crypto-perf:Add crypto performance auto test code gangx.yang
2017-03-14 7:24 ` [dts] [PATCH V2 2/2]test-crypto-perf:add crypto performance test plan gangx.yang
0 siblings, 2 replies; 4+ messages in thread
From: gangx.yang @ 2017-03-14 7:24 UTC (permalink / raw)
To: dts; +Cc: Gang Yang
From: Gang Yang <gangx.yang@intel.com>
* delete unserviceable lib
* update invalid cipher-op for aes-gcm algorithm
* update incorrect algoritm map in test plan
Gang Yang (2):
deleted unserviceable lib
update test plan doc
test_plans/crypto_perf_test_plan.rst | 104 +++++++++++++++++------------------
tests/TestSuite_crypto_perf.py | 9 ++-
2 files changed, 56 insertions(+), 57 deletions(-)
--
2.5.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dts] [PATCH V2 1/2]test-crypto-perf:Add crypto performance auto test code
2017-03-14 7:24 [dts] [PATCH V2 0/2]test-crypto-perf: Add crypto performance auto test code and test plain gangx.yang
@ 2017-03-14 7:24 ` gangx.yang
2017-03-14 7:24 ` [dts] [PATCH V2 2/2]test-crypto-perf:add crypto performance test plan gangx.yang
1 sibling, 0 replies; 4+ messages in thread
From: gangx.yang @ 2017-03-14 7:24 UTC (permalink / raw)
To: dts; +Cc: Gang Yang
From: Gang Yang <gangx.yang@intel.com>
* delete unserviceable lib
* update invalid cipher-op for aes-gcm algorithm
Signed-off-by: Gang Yang <gangx.yang@intel.com>
---
tests/TestSuite_crypto_perf.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/tests/TestSuite_crypto_perf.py b/tests/TestSuite_crypto_perf.py
index aaf79fe..e6f6c2e 100755
--- a/tests/TestSuite_crypto_perf.py
+++ b/tests/TestSuite_crypto_perf.py
@@ -42,8 +42,6 @@ import copy
import time
import random
from test_case import TestCase
-sys.path.append("/root")
-from CryptoMobile.CM import *
class TestL2fwdCrypto(TestCase):
@@ -439,7 +437,6 @@ class TestL2fwdCrypto(TestCase):
else:
map_combine[temp_str] = len(test_vector_list)
for k,v in alg_map.iteritems():
-
self.logger.info("Total {name} cases:\t\t\t{number}".format(name=k,number=v))
for k,v in pmd_map.iteritems():
self.logger.info("Total {name} cases:\t\t\t{number}".format(name=k,number=v))
@@ -489,7 +486,9 @@ class TestL2fwdCrypto(TestCase):
value_data_list = data_list.split(";")
if length == count :
data_finished = True
- latency = latency + self.__buffer_size_result_check(value_data_list[1],value_data_list[5],value_data_list[4],data_finished)
+ latency = latency + self.__buffer_size_result_check( \
+ value_data_list[1],value_data_list[5], \
+ value_data_list[4],data_finished)
latency = latency + "\n"
return latency
@@ -1075,7 +1074,7 @@ test_vectors = {
"ptest": ["throughput","latency"],
"optype": ["aead"],
"cipher-algo": ["aes-gcm"],
- "cipher-op": ["aead"],
+ "cipher-op": ["encrypt", "decrypt"],
"cipher-key-sz": [16, 24, 32],
"cipher-iv-sz": [16],
"auth-algo": ["aes-gcm","aes-gmac","md5-hmac", "sha1-hmac", "sha2-224-hmac", "sha2-256-hmac",
--
2.5.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dts] [PATCH V2 2/2]test-crypto-perf:add crypto performance test plan
2017-03-14 7:24 [dts] [PATCH V2 0/2]test-crypto-perf: Add crypto performance auto test code and test plain gangx.yang
2017-03-14 7:24 ` [dts] [PATCH V2 1/2]test-crypto-perf:Add crypto performance auto test code gangx.yang
@ 2017-03-14 7:24 ` gangx.yang
1 sibling, 0 replies; 4+ messages in thread
From: gangx.yang @ 2017-03-14 7:24 UTC (permalink / raw)
To: dts; +Cc: Gang Yang
From: Gang Yang <gangx.yang@intel.com>
* update incorrect algoritm map in test plan
Signed-off-by: Gang Yang <gangx.yang@intel.com>
---
test_plans/crypto_perf_test_plan.rst | 104 +++++++++++++++++------------------
1 file changed, 52 insertions(+), 52 deletions(-)
diff --git a/test_plans/crypto_perf_test_plan.rst b/test_plans/crypto_perf_test_plan.rst
index 6c043a9..7d5ee0d 100755
--- a/test_plans/crypto_perf_test_plan.rst
+++ b/test_plans/crypto_perf_test_plan.rst
@@ -39,8 +39,8 @@ Description
===========
This document provides the test plan for testing Cryptodev performance by
-crypto perf application. The crypto perf application is a DPDK example under
-DPDK examples folder.
+crypto perf application. The crypto perf application is a DPDK app under
+DPDK app folder.
Crypto perf application supports most of Cryptodev PMDs(polling mode dirver)
Intel QuickAssist Technology DH895xxC/DH_C62xx hardware
@@ -55,21 +55,21 @@ Part of the algorithms are not supported currently.
|Algorithm| Mode | Detail |
| | |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| AES | CBC | Encrypt/Decrypt;Key size: 128, 192, 256 bits |
+| aes | cbc | Encrypt/Decrypt;Key size: 128, 192, 256 bits |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| AES | CTR | Encrypt/Decrypt;Key size: 128, 192, 256 bits |
+| aes | ctr | Encrypt/Decrypt;Key size: 128, 192, 256 bits |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| MD | | MD5 |
+| md | | md5 |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| SHA | | SHA-1, SHA2-224, SHA2-384, SHA2-256, SHA2-512 |
+| sha | | sha1, sha2-224, sha2-384, sha2-256, sha2-512 |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| HMAC | | Support MD5 and SHA implementations SHA-1, SHA2-224, SHA2-256, |
-| | | SHA2-384, SHA2-512 |
+| hmac | | Support md5 and sha implementations sha1, sha2-224, sha2-256, |
+| | | sha2-384, sha2-512 |
| | | Key Size versus Block size support: Key Size must be <= block size; |
-| | | Mac Len Supported SHA-1 10, 12, 16, 20 bytes; |
-| | | Mac Len Supported SHA2-256 16, 24, 32 bytes; |
-| | | Mac Len Supported SHA2-384 24,32, 40, 48 bytes; |
-| | | Mac Len Supported SHA2-512 32, 40, 48, 56, 64 bytes; |
+| | | Mac Len Supported sha1 10, 12, 16, 20 bytes; |
+| | | Mac Len Supported sha2-256 16, 24, 32 bytes; |
+| | | Mac Len Supported sha2-384 24,32, 40, 48 bytes; |
+| | | Mac Len Supported sha2-512 32, 40, 48, 56, 64 bytes; |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
QAT algorithm table:
@@ -80,40 +80,40 @@ Part of the algorithms are not supported currently.
|Algorithm| Mode | Detail |
| | |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| AES | CBC | Encrypt/Decrypt;Key size: 128, 192, 256 bits |
+| aes | cbc | Encrypt/Decrypt;Key size: 128, 192, 256 bits |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| AES | CTR | Encrypt/Decrypt;Key size: 128, 192, 256 bits |
+| aes | ctr | Encrypt/Decrypt;Key size: 128, 192, 256 bits |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| 3DES | CBC | Encrypt/Decrypt;Key size: 128, 192 bits |
+| 3des | cbc | Encrypt/Decrypt;Key size: 128, 192 bits |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| 3DES | CTR | Encrypt/Decrypt;Key size: 128, 192 bits |
+| 3des | ctr | Encrypt/Decrypt;Key size: 128, 192 bits |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| MD | | MD5 |
+| md | | md5 |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| SHA | | SHA-1, SHA2-224, SHA2-256, SHA2-384, SHA2-512 |
+| sha | | sha1, sha2-224, sha2-256, sha2-384, sha2-512 |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| HMAC | | Support MD5 and SHA implementations SHA-1, SHA2-224, SHA2-256, |
-| | | SHA2-384, SHA2-512 |
+| hmac | | Support md5 and sha implementations sha1, sha2-224, sha2-256, |
+| | | sha2-384, sha2-512 |
| | | Key Size versus Block size support: Key Size must be <= block size; |
-| | | Mac Len Supported SHA-1 10, 12, 16, 20 bytes; |
-| | | Mac Len Supported SHA2-256 16, 24, 32 bytes; |
-| | | Mac Len Supported SHA2-384 24,32, 40, 48 bytes; |
-| | | Mac Len Supported SHA2-512 32, 40, 48, 56, 64 bytes; |
+| | | Mac Len Supported sha1 10, 12, 16, 20 bytes; |
+| | | Mac Len Supported sha2-256 16, 24, 32 bytes; |
+| | | Mac Len Supported sha2-384 24,32, 40, 48 bytes; |
+| | | Mac Len Supported sha2-512 32, 40, 48, 56, 64 bytes; |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| AES | GCM | Key Sizes:128, 192, 256 bits; |
+| aes | gcm | Key Sizes:128, 192, 256 bits; |
| | | Associated Data Length: 0 ~ 240 bytes; |
| | | Payload Length: 0 ~ (2^32 -1) bytes; |
| | | IV source: external; |
| | | IV Lengths: 96 bits; |
| | | Tag Lengths: 8, 12, 16 bytes; |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| Kasumi | F8 | Encrypt/Decrypt; Key size: 128 |
+| kasumi | f8 | Encrypt/Decrypt; Key size: 128 |
+ +---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| | F9 | Generate/Verify; Key size: 128 |
+| | f9 | Generate/Verify; Key size: 128 |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| Snow3G | UEA2 | Encrypt/Decrypt; Key size: 128 |
+| snow3g | uea2 | Encrypt/Decrypt; Key size: 128 |
+ +---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| | UIA2 | Generate/Verify; Key size: 128 |
+| | uia2 | Generate/Verify; Key size: 128 |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
AESNI_GCM algorithm table
@@ -124,7 +124,7 @@ in crypto perf
|Algorithm| Mode | Detail |
| | |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| AES | GCM | Encrypt/Decrypt;Key Sizes:128, 256 bits; |
+| aes | gcm | Encrypt/Decrypt;Key Sizes:128, 256 bits; |
| | | IV source: external; |
| | | IV Lengths: 96 bits; |
| | | Generate/Verify;Key Sizes:128,192,256 bits; |
@@ -132,7 +132,7 @@ in crypto perf
| | | Payload Length: 0 ~ (2^32 -1) bytes; |
| | | Tag Lengths: 8, 12, 16 bytes; |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| AES | GMAC | Generate/Verify;Key Sizes:128,192,256 bits; |
+| aes | gmac | Generate/Verify;Key Sizes:128,192,256 bits; |
| | | Associated Data Length: 0 ~ 240 bytes; |
| | | Payload Length: 0 ~ (2^32 -1) bytes; |
| | | Tag Lengths: 8, 12, 16 bytes; |
@@ -146,7 +146,7 @@ Part of the algorithms are not supported currently.
|Algorithm| Mode | Detail |
| | |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| NULL | NULL | Encrypt/Decrypt;Key Sizes:0 bits; |
+| null | null | Encrypt/Decrypt;Key Sizes:0 bits; |
| | | IV Lengths: 0 bits; |
| | | Generate/Verify;Key Sizes:0 bits; |
| | | Associated Data Length: 1 bytes; |
@@ -161,11 +161,11 @@ The table below contains KASUMI algorithms which are supported in crypto perf.
|Algorithm| Mode | Detail |
| | |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| KASUMI | F8 | Encrypt/Decrypt;Key Sizes:128 bits; |
+| kasumi | f8 | Encrypt/Decrypt;Key Sizes:128 bits; |
| | | IV source: external; |
| | | IV Lengths: 64 bits; |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| KASUMI | F9 | Generate/Verify;Key Sizes:128 bits; |
+| kasumi | f9 | Generate/Verify;Key Sizes:128 bits; |
| | | Payload Length: 64 bytes; |
| | | Tag Lengths: 4 bytes; |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
@@ -177,11 +177,11 @@ The table below contains SNOW3G algorithms which are supported in crypto perf.
|Algorithm| Mode | Detail |
| | |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| SNOW3G | UEA2 | Encrypt/Decrypt;Key Sizes:128 bits; |
+| snow3g | uea2 | Encrypt/Decrypt;Key Sizes:128 bits; |
| | | IV source: external; |
| | | IV Lengths: 128 bits; |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| SNOW3G | UIA2 | Generate/Verify;Key Sizes:128 bits; |
+| snow3g | uia2 | Generate/Verify;Key Sizes:128 bits; |
| | | Payload Length: 128 bytes; |
| | | Tag Lengths: 4 bytes; |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
@@ -193,11 +193,11 @@ The table below contains ZUC algorithms which are supported in crypto perf.
|Algorithm| Mode | Detail |
| | |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| ZUC | EEA3 | Encrypt/Decrypt;Key Sizes:128 bits; |
+| zuc | eea3 | Encrypt/Decrypt;Key Sizes:128 bits; |
| | | IV source: external; |
| | | IV Lengths: 128 bits; |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| ZUC | EIA2 | Generate/Verify;Key Sizes:128 bits; |
+| zuc | eia2 | Generate/Verify;Key Sizes:128 bits; |
| | | Payload Length: 128 bytes; |
| | | Tag Lengths: 4 bytes; |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
@@ -209,27 +209,27 @@ The table below contains OPENSSL algorithms which are supported in crypto perf.
|Algorithm| Mode | Detail |
| | |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| AES | CBC | Encrypt/Decrypt;Key size: 128, 192, 256 bits |
+| aes | cbc | Encrypt/Decrypt;Key size: 128, 192, 256 bits |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| AES | CTR | Encrypt/Decrypt;Key size: 128, 192, 256 bits |
+| aes | ctr | Encrypt/Decrypt;Key size: 128, 192, 256 bits |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| 3DES | CBC | Encrypt/Decrypt;Key size: 128, 192 bits |
+| 3des | cbc | Encrypt/Decrypt;Key size: 128, 192 bits |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| 3DES | CTR | Encrypt/Decrypt;Key size: 128, 192 bits |
+| 3des | ctr | Encrypt/Decrypt;Key size: 128, 192 bits |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| MD | | MD5 |
+| md | | md5 |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| SHA | | SHA-1, SHA2-224, SHA2-256, SHA2-384, SHA2-512 |
+| sha | | sha1, sha2-224, sha2-256, sha2-384, sha2-512 |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| HMAC | | Support MD5 and SHA implementations SHA-1, SHA2-224, SHA2-256, |
-| | | SHA2-384, SHA2-512 |
+| hmac | | Support md5 and sha implementations sha1, sha2-224, sha2-256, |
+| | | sha2-384, sha2-512 |
| | | Key Size versus Block size support: Key Size must be <= block size; |
-| | | Mac Len Supported SHA-1 10, 12, 16, 20 bytes; |
-| | | Mac Len Supported SHA2-256 16, 24, 32 bytes; |
-| | | Mac Len Supported SHA2-384 24,32, 40, 48 bytes; |
-| | | Mac Len Supported SHA2-512 32, 40, 48, 56, 64 bytes; |
+| | | Mac Len Supported sha1 10, 12, 16, 20 bytes; |
+| | | Mac Len Supported sha2-256 16, 24, 32 bytes; |
+| | | Mac Len Supported sha2-384 24,32, 40, 48 bytes; |
+| | | Mac Len Supported sha2-512 32, 40, 48, 56, 64 bytes; |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| AES | GCM | Encrypt/Decrypt;Key Sizes:128 bits; |
+| aes | gcm | Encrypt/Decrypt;Key Sizes:128 bits; |
| | | IV source: external; |
| | | IV Lengths: 96 bits; |
| | | Associated Data Length: 0 ~ 240 bytes; |
@@ -237,7 +237,7 @@ The table below contains OPENSSL algorithms which are supported in crypto perf.
| | | Payload Length: 64,128 bytes; |
| | | Tag Lengths: 16 bytes; |
+---------+---------+---------+---------+----------+----------+----------+----------+----------+----------+
-| AES | GMAC | Generate/Verify;Key Sizes:128,192,256 bits; |
+| aes | gmac | Generate/Verify;Key Sizes:128,192,256 bits; |
| | | Associated Data Length: 0 ~ 240 bytes; |
| | | Payload Length: 8 ~ (2^32 -4) bytes; |
| | | Tag Lengths:16 bytes; |
--
2.5.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dts] [PATCH V2 1/2]test-crypto-perf:Add crypto performance auto test code
2017-03-16 2:25 [dts] [PATCH V2 0/2]test-crypto-perf: Add crypto performance auto test code and test plain gangx.yang
@ 2017-03-16 2:25 ` gangx.yang
0 siblings, 0 replies; 4+ messages in thread
From: gangx.yang @ 2017-03-16 2:25 UTC (permalink / raw)
To: dts; +Cc: Gang Yang
From: Gang Yang <gangx.yang@intel.com>
V3:
- update crypto performance code to pass pep8
Signed-off-by: Gang Yang <gangx.yang@intel.com>
---
tests/TestSuite_crypto_perf.py | 901 ++++++++++++++++++++---------------------
1 file changed, 447 insertions(+), 454 deletions(-)
diff --git a/tests/TestSuite_crypto_perf.py b/tests/TestSuite_crypto_perf.py
index e6f6c2e..e1f9d87 100755
--- a/tests/TestSuite_crypto_perf.py
+++ b/tests/TestSuite_crypto_perf.py
@@ -43,18 +43,18 @@ import time
import random
from test_case import TestCase
+
class TestL2fwdCrypto(TestCase):
-
def set_up_all(self):
-
- self.filename=""
- self.__LTCY = ""
+
+ self.filename = ""
+ self.__LTCY = ""
self.__THPT = ""
self.qat_wilte_list = []
self.total_buffer_list = []
self.waiting_to_coll_buf = []
-
+
self.core_config = "1S/2C/1T"
self.number_of_ports = 1
self.dut_ports = self.dut.get_ports(self.nic)
@@ -94,29 +94,26 @@ class TestL2fwdCrypto(TestCase):
self.dut.send_expect("sed -i 's/CONFIG_RTE_LIBRTE_PMD_SNOW3G=n$/CONFIG_RTE_LIBRTE_PMD_SNOW3G=y/' config/common_base", "# ")
self.dut.send_expect("sed -i 's/CONFIG_RTE_LIBRTE_PMD_KASUMI=n$/CONFIG_RTE_LIBRTE_PMD_KASUMI=y/' config/common_base", "# ")
self.dut.send_expect("sed -i 's/CONFIG_RTE_LIBRTE_PMD_OPENSSL=n$/CONFIG_RTE_LIBRTE_PMD_OPENSSL=y/' config/common_base", "# ")
- self.dut.send_expect("sed -i 's/CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n$/CONFIG_RTE_LIBRTE_PMD_AESNI_MB=y/' config/common_base", "# ")
+ self.dut.send_expect("sed -i 's/CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n$/CONFIG_RTE_LIBRTE_PMD_AESNI_MB=y/' config/common_base", "# ")
self.dut.send_expect("sed -i 's/CONFIG_RTE_LIBRTE_PMD_ZUC=n$/CONFIG_RTE_LIBRTE_PMD_ZUC=y/' config/common_base", "# ")
self.dut.skip_setup = False
self.dut.build_install_dpdk(self.dut.target)
# test-crypto-perf compile
out = self.dut.build_dpdk_apps("./app/test-crypto-perf")
- '''
- self.verify("Error" not in out, "Compilation error")
- self.verify("No such" not in out, "Compilation error")
- '''
+
# Bind QAT VF devices
out = self.dut.send_expect("lspci -d:37c9|awk '{print $1}'", "# ", 10)
self.dut.send_expect('echo "8086 37c9" > /sys/bus/pci/drivers/igb_uio/new_id', "# ", 10)
for line in out.replace("\r", "\n").replace("\n\n", "\n").split("\n"):
cmd = "echo 0000:{} > /sys/bus/pci/devices/0000\:{}/driver/unbind".format(line, line.replace(":", "\:"))
- qat_device = "0000:{}".format(line,line.replace(":","\:"))
+ qat_device = "0000:{}".format(line, line.replace(":", "\:"))
self.qat_wilte_list.append(qat_device)
self.dut.send_expect(cmd, "# ", 10)
cmd = "echo 0000:{} > /sys/bus/pci/drivers/igb_uio/bind".format(line)
- self.dut.send_expect(cmd, "# ", 10)
+ self.dut.send_expect(cmd, "# ", 10)
self.__check_buffer_size_number()
-
+
def set_up(self):
pass
@@ -125,186 +122,185 @@ class TestL2fwdCrypto(TestCase):
self.logger.info("Test qat_c_AES_CBC_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "qat_c_AES_CBC_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_qat_AES_CTR_perf(self):
result = True
self.logger.info("Test qat_c_AES_CTR_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "qat_c_AES_CTR_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_qat_AES_GCM_perf(self):
result = True
self.logger.info("Test qat_c_AES_GCM_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "qat_c_AES_GCM_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_qat_3DES_CBC_perf(self):
result = True
self.logger.info("Test qat_c_3DES_CTR_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "qat_c_3DES_CTR_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_qat_3DES_CTR_perf(self):
result = True
self.logger.info("Test qat_c_3DES_CBC_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "qat_c_3DES_CBC_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_qat_KASUMI_perf(self):
result = True
self.logger.info("Test qat_c_KASUMMI_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "qat_c_KASUMMI_Perf")
- self.verify(result,True)
-
-
+ self.verify(result, True)
+
def test_qat_SNOW3G_perf(self):
result = True
self.logger.info("Test qat_c_SNOW3G_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "qat_c_SNOW3G_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_qat_HASH_perf(self):
result = True
self.logger.info("Test qat_h_auto_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "qat_h_auto_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_qat_NULL_perf(self):
result = True
self.logger.info("Test qat_NULL_auto_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "qat_NULL_auto_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_aesni_mb_AES_CBC_perf(self):
result = True
self.logger.info("Test aesni_mb_c_AES_CBC_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "aesni_mb_c_AES_CBC_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_aesni_mb_AES_CTR_perf(self):
result = True
self.logger.info("Test aesni_mb_c_AES_CTR_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "aesni_mb_c_AES_CTR_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_aesni_mb_HASH_perf(self):
result = True
self.logger.info("Test aesni_mb_h_auto_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "aesni_mb_h_auto_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_aesni_gcm_AES_GCM_perf(self):
result = True
self.logger.info("Test aes_gcm_c_AES_GCM_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "aes_gcm_c_AES_GCM_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_kasumi_KASUMI_perf(self):
result = True
self.logger.info("Test kasumi_KASUMI_auto_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "kasumi_KASUMI_auto_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_snow3g_SNOW3G_perf(self):
result = True
self.logger.info("Test snow3g_SNOW3G_auto_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "snow3g_SNOW3G_auto_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_zuc_ZUC_perf(self):
result = True
self.logger.info("Test zuc_ZUC_auto_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "zuc_ZUC_auto_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_null_NULL_perf(self):
result = True
self.logger.info("Test null_NULL_auto_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "null_NULL_auto_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_openssl_AES_CBC_perf(self):
result = True
self.logger.info("Test openssl_c_AES_CBC_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "openssl_c_AES_CBC_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_openssl_AES_CTR_perf(self):
result = True
self.logger.info("Test openssl_c_AES_CTR_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "openssl_c_AES_CTR_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_openssl_AES_GCM_perf(self):
result = True
self.logger.info("Test openssl_c_AES_GCM_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "openssl_c_AES_GCM_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_openssl_3DES_CBC_perf(self):
result = True
self.logger.info("Test openssl_c_3DES_CBC_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "openssl_c_3DES_CBC_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_openssl_3DES_CTR_perf(self):
result = True
self.logger.info("Test openssl_c_3DES_CTR_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "openssl_c_3DES_CTR_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_openssl_HASH_perf(self):
result = True
self.logger.info("Test openssl_h_HASH_auto_Perf")
result = self.__execute_crypto_perf_test(
test_vectors, "openssl_h_HASH_auto_Perf")
- self.verify(result,True)
-
+ self.verify(result, True)
+
def test_calculatr_case_number(self):
-
+
self.__calculate_totall_cases_numb()
-
+
def __execute_crypto_perf_test(self, test_vectors, test_vector_name):
failed_count = 0
result = True
-
+
if test_vector_name not in test_vectors:
self.logger.warn("SKIP : " + test_vector_name)
return True
test_vector = test_vectors[test_vector_name]
-
+
test_vector_list = self.__test_vector_to_vector_list(test_vector,
- core_mask=self.core_mask,
- port_mask=self.port_mask)
+ core_mask=self.core_mask,
+ port_mask=self.port_mask)
- currently_time = time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))
- case_line = "<<<[{time}][{name}] Total Generated: [{num}] Cases>>>\n".format( \
- time=currently_time,name=test_vector_name,num=len(test_vector_list))
+ currently_time = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))
+ case_line = "<<<[{time}][{name}] Total Generated: [{num}] Cases>>>\n".format(
+ time=currently_time, name=test_vector_name, num=len(test_vector_list))
self.logger.info(case_line)
-
+
for test_vector in test_vector_list:
self.logger.debug(test_vector)
cmd_str = self.__test_vector_to_cmd(test_vector,
@@ -313,10 +309,10 @@ class TestL2fwdCrypto(TestCase):
out = self.dut.send_expect(cmd_str, "]# ", 600)
self.logger.info("Test Result:\n*********************\n {ret}".format(ret=out))
ret = self.__result_collection(out, test_vector)
- if ret == False :
+ if ret is False:
failed_count = failed_count + 1
result = result and ret
- self.logger.info(("[{name}] Total Failed cases: [{num}]\n".format( \
+ self.logger.info(("[{name}] Total Failed cases: [{num}]\n".format(
name=test_vector_name, num=failed_count)))
return result
@@ -324,8 +320,8 @@ class TestL2fwdCrypto(TestCase):
pass
def tear_down_all(self):
- f = open(self.filename,"a")
- currently_time = time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))
+ f = open(self.filename, "a")
+ currently_time = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))
f.write("...Test Finished [{time}]...".format(time=currently_time))
self.dut.send_expect("sed -i 's/CONFIG_RTE_LIBRTE_PMD_QAT=y$/CONFIG_RTE_LIBRTE_PMD_QAT=n/' config/common_base", "# ")
self.dut.send_expect("sed -i 's/CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=y$/CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n/' config/common_base", "# ")
@@ -333,14 +329,13 @@ class TestL2fwdCrypto(TestCase):
self.dut.send_expect("sed -i 's/CONFIG_RTE_LIBRTE_PMD_SNOW3G=y$/CONFIG_RTE_LIBRTE_PMD_SNOW3G=n/' config/common_base", "# ")
self.dut.send_expect("sed -i 's/CONFIG_RTE_LIBRTE_PMD_KASUMI=y$/CONFIG_RTE_LIBRTE_PMD_KASUMI=n/' config/common_base", "# ")
self.dut.send_expect("sed -i 's/CONFIG_RTE_LIBRTE_PMD_OPENSSL=y$/CONFIG_RTE_LIBRTE_PMD_OPENSSL=n/' config/common_base", "# ")
- self.dut.send_expect("sed -i 's/CONFIG_RTE_LIBRTE_PMD_AESNI_MB=y$/CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n/' config/common_base", "# ")
+ self.dut.send_expect("sed -i 's/CONFIG_RTE_LIBRTE_PMD_AESNI_MB=y$/CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n/' config/common_base", "# ")
self.dut.send_expect("sed -i 's/CONFIG_RTE_LIBRTE_PMD_ZUC=y$/CONFIG_RTE_LIBRTE_PMD_ZUC=n/' config/common_base", "# ")
f.close()
-
- def __check_buffer_size_number(self):
+
+ def __check_buffer_size_number(self):
buf_numb = 0
buf_list = []
-
for vector_name in test_vectors:
temp_numb = 0
temp_list = []
@@ -348,7 +343,7 @@ class TestL2fwdCrypto(TestCase):
if vector["buffer-sz"] != "":
if vector["buffer-sz"].find(",") != -1:
buf = vector["buffer-sz"].split(",")
- temp_list=copy.deepcopy(buf)
+ temp_list = copy.deepcopy(buf)
temp_numb = len(buf)
elif vector["buffer-sz"].find(":") != -1:
buf = vector["buffer-sz"].split(":")
@@ -358,15 +353,15 @@ class TestL2fwdCrypto(TestCase):
temp = buf[0]
while temp <= buf[2]:
temp_list.append(temp)
- temp_numb = temp_numb +1
+ temp_numb = temp_numb + 1
temp = temp + buf[1]
else:
temp_numb = 1
if temp_numb > buf_numb:
buf_numb = temp_numb
- buf_list=copy.deepcopy(temp_list)
-
- head = "PMD,chain,ptest,cipher_algo,cipher_op,cipher_key,iv,auth_algo,auth_op,auth_key,aad,digest,"
+ buf_list = copy.deepcopy(temp_list)
+
+ head = "PMD,chain,ptest,cipher_algo,cipher_op,cipher_key,iv,auth_algo,auth_op,auth_key,aad,digest,"
self.__LTCY = head
self.__THPT = head
self.total_buffer_list = copy.deepcopy(buf_list)
@@ -375,46 +370,47 @@ class TestL2fwdCrypto(TestCase):
self.__THPT = self.__THPT + "buf{buffer} Thpt(Gbps),buf{buffer} Ops,".format(buffer=buf_sz)
self.__LTCY = self.__LTCY[:len(self.__LTCY) - 1] + "\n"
self.__THPT = self.__THPT[:len(self.__THPT) - 1] + "\n"
-
+
str_pid = str(os.getpid())
self.filename = "/tmp/test_crypto_perf_{0}.csv".format(time.time())
- f = open(self.filename,"a")
- if f == None:
+ f = open(self.filename, "a")
+ if f is None:
self.logger.info("open scv file failed.")
return
-
- current_time = time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))
+
+ current_time = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))
f.write("...Test Start [{time}]...\n".format(time=current_time))
f.write(self.__THPT)
f.write(self.__LTCY)
f.close()
-
+
def __calculate_totall_cases_numb(self):
alg_map = {}
pmd_map = {}
- map_combine = {}
+ map_combine = {}
count = 0
alg = ""
pmd = ""
- alg_list = ["AES_CBC","AES_CTR","AES_GCM","3DES_CBC", \
- "3DES_CTR","SNOW3G","KASUMI","ZUC","NULL","MD_SHA"]
- pmd_list = ["qat","aesni_mb","aesni_gcm","snow3g",\
- "kasumi","zuc","openssl","null"]
+ alg_list = ["AES_CBC", "AES_CTR", "AES_GCM", "3DES_CBC",
+ "3DES_CTR", "SNOW3G", "KASUMI", "ZUC", "NULL", "MD_SHA"]
+ pmd_list = ["qat", "aesni_mb", "aesni_gcm", "snow3g",
+ "kasumi", "zuc", "openssl", "null"]
valid_map = {
- "qat": ["AES_CBC", "AES_CTR","AES_GCM","3DES_CBC", \
- "3DES_CTR","SNOW3G","KASUMI","NULL","MD_SHA"],
- "aesni_mb":["AES_CBC", "AES_CTR"],
- "aesni_gcm":["AES_GCM"],
- "snow3g":["SNOW3G"],
- "kasumi":["KASUMI"],
- "zuc":["ZUC"],
- "openssl":["AES_CBC", "AES_CTR","AES_GCM","3DES_CBC","3DES_CTR","MD_SHA"],
- "null":["NULL"]
+ "qat": ["AES_CBC", "AES_CTR", "AES_GCM", "3DES_CBC",
+ "3DES_CTR", "SNOW3G", "KASUMI", "NULL", "MD_SHA"],
+ "aesni_mb": ["AES_CBC", "AES_CTR"],
+ "aesni_gcm": ["AES_GCM"],
+ "snow3g": ["SNOW3G"],
+ "kasumi": ["KASUMI"],
+ "zuc": ["ZUC"],
+ "openssl": ["AES_CBC", "AES_CTR", "AES_GCM", "3DES_CBC", "3DES_CTR", "MD_SHA"],
+ "null": ["NULL"]
}
-
- for index,value in test_vectors.iteritems():
+
+ for index, value in test_vectors.iteritems():
test_vector_list = self.__test_vector_to_vector_list(value,
- core_mask="-1",port_mask=self.port_mask)
+ core_mask="-1",
+ port_mask=self.port_mask)
count = count + len(test_vector_list)
for i in alg_list:
if (index.upper()).find(i) != -1:
@@ -425,172 +421,171 @@ class TestL2fwdCrypto(TestCase):
alg_map[i] = len(test_vector_list)
for j in pmd_list:
if (index).find(j) != -1:
- pmd = j
+ pmd = j
if j in pmd_map:
pmd_map[j] += len(test_vector_list)
else:
pmd_map[j] = len(test_vector_list)
- if (pmd !="") and (alg in valid_map[pmd]):
+ if (pmd != "") and (alg in valid_map[pmd]):
temp_str = pmd + "_" + alg
if temp_str in map_combine:
map_combine[temp_str] += len(test_vector_list)
else:
map_combine[temp_str] = len(test_vector_list)
- for k,v in alg_map.iteritems():
- self.logger.info("Total {name} cases:\t\t\t{number}".format(name=k,number=v))
- for k,v in pmd_map.iteritems():
- self.logger.info("Total {name} cases:\t\t\t{number}".format(name=k,number=v))
- for k,v in map_combine.iteritems():
- self.logger.info("Total {name} cases:\t\t\t{number}".format(name=k,number=v))
+ for k, v in alg_map.iteritems():
+ self.logger.info("Total {name} cases:\t\t\t{number}".format(name=k, number=v))
+ for k, v in pmd_map.iteritems():
+ self.logger.info("Total {name} cases:\t\t\t{number}".format(name=k, number=v))
+ for k, v in map_combine.iteritems():
+ self.logger.info("Total {name} cases:\t\t\t{number}".format(name=k, number=v))
self.logger.info("Total cases:\t\t\t {0}".format(count))
-
- def __parse_througuput_data(self,original_out):
+
+ def __parse_througuput_data(self, original_out):
throughPut_line = ""
- count = 0
+ count = 0
data_finished = False
index = original_out.find("# lcore id")
if index == -1:
seg_index = original_out.find("Segmentation fault")
- throughPut_line ="sgtf,sgtf" if seg_index != -1 else "otf,otf"
+ throughPut_line = "sgtf,sgtf" if seg_index != -1 else "otf,otf"
else:
- value_data = (original_out[index:]).replace("\r","")
- value_list = (value_data.replace("\n\n","\n")).split("\n")
+ value_data = (original_out[index:]).replace("\r", "")
+ value_list = (value_data.replace("\n\n", "\n")).split("\n")
temp_list = filter(lambda x: (x.find("lcore id") == -1) and (x != ""), value_list)
length = len(temp_list)
for data_list in temp_list:
- count = count + 1
+ count = count + 1
value_data_list = (data_list).split(";")
- if length == count :
+ if length == count:
data_finished = True
- throughPut_line =throughPut_line + self.__buffer_size_result_check( \
- value_data_list[1],value_data_list[8], \
- value_data_list[7],data_finished)
+ throughPut_line = throughPut_line + self.__buffer_size_result_check(
+ value_data_list[1], value_data_list[8],
+ value_data_list[7], data_finished)
throughPut_line = throughPut_line + "\n"
return throughPut_line
-
- def __parse_latency_data(self,original_out):
+
+ def __parse_latency_data(self, original_out):
latency = ""
- count = 0
+ count = 0
data_finished = False
index = original_out.find("# lcore")
if index == -1:
seg_index = original_out.find("Segmentation fault")
latency = "sgtf,sgtf" if seg_index != -1 else "otf,otf"
else:
- value_data = (original_out[index:]).replace("\r","")
- value_list = (value_data.replace("\r","")).split("\n")
+ value_data = (original_out[index:]).replace("\r", "")
+ value_list = (value_data.replace("\r", "")).split("\n")
temp_list = filter(lambda x: (x.find("lcore") == -1) and (x != ""), value_list)
length = len(temp_list)
for data_list in temp_list:
- count = count + 1
+ count = count + 1
value_data_list = data_list.split(";")
- if length == count :
+ if length == count:
data_finished = True
- latency = latency + self.__buffer_size_result_check( \
- value_data_list[1],value_data_list[5], \
- value_data_list[4],data_finished)
+ latency = latency + self.__buffer_size_result_check(
+ value_data_list[1], value_data_list[5],
+ value_data_list[4], data_finished)
latency = latency + "\n"
return latency
-
- def __buffer_size_result_check(self,buf_size,thpt_ltcy,ops_cycl,finished):
+
+ def __buffer_size_result_check(self, buf_size, thpt_ltcy, ops_cycl, finished):
count = 0
result = ""
buffer_sz = copy.deepcopy(self.total_buffer_list)
-
- for buf in self.waiting_to_coll_buf:
+
+ for buf in self.waiting_to_coll_buf:
if int(buf_size) > int(buf):
- count = count + 1
+ count = count + 1
result = result + "*,*,"
elif int(buf_size) == int(buf):
count = count + 1
self.waiting_to_coll_buf = self.waiting_to_coll_buf[count:]
- result = result + "{throughput_latenct},{ops_cycle},".format( \
- buffer=buf_size,throughput_latenct=thpt_ltcy,ops_cycle=ops_cycl)
+ result = result + "{throughput_latenct},{ops_cycle},".format(
+ buffer=buf_size, throughput_latenct=thpt_ltcy, ops_cycle=ops_cycl)
else:
- if finished == True:
+ if finished is True:
result = result + "*,*,"
else:
break
return result
-
- def __parse_dut_out_data(self,original_out,test_vector):
- perf_data_collect=""
- if test_vector["ptest"]=="latency":
+
+ def __parse_dut_out_data(self, original_out, test_vector):
+ perf_data_collect = ""
+ if test_vector["ptest"] == "latency":
perf_data_collect = self.__parse_latency_data(original_out)
else:
perf_data_collect = self.__parse_througuput_data(original_out)
-
+
return perf_data_collect
-
- def __valid_data_write_line(self,test_vector):
- iv = "{IV}".format(IV=test_vector["cipher-iv-sz"]) if test_vector["cipher-iv-sz"] != "" else "/"
- aad = "{Aad}".format(Aad=test_vector["auth-aad-sz"]) if test_vector["auth-aad-sz"] !="" else "/"
- ptest = (test_vector["ptest"]).upper()
- optype = test_vector["optype"]
- digest = "{dgst}".format(dgst=test_vector["auth-digest-sz"]) if test_vector["auth-digest-sz"] != "" else "/"
- auth_op = (test_vector["auth-op"]).capitalize() if test_vector["auth-op"] != "" else "/"
- devtype = ((test_vector["devtype"]).replace("crypto_","")).upper()
- auth_key = "{key}".format(key=test_vector["auth-key-sz"]) if test_vector["auth-key-sz"] != "" else "/"
- cipher_op = (test_vector["cipher-op"]).capitalize() if test_vector["cipher-op"] != "" else "-"
- auth_algo = ((test_vector["auth-algo"]).replace("-","_")).upper() if test_vector["auth-algo"] != "" else "/"
- cipher_key = "{key}".format(key=test_vector["cipher-key-sz"]) if test_vector["cipher-key-sz"] != "" else "/"
- cipher_algo = ((test_vector["cipher-algo"]).replace("-","_")).upper() if test_vector["cipher-algo"] != "" else "/"
-
- if optype.find("only") != -1 :
- chain = (optype.replace("-","_")).upper()
+
+ def __valid_data_write_line(self, test_vector):
+ iv = "{IV}".format(IV=test_vector["cipher-iv-sz"]) if test_vector["cipher-iv-sz"] != "" else "/"
+ aad = "{Aad}".format(Aad=test_vector["auth-aad-sz"]) if test_vector["auth-aad-sz"] != "" else "/"
+ ptest = (test_vector["ptest"]).upper()
+ optype = test_vector["optype"]
+ digest = "{dgst}".format(dgst=test_vector["auth-digest-sz"]) if test_vector["auth-digest-sz"] != "" else "/"
+ auth_op = (test_vector["auth-op"]).capitalize() if test_vector["auth-op"] != "" else "/"
+ devtype = ((test_vector["devtype"]).replace("crypto_", "")).upper()
+ auth_key = "{key}".format(key=test_vector["auth-key-sz"]) if test_vector["auth-key-sz"] != "" else "/"
+ cipher_op = (test_vector["cipher-op"]).capitalize() if test_vector["cipher-op"] != "" else "-"
+ auth_algo = ((test_vector["auth-algo"]).replace("-", "_")).upper() if test_vector["auth-algo"] != "" else "/"
+ cipher_key = "{key}".format(key=test_vector["cipher-key-sz"]) if test_vector["cipher-key-sz"] != "" else "/"
+ cipher_algo = ((test_vector["cipher-algo"]).replace("-", "_")).upper() if test_vector["cipher-algo"] != "" else "/"
+
+ if optype.find("only") != -1:
+ chain = (optype.replace("-", "_")).upper()
else:
- chain = ((optype.replace("-then-","_")).replace("auth", "hash")).upper()
-
- w_line = "{pmd},{Chain},{test_type},{cAlg},{cop},{cKey},{IV},{hAlg},{hop},{hkey},{Aad},{dgst},".format( \
- pmd=devtype,Chain=chain,test_type=ptest,cAlg=cipher_algo,cop=cipher_op,cKey=cipher_key,IV=iv,\
- hAlg=auth_algo,hop=auth_op,hkey=auth_key,Aad=aad,dgst=digest)
-
- return w_line
-
- def __result_collection(self,original_out,test_vector):
+ chain = ((optype.replace("-then-", "_")).replace("auth", "hash")).upper()
+
+ w_line = "{pmd},{Chain},{test_type},{cAlg},{cop},{cKey},{IV},{hAlg},{hop},{hkey},{Aad},{dgst},".format(
+ pmd=devtype, Chain=chain, test_type=ptest, cAlg=cipher_algo, cop=cipher_op, cKey=cipher_key, IV=iv,
+ hAlg=auth_algo, hop=auth_op, hkey=auth_key, Aad=aad, dgst=digest)
+
+ return w_line
+
+ def __result_collection(self, original_out, test_vector):
result = True
perf_line = ""
- f = open(self.filename,"a")
- if f==None:
+ f = open(self.filename, "a")
+ if f is None:
logger.info("open scv file failed.")
- return
+ return
self.waiting_to_coll_buf = copy.deepcopy(self.total_buffer_list)
- perf_line = self.__valid_data_write_line(test_vector) + \
- self.__parse_dut_out_data(original_out, test_vector)
+ perf_line = self.__valid_data_write_line(test_vector) + self.__parse_dut_out_data(original_out, test_vector)
f.write(perf_line)
- if (perf_line.find("sgtf") != -1) or (perf_line.find("otf") != -1) :
+ if (perf_line.find("sgtf") != -1) or (perf_line.find("otf") != -1):
result = False
return result
-
+
def __test_vector_to_cmd(self, test_vector, core_mask="", port_mask=""):
TEST_CRYPTO_PERF = "./app/test-crypto-perf/build/app/dpdk-test-crypto-perf"
EAL_CORE_MASK = " -cf" if core_mask == "" else " -c" + core_mask
EAL_SEP = " --"
QUEUE_NUM = " "
CSV_FRIENDLY = " --csv-friendly"
-
- #port info
+
+ # port info
pci_bus = ""
- for port in self.dut.ports_info :
- pci_bus =" -w " + port['pci']
-
+ for port in self.dut.ports_info:
+ pci_bus = " -w " + port['pci']
+
qat_bus = ""
- if len(self.qat_wilte_list) > 0 :
- qat_bus = " -w " + self.qat_wilte_list[random.randint(0 , len(self.qat_wilte_list) - 1)]
-
+ if len(self.qat_wilte_list) > 0:
+ qat_bus = " -w " + self.qat_wilte_list[random.randint(0, len(self.qat_wilte_list) - 1)]
+
vdev = ""
if self.__check_field_in_vector(test_vector, "vdev"):
vdev = " --vdev " + test_vector["vdev"]
-
+
ptest = ""
if self.__check_field_in_vector(test_vector, "ptest"):
ptest = " --ptest " + test_vector["ptest"]
-
+
devtype = ""
if self.__check_field_in_vector(test_vector, "devtype"):
devtype = " --devtype " + test_vector["devtype"]
-
+
chain = ""
if self.__check_field_in_vector(test_vector, "optype"):
chain = " --optype " + test_vector["optype"]
@@ -630,23 +625,23 @@ class TestL2fwdCrypto(TestCase):
digest = ""
if self.__check_field_in_vector(test_vector, "auth-digest-sz"):
digest = " --auth-digest-sz {size}".format(size=test_vector["auth-digest-sz"])
-
+
total_ops = ""
if self.__check_field_in_vector(test_vector, "total-ops"):
total_ops = " --total-ops {size}".format(size=test_vector["total-ops"])
-
+
burst_size = ""
if self.__check_field_in_vector(test_vector, "burst-sz"):
burst_size = " --burst-sz {size}".format(size=test_vector["burst-sz"])
-
+
buffer_size = ""
if self.__check_field_in_vector(test_vector, "buffer-sz"):
buffer_size = " --buffer-sz {size}".format(size=test_vector["buffer-sz"])
- cmd_str = "".join([TEST_CRYPTO_PERF, EAL_CORE_MASK, vdev,pci_bus,qat_bus, EAL_SEP,QUEUE_NUM,
- ptest, devtype, chain, cipher_algo, cipher_op, cipher_key,iv, auth_algo,
- auth_op, auth_key, aad, digest, total_ops, burst_size,buffer_size,CSV_FRIENDLY])
-
+ cmd_str = "".join([TEST_CRYPTO_PERF, EAL_CORE_MASK, vdev, pci_bus, qat_bus, EAL_SEP, QUEUE_NUM,
+ ptest, devtype, chain, cipher_algo, cipher_op, cipher_key, iv, auth_algo,
+ auth_op, auth_key, aad, digest, total_ops, burst_size, buffer_size, CSV_FRIENDLY])
+
return cmd_str
def __check_field_in_vector(self, test_vector, field_name):
@@ -684,7 +679,7 @@ class TestL2fwdCrypto(TestCase):
if op in chain_op_map[chain]:
return True
return False
-
+
def __is_valid_size(self, key_type, algo, size):
algo_size_map = {
"aes-cbc": {
@@ -706,9 +701,9 @@ class TestL2fwdCrypto(TestCase):
"aes-gcm": {
"cipher-key-sz": [16, 24, 32],
"auth-key-sz": [16, 24, 32],
- "auth-aad-sz": [1,2,3,4,5,6,8,9,12,16,24,32,64,128,155,256,1024,65535],
- "cipher-iv-sz": [12,16],
- "auth-digest-sz":[16]
+ "auth-aad-sz": [1, 2, 3, 4, 5, 6, 8, 9, 12, 16, 24, 32, 64, 128, 155, 256, 1024, 65535],
+ "cipher-iv-sz": [12, 16],
+ "auth-digest-sz": [16]
},
"snow3g-uea2": {
"cipher-key-sz": [16],
@@ -727,92 +722,92 @@ class TestL2fwdCrypto(TestCase):
"auth-key-sz": [0],
"auth-aad-sz": [0],
"cipher-iv-sz": [0],
- "auth-digest-sz":[0]
- },
+ "auth-digest-sz": [0]
+ },
"md5-hmac": {
"auth-key-sz": [64],
"auth-aad-sz": [0],
- "auth-digest-sz":[16]
+ "auth-digest-sz": [16]
},
"sha1-hmac": {
"auth-key-sz": [64],
"auth-aad-sz": [0],
- "auth-digest-sz":[20]
+ "auth-digest-sz": [20]
},
"sha2-224-hmac": {
"auth-key-sz": [64],
"auth-aad-sz": [0],
- "auth-digest-sz":[28]
+ "auth-digest-sz": [28]
},
"sha2-256-hmac": {
"auth-key-sz": [64],
"auth-aad-sz": [0],
- "auth-digest-sz":[32]
+ "auth-digest-sz": [32]
},
"sha2-384-hmac": {
"auth-key-sz": [128],
"auth-aad-sz": [0],
- "auth-digest-sz":[48]
+ "auth-digest-sz": [48]
},
"sha2-512-hmac": {
"auth-key-sz": [128],
"auth-aad-sz": [0],
- "auth-digest-sz":[64]
+ "auth-digest-sz": [64]
},
"aes-gmac": {
"auth-key-sz": [16, 24, 32],
- "auth-aad-sz": [1,2,3,4,5,6,8,9,12,16,24,32,64,128,155,256,1024,65535],
- "auth-digest-sz":[16]
+ "auth-aad-sz": [1, 2, 3, 4, 5, 6, 8, 9, 12, 16, 24, 32, 64, 128, 155, 256, 1024, 65535],
+ "auth-digest-sz": [16]
},
"aes-xcbc-hmac": {
"auth-key-sz": [16],
"auth-aad-sz": [0],
- "auth-digest-sz":[16]
+ "auth-digest-sz": [16]
},
"snow3g-uia2": {
"auth-key-sz": [16],
"auth-aad-sz": [16],
- "auth-digest-sz":[4]
+ "auth-digest-sz": [4]
},
"kasumi-f9": {
"auth-key-sz": [16],
"auth-aad-sz": [8],
- "auth-digest-sz":[4]
+ "auth-digest-sz": [4]
},
"zuc-eia3": {
"auth-key-sz": [16],
"auth-aad-sz": [16],
- "auth-digest-sz":[4]
+ "auth-digest-sz": [4]
},
"md5": {
"auth-key-sz": [0],
"auth-aad-sz": [0],
- "auth-digest-sz":[16]
+ "auth-digest-sz": [16]
},
"sha1": {
"auth-key-sz": [0],
"auth-aad-sz": [0],
- "auth-digest-sz":[20]
+ "auth-digest-sz": [20]
},
"sha2-224": {
"auth-key-sz": [0],
"auth-aad-sz": [0],
- "auth-digest-sz":[28]
+ "auth-digest-sz": [28]
},
"sha2-256": {
"auth-key-sz": [0],
"auth-aad-sz": [0],
- "auth-digest-sz":[32]
+ "auth-digest-sz": [32]
},
"sha2-384": {
"auth-key-sz": [0],
"auth-aad-sz": [0],
- "auth-digest-sz":[48]
+ "auth-digest-sz": [48]
},
"sha2-512": {
"auth-key-sz": [0],
"auth-aad-sz": [0],
- "auth-digest-sz":[64]
+ "auth-digest-sz": [64]
},
}
result = False
@@ -821,12 +816,12 @@ class TestL2fwdCrypto(TestCase):
if size in algo_size_map[algo][key_type]:
result = True
return result
-
- def __actually_aesni_mb_digest(self,vector):
+
+ def __actually_aesni_mb_digest(self, vector):
if ((vector["vdev"]).find("crypto_aesni_mb") == -1):
return
-
+
auth_algo_dgst_map = {
"md5-hmac": 12,
"sha1-hamc": 12,
@@ -838,15 +833,15 @@ class TestL2fwdCrypto(TestCase):
if vector["auth-algo"] in auth_algo_dgst_map:
digest = auth_algo_dgst_map[vector["auth-algo"]]
vector["auth-digest-sz"] = digest
-
+
def __iter_optype(self, vector, vector_list, core_mask="", port_mask=""):
test_vector = vector.copy()
chain_list = self.__var2list(test_vector["optype"])
for op_type in chain_list:
test_vector = vector.copy()
test_vector["optype"] = op_type
- self.__iter_cipher_algo(test_vector, vector_list, core_mask, port_mask)
-
+ self.__iter_cipher_algo(test_vector, vector_list, core_mask, port_mask)
+
def __iter_cipher_algo(self, vector, vector_list, core_mask="", port_mask=""):
test_vector = vector.copy()
if test_vector["optype"] == "auth-only":
@@ -870,8 +865,8 @@ class TestL2fwdCrypto(TestCase):
if self.__is_valid_op(test_vector["optype"], cipher_op):
test_vector = vector.copy()
test_vector["cipher-op"] = cipher_op
- self.__iter_cipher_key(test_vector, vector_list, \
- core_mask, port_mask)
+ self.__iter_cipher_key(test_vector, vector_list,
+ core_mask, port_mask)
def __iter_cipher_key(self, vector, vector_list, core_mask="", port_mask=""):
test_vector = vector.copy()
@@ -883,9 +878,9 @@ class TestL2fwdCrypto(TestCase):
for cipher_key in cipher_key_list:
test_vector = vector.copy()
if isinstance(cipher_key, int):
- if self.__is_valid_size("cipher-key-sz", \
- test_vector["cipher-algo"], \
- cipher_key):
+ if self.__is_valid_size("cipher-key-sz",
+ test_vector["cipher-algo"],
+ cipher_key):
test_vector["cipher-key-sz"] = cipher_key
self.__iter_iv(test_vector, vector_list, core_mask, port_mask)
else:
@@ -904,16 +899,16 @@ class TestL2fwdCrypto(TestCase):
for iv in iv_list:
test_vector = vector.copy()
if isinstance(iv, int):
- if self.__is_valid_size("cipher-iv-sz", \
- test_vector["cipher-algo"], \
- iv):
+ if self.__is_valid_size("cipher-iv-sz",
+ test_vector["cipher-algo"],
+ iv):
test_vector["cipher-iv-sz"] = iv
self.__iter_auth_algo(test_vector, vector_list, core_mask, port_mask)
else:
continue
- else:
+ else:
test_vector["cipher-iv-sz"] = 0
- self.__iter_auth_algo(test_vector, vector_list, \
+ self.__iter_auth_algo(test_vector, vector_list,
core_mask, port_mask)
def __iter_auth_algo(self, vector, vector_list, core_mask="", port_mask=""):
@@ -938,9 +933,9 @@ class TestL2fwdCrypto(TestCase):
for auth_op in auth_op_list:
if self.__is_valid_op(test_vector["optype"], auth_op):
test_vector = vector.copy()
- test_vector["auth-op"] = auth_op
- self.__iter_auth_key(test_vector, vector_list, \
- core_mask, port_mask)
+ test_vector["auth-op"] = auth_op
+ self.__iter_auth_key(test_vector, vector_list,
+ core_mask, port_mask)
def __iter_auth_key(self, vector, vector_list, core_mask="", port_mask=""):
test_vector = vector.copy()
@@ -952,15 +947,15 @@ class TestL2fwdCrypto(TestCase):
for auth_key in auth_key_list:
test_vector = vector.copy()
if isinstance(auth_key, int):
- if self.__is_valid_size("auth-key-sz", \
- test_vector["auth-algo"], \
- auth_key):
+ if self.__is_valid_size("auth-key-sz",
+ test_vector["auth-algo"],
+ auth_key):
test_vector["auth-key-sz"] = auth_key
self.__iter_aad(test_vector, vector_list, core_mask, port_mask)
else:
continue
else:
- test_vector["auth-key-sz"] = 0
+ test_vector["auth-key-sz"] = 0
self.__iter_aad(test_vector, vector_list, core_mask, port_mask)
def __iter_aad(self, vector, vector_list, core_mask="", port_mask=""):
@@ -973,65 +968,65 @@ class TestL2fwdCrypto(TestCase):
for aad in aad_list:
test_vector = vector.copy()
if isinstance(aad, int):
- if self.__is_valid_size("auth-aad-sz", \
- test_vector["auth-algo"], \
- aad):
+ if self.__is_valid_size("auth-aad-sz",
+ test_vector["auth-algo"],
+ aad):
test_vector["auth-aad-sz"] = aad
- self.__iter_digest(test_vector, vector_list, \
- core_mask, port_mask)
+ self.__iter_digest(test_vector, vector_list,
+ core_mask, port_mask)
else:
continue
else:
test_vector["auth-aad-sz"] = 0
- self.__iter_digest(test_vector, vector_list, \
- core_mask, port_mask)
+ self.__iter_digest(test_vector, vector_list,
+ core_mask, port_mask)
def __iter_digest(self, vector, vector_list, core_mask="", port_mask=""):
test_vector = vector.copy()
if test_vector["optype"] == "cipher-only":
test_vector["auth-digest-sz"] = ""
- self.__iter_buffer_size(test_vector, vector_list, \
- core_mask, port_mask)
+ self.__iter_buffer_size(test_vector, vector_list,
+ core_mask, port_mask)
else:
digest_list = self.__var2list(vector["auth-digest-sz"])
for digest in digest_list:
test_vector = vector.copy()
if isinstance(digest, int):
- if self.__is_valid_size("auth-digest-sz", \
- test_vector["auth-algo"], \
- digest):
- test_vector["auth-digest-sz"] = digest
+ if self.__is_valid_size("auth-digest-sz",
+ test_vector["auth-algo"],
+ digest):
+ test_vector["auth-digest-sz"] = digest
else:
continue
else:
test_vector["auth-digest-sz"] = 0
self.__actually_aesni_mb_digest(test_vector)
- self.__iter_buffer_size(test_vector, vector_list, \
- core_mask, port_mask)
-
- def __iter_buffer_size(self,vector, vector_list, core_mask="", port_mask=""):
+ self.__iter_buffer_size(test_vector, vector_list,
+ core_mask, port_mask)
+
+ def __iter_buffer_size(self, vector, vector_list, core_mask="", port_mask=""):
test_vector = vector.copy()
buffer_sz_list = vector["buffer-sz"]
if buffer_sz_list == "":
buffer_sz_list = "32,64,128,256, 512,768, 1024,1280,1536,1792,2048"
test_vector["buffer-sz"] = buffer_sz_list
vector_list.append(test_vector)
-
- def __test_vector_to_vector_list(self, test_vector,core_mask="", port_mask=""):
+
+ def __test_vector_to_vector_list(self, test_vector, core_mask="", port_mask=""):
vector_list = []
ptest_list = self.__var2list(test_vector["ptest"])
- for ptest in ptest_list :
+ for ptest in ptest_list:
test_vector["ptest"] = ptest
self.__iter_optype(test_vector, vector_list, core_mask, port_mask)
-
+
return vector_list
-
+
test_vectors = {
-
+
"qat_c_AES_CBC_Perf": {
"vdev": "",
- "devtype":"crypto_qat",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_qat",
+ "ptest": ["throughput", "latency"],
"optype": ["cipher-only", "cipher-then-auth"],
"cipher-algo": ["aes-cbc"],
"cipher-op": ["encrypt", "decrypt"],
@@ -1042,16 +1037,16 @@ test_vectors = {
"auth-op": ["generate"],
"auth-key-sz": [8, 16, 24, 32, 40, 48, 56, 64, 128],
"auth-aad-sz": [0],
- "auth-digest-sz": [16,20,28,32,48,64],
- "buffer-sz":"32,64,128,256,512,768,1024,1280,1536,1792,2048",
- "burst-sz":32,
- "total-ops":10000000
+ "auth-digest-sz": [16, 20, 28, 32, 48, 64],
+ "buffer-sz": "32,64,128,256,512,768,1024,1280,1536,1792,2048",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"qat_c_AES_CTR_Perf": {
"vdev": "",
- "devtype":"crypto_qat",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_qat",
+ "ptest": ["throughput", "latency"],
"optype": ["cipher-only", "cipher-then-auth"],
"cipher-algo": ["aes-ctr"],
"cipher-op": ["encrypt", "decrypt"],
@@ -1062,36 +1057,36 @@ test_vectors = {
"auth-op": ["generate"],
"auth-key-sz": [16, 24, 32, 40, 48, 56, 64, 128],
"auth-aad-sz": [0],
- "auth-digest-sz": [16,20,28,32,48,64],
- "buffer-sz":"32,64,128,256,512,768,1024,1280,1536,1792,2048",
- "burst-sz":32,
- "total-ops":10000000
+ "auth-digest-sz": [16, 20, 28, 32, 48, 64],
+ "buffer-sz": "32,64,128,256,512,768,1024,1280,1536,1792,2048",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"qat_c_AES_GCM_Perf": {
"vdev": "",
- "devtype":"crypto_qat",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_qat",
+ "ptest": ["throughput", "latency"],
"optype": ["aead"],
"cipher-algo": ["aes-gcm"],
"cipher-op": ["encrypt", "decrypt"],
"cipher-key-sz": [16, 24, 32],
"cipher-iv-sz": [16],
- "auth-algo": ["aes-gcm","aes-gmac","md5-hmac", "sha1-hmac", "sha2-224-hmac", "sha2-256-hmac",
+ "auth-algo": ["aes-gcm", "aes-gmac", "md5-hmac", "sha1-hmac", "sha2-224-hmac", "sha2-256-hmac",
"sha2-384-hmac", "sha2-512-hmac"],
"auth-op": ["generate"],
"auth-key-sz": [8, 16, 24, 32, 40, 48, 56, 64, 128],
- "auth-aad-sz": [0,8,12],
- "auth-digest-sz": [8,12,16,20,28,32,48,64],
- "buffer-sz":"32,64,128,256,512,768,1024,1280,1536,1792,2048",
- "burst-sz":32,
- "total-ops":10000000
+ "auth-aad-sz": [0, 8, 12],
+ "auth-digest-sz": [8, 12, 16, 20, 28, 32, 48, 64],
+ "buffer-sz": "32,64,128,256,512,768,1024,1280,1536,1792,2048",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"qat_c_3DES_CBC_Perf": {
"vdev": "",
- "devtype":"crypto_qat",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_qat",
+ "ptest": ["throughput", "latency"],
"optype": ["cipher-only", "cipher-then-auth"],
"cipher-algo": ["3des-cbc"],
"cipher-op": ["encrypt", "decrypt"],
@@ -1102,16 +1097,16 @@ test_vectors = {
"auth-op": ["generate"],
"auth-key-sz": [16, 24, 32, 40, 48, 56, 64, 128],
"auth-aad-sz": [0],
- "auth-digest-sz": [16,20,28,32,48,64],
- "buffer-sz":"32,64,128,256,512,768,1024,1280,1536,1792,2048",
- "burst-sz":32,
- "total-ops":10000000
+ "auth-digest-sz": [16, 20, 28, 32, 48, 64],
+ "buffer-sz": "32,64,128,256,512,768,1024,1280,1536,1792,2048",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"qat_c_3DES_CTR_Perf": {
"vdev": "",
- "devtype":"crypto_qat",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_qat",
+ "ptest": ["throughput", "latency"],
"optype": ["cipher-only", "cipher-then-auth"],
"cipher-algo": ["3des-ctr"],
"cipher-op": ["encrypt", "decrypt"],
@@ -1122,16 +1117,16 @@ test_vectors = {
"auth-op": ["generate"],
"auth-key-sz": [16, 24, 32, 40, 48, 56, 64, 128],
"auth-aad-sz": [0],
- "auth-digest-sz": [16,20,28,32,48,64],
- "buffer-sz":"32,64,128,256,512,768,1024,1280,1536,1792,2048",
- "burst-sz":32,
- "total-ops":10000000
+ "auth-digest-sz": [16, 20, 28, 32, 48, 64],
+ "buffer-sz": "32,64,128,256,512,768,1024,1280,1536,1792,2048",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"qat_c_KASUMMI_Perf": {
"vdev": "",
- "devtype":"crypto_qat",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_qat",
+ "ptest": ["throughput", "latency"],
"optype": ["cipher-only", "cipher-then-auth"],
"cipher-algo": ["kasumi-f8"],
"cipher-op": ["encrypt", "decrypt"],
@@ -1142,15 +1137,15 @@ test_vectors = {
"auth-key-sz": [16],
"auth-aad-sz": [8],
"auth-digest-sz": [4],
- "buffer-sz":"32,64,128,256,512,768,1024,1280,1536,1792,2048",
- "burst-sz":32,
- "total-ops":10000000
+ "buffer-sz": "32,64,128,256,512,768,1024,1280,1536,1792,2048",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"qat_c_SNOW3G_Perf": {
"vdev": "",
- "devtype":"crypto_qat",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_qat",
+ "ptest": ["throughput", "latency"],
"optype": ["cipher-only", "cipher-then-auth"],
"cipher-algo": ["snow3g-uea2"],
"cipher-op": ["encrypt", "decrypt"],
@@ -1161,36 +1156,36 @@ test_vectors = {
"auth-key-sz": [16],
"auth-aad-sz": [16],
"auth-digest-sz": [4],
- "buffer-sz":"32,64,128,256,512,768,1024,1280,1536,1792,2048",
- "burst-sz":32,
- "total-ops":10000000
+ "buffer-sz": "32,64,128,256,512,768,1024,1280,1536,1792,2048",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"qat_h_auto_Perf": {
"vdev": "",
- "devtype":"crypto_qat",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_qat",
+ "ptest": ["throughput", "latency"],
"optype": ["auth-only"],
"cipher-algo": "",
"cipher-op": "",
"cipher-key-sz": "",
"cipher-iv-sz": "",
- "auth-algo": ["aes-gcm","aes-gmac","kasumi-f9","snow3g-uia2","md5-hmac",
- "sha1-hmac", "sha2-224-hmac", "sha2-256-hmac","sha2-384-hmac",
+ "auth-algo": ["aes-gcm", "aes-gmac", "kasumi-f9", "snow3g-uia2", "md5-hmac",
+ "sha1-hmac", "sha2-224-hmac", "sha2-256-hmac", "sha2-384-hmac",
"sha2-512-hmac"],
"auth-op": ["generate"],
"auth-key-sz": [8, 16, 24, 32, 40, 48, 56, 64, 128],
- "auth-aad-sz": [0,8,12],
- "auth-digest-sz": [4,8,12,16, 20,28, 32, 48, 64],
- "buffer-sz":"32,64,128,256,512,768,1024,1280,1536,1792,2048",
- "burst-sz":32,
- "total-ops":10000000
+ "auth-aad-sz": [0, 8, 12],
+ "auth-digest-sz": [4, 8, 12, 16, 20, 28, 32, 48, 64],
+ "buffer-sz": "32,64,128,256,512,768,1024,1280,1536,1792,2048",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"qat_NULL_auto_Perf": {
"vdev": "",
- "devtype":"crypto_qat",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_qat",
+ "ptest": ["throughput", "latency"],
"optype": ["cipher-only"],
"cipher-algo": ["null"],
"cipher-op": ["encrypt", "decrypt"],
@@ -1201,15 +1196,15 @@ test_vectors = {
"auth-key-sz": [0],
"auth-aad-sz": [0],
"auth-digest-sz": [0],
- "buffer-sz":"32,64,128,256,512,768,1024,1280,1536,1792,2048",
- "burst-sz":32,
- "total-ops":10000000
+ "buffer-sz": "32,64,128,256,512,768,1024,1280,1536,1792,2048",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"aesni_mb_c_AES_CBC_Perf": {
"vdev": "crypto_aesni_mb_pmd",
- "devtype":"crypto_aesni_mb",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_aesni_mb",
+ "ptest": ["throughput", "latency"],
"optype": ["cipher-only", "cipher-then-auth"],
"cipher-algo": ["aes-cbc"],
"cipher-op": ["encrypt", "decrypt"],
@@ -1220,16 +1215,16 @@ test_vectors = {
"auth-op": ["generate"],
"auth-key-sz": [8, 16, 24, 32, 40, 48, 56, 64, 128],
"auth-aad-sz": [0],
- "auth-digest-sz": [12, 14, 16, 24,32],
- "buffer-sz":"32,64,128,256,512,768,1024,1280,1536,1792,2048",
- "burst-sz":32,
- "total-ops":10000000
- },
-
+ "auth-digest-sz": [12, 14, 16, 24, 32],
+ "buffer-sz": "32,64,128,256,512,768,1024,1280,1536,1792,2048",
+ "burst-sz": 32,
+ "total-ops": 10000000
+ },
+
"aesni_mb_c_AES_CTR_Perf": {
"vdev": "crypto_aesni_mb_pmd",
- "devtype":"crypto_aesni_mb",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_aesni_mb",
+ "ptest": ["throughput", "latency"],
"optype": ["cipher-only", "cipher-then-auth"],
"cipher-algo": ["aes-ctr"],
"cipher-op": ["encrypt", "decrypt"],
@@ -1240,56 +1235,56 @@ test_vectors = {
"auth-op": ["generate"],
"auth-key-sz": [8, 16, 24, 32, 40, 48, 56, 64, 128],
"auth-aad-sz": [0],
- "auth-digest-sz": [12, 14, 16, 24,32],
- "buffer-sz":"32,64,128,256,512,768,1024,1280,1536,1792,2048",
- "burst-sz":32,
- "total-ops":10000000
- },
-
+ "auth-digest-sz": [12, 14, 16, 24, 32],
+ "buffer-sz": "32,64,128,256,512,768,1024,1280,1536,1792,2048",
+ "burst-sz": 32,
+ "total-ops": 10000000
+ },
+
"aesni_mb_h_auto_Perf": {
"vdev": "crypto_aesni_mb_pmd",
- "devtype":"crypto_aesni_mb",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_aesni_mb",
+ "ptest": ["throughput", "latency"],
"optype": ["auth-only", "cipher-then-auth"],
"cipher-algo": "",
"cipher-op": "",
"cipher-key-sz": "",
"cipher-iv-sz": "",
- "auth-algo": ["md5-hmac","sha1-hmac", "sha2-224-hmac", "sha2-256-hmac",
- "sha2-384-hmac","sha2-512-hmac"],
+ "auth-algo": ["md5-hmac", "sha1-hmac", "sha2-224-hmac", "sha2-256-hmac",
+ "sha2-384-hmac", "sha2-512-hmac"],
"auth-op": ["generate"],
"auth-key-sz": [8, 16, 24, 32, 40, 48, 56, 64, 128],
"auth-aad-sz": [0],
- "auth-digest-sz": [12, 14, 16, 24,32],
- "buffer-sz":"32,64,128,256,512,768,1024,1280,1536,1792,2048",
- "burst-sz":32,
- "total-ops":10000000
+ "auth-digest-sz": [12, 14, 16, 24, 32],
+ "buffer-sz": "32,64,128,256,512,768,1024,1280,1536,1792,2048",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"aes_gcm_c_AES_GCM_Perf": {
"vdev": "crypto_aesni_gcm_pmd",
- "devtype":"crypto_aesni_gcm",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_aesni_gcm",
+ "ptest": ["throughput", "latency"],
"optype": ["aead"],
"cipher-algo": ["aes-gcm"],
"cipher-op": ["encrypt", "decrypt"],
- "cipher-key-sz": [16,32],
+ "cipher-key-sz": [16, 32],
"cipher-iv-sz": [12],
- "auth-algo": ["aes-gcm","aes-gmac"],
+ "auth-algo": ["aes-gcm", "aes-gmac"],
"auth-op": ["generate"],
- "auth-key-sz": [16,32],
- "auth-aad-sz": [1,4,8,12,16,65535],
- "auth-digest-sz": [8,12,16],
- "buffer-sz":"32,64,128,256,512,768,1024,1280,1536,1792,2048",
- "burst-sz":32,
- "total-ops":10000000
+ "auth-key-sz": [16, 32],
+ "auth-aad-sz": [1, 4, 8, 12, 16, 65535],
+ "auth-digest-sz": [8, 12, 16],
+ "buffer-sz": "32,64,128,256,512,768,1024,1280,1536,1792,2048",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"kasumi_KASUMI_auto_Perf": {
"vdev": "crypto_kasumi_pmd",
- "devtype":"crypto_kasumi",
- "ptest": ["throughput","latency"],
- "optype": ["cipher-only","auth-only", "cipher-then-auth"],
+ "devtype": "crypto_kasumi",
+ "ptest": ["throughput", "latency"],
+ "optype": ["cipher-only", "auth-only", "cipher-then-auth"],
"cipher-algo": ["kasumi-f8"],
"cipher-op": ["encrypt", "decrypt"],
"cipher-key-sz": [16],
@@ -1299,16 +1294,16 @@ test_vectors = {
"auth-key-sz": [16],
"auth-aad-sz": [8],
"auth-digest-sz": [4],
- "buffer-sz":"32,64,128,256,512,768,1024,1280,1536,1792,2048",
- "burst-sz":32,
- "total-ops":10000000
+ "buffer-sz": "32,64,128,256,512,768,1024,1280,1536,1792,2048",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"snow3g_SNOW3G_auto_Perf": {
"vdev": "crypto_snow3g_pmd",
- "devtype":"crypto_snow3g",
- "ptest": ["throughput","latency"],
- "optype": ["cipher-only", "auth-only","cipher-then-auth"],
+ "devtype": "crypto_snow3g",
+ "ptest": ["throughput", "latency"],
+ "optype": ["cipher-only", "auth-only", "cipher-then-auth"],
"cipher-algo": ["snow3g-uea2"],
"cipher-op": ["encrypt", "decrypt"],
"cipher-key-sz": [16],
@@ -1318,16 +1313,16 @@ test_vectors = {
"auth-key-sz": [16],
"auth-aad-sz": [16],
"auth-digest-sz": [4],
- "buffer-sz":"32,64,128,256,512,768,1024,1280,1536,1792,2048",
- "burst-sz":32,
- "total-ops":10000000
+ "buffer-sz": "32,64,128,256,512,768,1024,1280,1536,1792,2048",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"zuc_ZUC_auto_Perf": {
"vdev": "crypto_zuc_pmd",
- "devtype":"crypto_zuc",
- "ptest": ["throughput","latency"],
- "optype": ["cipher-only", "auth-only","cipher-then-auth"],
+ "devtype": "crypto_zuc",
+ "ptest": ["throughput", "latency"],
+ "optype": ["cipher-only", "auth-only", "cipher-then-auth"],
"cipher-algo": ["zuc-eea3"],
"cipher-op": ["encrypt", "decrypt"],
"cipher-key-sz": [16],
@@ -1337,15 +1332,15 @@ test_vectors = {
"auth-key-sz": [16],
"auth-aad-sz": [16],
"auth-digest-sz": [4],
- "buffer-sz":"32,64,128,256,512,768,1024,1280,1536,1792,2048",
- "burst-sz":32,
- "total-ops":10000000
+ "buffer-sz": "32,64,128,256,512,768,1024,1280,1536,1792,2048",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"null_NULL_auto_Perf": {
"vdev": "",
- "devtype":"crypto_qat",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_qat",
+ "ptest": ["throughput", "latency"],
"optype": ["cipher-only"],
"cipher-algo": ["null"],
"cipher-op": ["encrypt", "decrypt"],
@@ -1356,136 +1351,134 @@ test_vectors = {
"auth-key-sz": [0],
"auth-aad-sz": [0],
"auth-digest-sz": [0],
- "buffer-sz":"32,64,128,256,512,768,1024,1280,1536,1792,2048",
- "burst-sz":32,
- "total-ops":10000000
+ "buffer-sz": "32,64,128,256,512,768,1024,1280,1536,1792,2048",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"openssl_c_AES_CBC_Perf": {
"vdev": "crypto_openssl_pmd",
- "devtype":"crypto_openssl",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_openssl",
+ "ptest": ["throughput", "latency"],
"optype": ["cipher-only", "cipher-then-auth"],
"cipher-algo": ["aes-cbc"],
"cipher-op": ["encrypt", "decrypt"],
"cipher-key-sz": [16, 24, 32],
"cipher-iv-sz": [16],
- "auth-algo": ["md5", "sha1", "sha2-224", "sha2-256","sha2-384", "sha2-512",
+ "auth-algo": ["md5", "sha1", "sha2-224", "sha2-256", "sha2-384", "sha2-512",
"md5-hmac", "sha1-hmac", "sha2-224-hmac", "sha2-256-hmac",
"sha2-384-hmac", "sha2-512-hmac"],
"auth-op": ["generate"],
- "auth-key-sz": [0,64, 128],
+ "auth-key-sz": [0, 64, 128],
"auth-aad-sz": [0],
- "auth-digest-sz": [16, 20,28, 32,48, 64],
- "buffer-sz":"32,64,128,256",
- "burst-sz":32,
- "total-ops":10000000
+ "auth-digest-sz": [16, 20, 28, 32, 48, 64],
+ "buffer-sz": "32,64,128,256",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"openssl_c_AES_CTR_Perf": {
"vdev": "crypto_openssl_pmd",
- "devtype":"crypto_openssl",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_openssl",
+ "ptest": ["throughput", "latency"],
"optype": ["cipher-only", "cipher-then-auth"],
"cipher-algo": ["aes-ctr"],
"cipher-op": ["encrypt", "decrypt"],
"cipher-key-sz": [16, 24, 32],
"cipher-iv-sz": [16],
- "auth-algo": ["md5", "sha1", "sha2-224", "sha2-256","sha2-384", "sha2-512",
+ "auth-algo": ["md5", "sha1", "sha2-224", "sha2-256", "sha2-384", "sha2-512",
"md5-hmac", "sha1-hmac", "sha2-224-hmac", "sha2-256-hmac",
"sha2-384-hmac", "sha2-512-hmac"],
"auth-op": ["generate"],
"auth-key-sz": [0, 64, 128],
"auth-aad-sz": [0],
- "auth-digest-sz": [16, 20,28, 32,48, 64],
- "buffer-sz":"32,64,128,256",
- "burst-sz":32,
- "total-ops":10000000
+ "auth-digest-sz": [16, 20, 28, 32, 48, 64],
+ "buffer-sz": "32,64,128,256",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"openssl_c_AES_GCM_Perf": {
"vdev": "crypto_openssl_pmd",
- "devtype":"crypto_openssl",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_openssl",
+ "ptest": ["throughput", "latency"],
"optype": ["aead"],
"cipher-algo": ["aes-gcm"],
"cipher-op": ["aead"],
"cipher-key-sz": [16],
- "cipher-iv-sz": [12,16],
- "auth-algo": ["aes-gcm","aes-gmac","md5", "sha1", "sha2-224", "sha2-256",
- "sha2-384", "sha2-512","md5-hmac", "sha1-hmac", "sha2-224-hmac",
- "sha2-256-hmac","sha2-384-hmac", "sha2-512-hmac"],
+ "cipher-iv-sz": [12, 16],
+ "auth-algo": ["aes-gcm", "aes-gmac", "md5", "sha1", "sha2-224", "sha2-256",
+ "sha2-384", "sha2-512", "md5-hmac", "sha1-hmac", "sha2-224-hmac",
+ "sha2-256-hmac", "sha2-384-hmac", "sha2-512-hmac"],
"auth-op": ["generate"],
"auth-key-sz": [0, 16, 24, 32, 64, 128],
- "auth-aad-sz": [0,8,12],
- "auth-digest-sz": [8,12,16,20,28, 32,48, 64],
- "buffer-sz":"32,64,128,256",
- "burst-sz":32,
- "total-ops":10000000
+ "auth-aad-sz": [0, 8, 12],
+ "auth-digest-sz": [8, 12, 16, 20, 28, 32, 48, 64],
+ "buffer-sz": "32,64,128,256",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"openssl_c_3DES_CBC_Perf": {
"vdev": "crypto_openssl_pmd",
- "devtype":"crypto_openssl",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_openssl",
+ "ptest": ["throughput", "latency"],
"optype": ["cipher-only", "cipher-then-auth"],
"cipher-algo": ["3des-cbc"],
"cipher-op": ["encrypt", "decrypt"],
"cipher-key-sz": [16, 24],
"cipher-iv-sz": [8],
- "auth-algo": ["md5", "sha1", "sha2-224", "sha2-256","sha2-384", "sha2-512",
+ "auth-algo": ["md5", "sha1", "sha2-224", "sha2-256", "sha2-384", "sha2-512",
"md5-hmac", "sha1-hmac", "sha2-224-hmac", "sha2-256-hmac",
"sha2-384-hmac", "sha2-512-hmac"],
"auth-op": ["generate"],
- "auth-key-sz": [0,64, 128],
+ "auth-key-sz": [0, 64, 128],
"auth-aad-sz": [0],
- "auth-digest-sz": [16, 20,28, 32,48, 64],
- "buffer-sz":"32,64",
- "burst-sz":32,
- "total-ops":10000000
+ "auth-digest-sz": [16, 20, 28, 32, 48, 64],
+ "buffer-sz": "32,64",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"openssl_c_3DES_CTR_Perf": {
"vdev": "crypto_openssl_pmd",
- "devtype":"crypto_openssl",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_openssl",
+ "ptest": ["throughput", "latency"],
"optype": ["cipher-only", "cipher-then-auth"],
"cipher-algo": ["3des-ctr"],
"cipher-op": ["encrypt", "decrypt"],
"cipher-key-sz": [16, 24],
"cipher-iv-sz": [8],
- "auth-algo": ["md5", "sha1", "sha2-224", "sha2-256","sha2-384", "sha2-512",
+ "auth-algo": ["md5", "sha1", "sha2-224", "sha2-256", "sha2-384", "sha2-512",
"md5-hmac", "sha1-hmac", "sha2-224-hmac", "sha2-256-hmac",
"sha2-384-hmac", "sha2-512-hmac"],
"auth-op": ["generate"],
- "auth-key-sz": [0,64,128],
+ "auth-key-sz": [0, 64, 128],
"auth-aad-sz": [0],
- "auth-digest-sz": [16, 20,28, 32,48, 64],
- "buffer-sz":"32,64",
- "burst-sz":32,
- "total-ops":10000000
+ "auth-digest-sz": [16, 20, 28, 32, 48, 64],
+ "buffer-sz": "32,64",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
-
+
"openssl_h_HASH_auto_Perf": {
"vdev": "crypto_openssl_pmd",
- "devtype":"crypto_openssl",
- "ptest": ["throughput","latency"],
+ "devtype": "crypto_openssl",
+ "ptest": ["throughput", "latency"],
"optype": ["auth-only"],
"cipher-algo": "",
"cipher-op": "",
"cipher-key-sz": "",
"cipher-iv-sz": "",
- "auth-algo": ["md5", "sha1", "sha2-224", "sha2-256","sha2-384", "sha2-512",
+ "auth-algo": ["md5", "sha1", "sha2-224", "sha2-256", "sha2-384", "sha2-512",
"md5-hmac", "sha1-hmac", "sha2-224-hmac", "sha2-256-hmac",
"sha2-384-hmac", "sha2-512-hmac"],
"auth-op": ["generate"],
- "auth-key-sz": [0,64,128],
+ "auth-key-sz": [0, 64, 128],
"auth-aad-sz": [0],
- "auth-digest-sz": [16, 20,28, 32,48, 64],
- "buffer-sz":"32,64",
- "burst-sz":32,
- "total-ops":10000000
+ "auth-digest-sz": [16, 20, 28, 32, 48, 64],
+ "buffer-sz": "32,64",
+ "burst-sz": 32,
+ "total-ops": 10000000
},
}
-
-
--
2.5.5
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-16 2:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-14 7:24 [dts] [PATCH V2 0/2]test-crypto-perf: Add crypto performance auto test code and test plain gangx.yang
2017-03-14 7:24 ` [dts] [PATCH V2 1/2]test-crypto-perf:Add crypto performance auto test code gangx.yang
2017-03-14 7:24 ` [dts] [PATCH V2 2/2]test-crypto-perf:add crypto performance test plan gangx.yang
2017-03-16 2:25 [dts] [PATCH V2 0/2]test-crypto-perf: Add crypto performance auto test code and test plain gangx.yang
2017-03-16 2:25 ` [dts] [PATCH V2 1/2]test-crypto-perf:Add crypto performance auto test code gangx.yang
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).