From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 09FC7A00E6 for ; Fri, 17 May 2019 10:23:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C6A912BF5; Fri, 17 May 2019 10:23:23 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id C47D82BBD for ; Fri, 17 May 2019 10:23:21 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 May 2019 01:23:20 -0700 X-ExtLoop1: 1 Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga001.jf.intel.com with ESMTP; 17 May 2019 01:23:20 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 17 May 2019 01:23:19 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.249]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.136]) with mapi id 14.03.0415.000; Fri, 17 May 2019 16:23:17 +0800 From: "Zhao, XinfengX" To: "dts@dpdk.org" Thread-Topic: [PATCH V1] tests: add new algo xts in cryptodev l2fwd test Thread-Index: AQHVDIljm0XMwmoevE6nIxnOuhBfLKZu+nKA Date: Fri, 17 May 2019 08:23:17 +0000 Message-ID: <44051B25D8C8784BB77FFB604D6A70CA1204A48A@shsmsx102.ccr.corp.intel.com> References: <1558051543-313450-1-git-send-email-xinfengx.zhao@intel.com> In-Reply-To: <1558051543-313450-1-git-send-email-xinfengx.zhao@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] tests: add new algo xts in cryptodev l2fwd test X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Tested-by: Zhao, XinfengX -----Original Message----- From: Zhao, XinfengX=20 Sent: Friday, May 17, 2019 8:06 AM To: dts@dpdk.org Cc: Zhao, XinfengX Subject: [PATCH V1] tests: add new algo xts in cryptodev l2fwd test 1. add new feature XTS in cryptodev l2fwd 2. adjust the test vector 3. add = configuration the scheduler pmd in conf Signed-off-by: Xinfeng Zhao --- conf/l2fwd_cryptodev_func.cfg | 32 +++++++ tests/TestSuite_l2fwd_cryptodev_func.py | 159 ++++++++++++++++++++++------= ---- 2 files changed, 143 insertions(+), 48 deletions(-) create mode 100644 co= nf/l2fwd_cryptodev_func.cfg diff --git a/conf/l2fwd_cryptodev_func.cfg b/conf/l2fwd_cryptodev_func.cfg = new file mode 100644 index 0000000..6f3b146 --- /dev/null +++ b/conf/l2fwd_cryptodev_func.cfg @@ -0,0 +1,32 @@ +[suite] +# Cryptodev common options qat device id crypto_dev_id=3D"37c9" + +# eal config +l=3D"9,10,66" +socket-mem=3D"2048,0" +n=3D4 + +[test_scheduler_rr_AES_CBC_auto] +vdev=3D"crypto_scheduler_pmd_1,slave=3D0000:1a:01.0_qat_sym,slave=3D0000:3= f:01.0_qat_sym,slave=3D0000:3d:01.0_qat_sym,mode=3Dround-robin" + +[test_scheduler_rr_AES_GCM_auto] +vdev=3D"crypto_scheduler_pmd_1,slave=3D0000:1a:01.0_qat_sym,slave=3D0000:3= f:01.0_qat_sym,slave=3D0000:3d:01.0_qat_sym,mode=3Dround-robin" + +[test_scheduler_psb_AES_CBC_auto] +vdev=3D"crypto_aesni_mb0,name=3Daesni_mb_1 --vdev crypto_scheduler_pmd_1,s= lave=3D0000:1a:01.0_qat_sym,slave=3Daesni_mb_1,mode=3Dpacket-size-distr" + +[test_scheduler_psb_AES_GCM_auto] +vdev=3D"crypto_aesni_mb0,name=3Daesni_mb_1 --vdev crypto_scheduler_pmd_1,s= lave=3D0000:1a:01.0_qat_sym,slave=3Daesni_mb_1,mode=3Dpacket-size-distr" + +[test_scheduler_fo_AES_CBC_auto] +vdev=3D"crypto_aesni_mb0,name=3Daesni_mb_1 --vdev crypto_scheduler_pmd_1,s= lave=3D0000:1a:01.0_qat_sym,slave=3Daesni_mb_1,mode=3Dfail-over" + +[test_scheduler_fo_AES_GCM_auto] +vdev=3D"crypto_aesni_mb0,name=3Daesni_mb_1 --vdev crypto_scheduler_pmd_1,s= lave=3D0000:1a:01.0_qat_sym,slave=3Daesni_mb_1,mode=3Dfail-over" + +[test_scheduler_mm_AES_CBC_auto] +vdev=3D"crypto_aesni_mb0,name=3Daesni_mb_1 --vdev crypto_scheduler_pmd_1,s= lave=3D0000:1a:01.0_qat_sym,slave=3Daesni_mb_1,mode=3Dmulti-core" + +[test_scheduler_mm_AES_GCM_auto] +vdev=3D"crypto_aesni_mb0,name=3Daesni_mb_1 --vdev crypto_scheduler_pmd_1,s= lave=3D0000:1a:01.0_qat_sym,slave=3Daesni_mb_1,mode=3Dmulti-core" diff --git a/tests/TestSuite_l2fwd_cryptodev_func.py b/tests/TestSuite_l2fw= d_cryptodev_func.py index 2b1194b..7644f78 100644 --- a/tests/TestSuite_l2fwd_cryptodev_func.py +++ b/tests/TestSuite_l2fwd_cryptodev_func.py @@ -89,13 +89,24 @@ class TestL2fwdCrypto(TestCase): self.verify("Error" not in out, "Compilation error") self.verify("No such" not in out, "Compilation error") =20 - self.vf_driver =3D self.get_suite_cfg()['vf_driver'] - cc.bind_qat_device(self, self.vf_driver) + cc.bind_qat_device(self) =20 =20 def set_up(self): pass =20 + def test_qat_AES_XTS_auto(self): + if cc.is_test_skip(self): + return + + result =3D True + self.logger.info("Test qat_AES_XTS_00") + if not self.__execute_l2fwd_crypto_test( + test_vectors, "qat_AES_XTS_00"): + result =3D False + + self.verify(result, "Test failed") + def test_qat_AES_CBC_auto(self): if cc.is_test_skip(self): return @@ -315,6 +326,19 @@ class TestL2fwdCrypto(TestCase): =20 self.verify(result, "Test failed") =20 + def test_aesni_mb_AES_GCM_auto(self): + if cc.is_test_skip(self): + return + + result =3D True + self.logger.info("Test aesni_mb_aead_AES_GCM_00") + if not self.__execute_l2fwd_crypto_test( + test_vectors, "aesni_mb_aead_AES_GCM_00"): + result =3D False + + self.verify(result, "Test failed") + + def test_aesni_mb_AES_CCM_auto(self): if cc.is_test_skip(self): return @@ -749,7 +773,7 @@ class TestL2fwdCrypto(TestCase): pkt.send_pkt(tx_port=3Dself.tx_interface, count=3DPACKET_COUNT= ) =20 pkt_rec =3D self.tester.load_tcpdump_sniff_packets(inst) - + self.logger.info("Receive pkgs: {}".format(len(pkt_rec))) for pkt_r in pkt_rec: packet_hex =3D pkt_r.pktgen.pkt["Raw"].getfieldval("load") if packet_hex =3D=3D None: @@ -979,6 +1003,9 @@ class TestL2fwdCrypto(TestCase): elif vector["cipher_algo"] =3D=3D "3des-ctr": cipher_algo =3D algorithms.TripleDES(key) cipher_mode =3D modes.CTR(iv) + elif vector["cipher_algo"] =3D=3D "aes-xts": + cipher_algo =3D algorithms.AES(key) + cipher_mode =3D modes.XTS(iv) =20 elif vector["cipher_algo"] =3D=3D "des-cbc": cipher =3D pyDes.des(key, pyDes.CBC, iv) @@ -1236,6 +1263,= 10 @@ class TestL2fwdCrypto(TestCase): =20 def __is_valid_size(self, key_type, algo, size): algo_size_map =3D { + "aes-xts": { + "cipher_key": [32, 64], + "iv": [16], + }, "aes-cbc": { "cipher_key": [16, 24, 32], "iv": [16], @@ -1913,7 +1944,7 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc84= 54b6be54e53e3f9c99f0f830b16 "cipher_key": [0], "iv": "", "auth_algo": ["null"], - "auth_op": "", + "auth_op": ["GENERATE"], "auth_key": [0], "auth_key_random_size": "", "aad": [0], @@ -1933,15 +1964,14 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc= 8454b6be54e53e3f9c99f0f830b16 "cipher_op": ["ENCRYPT"], "cipher_key": [16, 24, 32], "iv": [16], - "auth_algo": ["sha1-hmac", "sha2-224-hmac", "sha2-256-hmac", - "sha2-384-hmac", "sha2-512-hmac"], + "auth_algo": ["sha1-hmac", "sha2-256-hmac"], "auth_op": ["GENERATE"], "auth_key": [64, 128], "auth_key_random_size": "", "aad": [0], "aad_random_size": "", "input": [256], - "digest_size": [12, 14, 16, 24, 32], + "digest_size": [12, 16], "output_cipher": "*", "output_hash": "*" }, @@ -1954,15 +1984,14 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc= 8454b6be54e53e3f9c99f0f830b16 "cipher_op": ["ENCRYPT"], "cipher_key": [16], "iv": [16], - "auth_algo": ["sha1-hmac", "sha2-224-hmac", "sha2-256-hmac", - "sha2-384-hmac", "sha2-512-hmac"], + "auth_algo": ["sha1-hmac", "sha2-256-hmac"], "auth_op": ["GENERATE"], "auth_key": [64, 128], "auth_key_random_size": "", "aad": [0], "aad_random_size": "", "input": [256], - "digest_size": [12, 14, 16, 24, 32], + "digest_size": [12, 16], "output_cipher": "*", "output_hash": "*" }, @@ -1983,7 +2012,7 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc84= 54b6be54e53e3f9c99f0f830b16 "aad": [0], "aad_random_size": "", "input": [256], - "digest_size": [12, 14, 16, 24, 32], + "digest_size": [12, 14, 16, 24], "output_cipher": "*", "output_hash": "*" }, @@ -2016,18 +2045,18 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc= 8454b6be54e53e3f9c99f0f830b16 "cipher_op": ["ENCRYPT"], "cipher_key": [8, 16, 24], "iv": [8], - "auth_algo": ["sha1-hmac", "sha2-224-hmac", "sha2-256-hmac", - "sha2-384-hmac", "sha2-512-hmac"], + "auth_algo": ["sha1-hmac", "sha2-256-hmac"], "auth_op": ["GENERATE"], "auth_key": [0, 64, 128], "auth_key_random_size": "", "aad": [0], "aad_random_size": "", "input": [256], - "digest_size": [12, 14, 16, 24, 32], + "digest_size": [12, 16], "output_cipher": "*", "output_hash": "*" }, + "aesni_mb_h_MD_SHA_00": { "vdev": "crypto_aesni_mb_pmd", "chain": ["HASH_ONLY"], @@ -2044,7 +2073,27 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc8= 454b6be54e53e3f9c99f0f830b16 "aad": [0], "aad_random_size": "", "input": [256], - "digest_size": [12, 16, 20, 28, 48, 64], + "digest_size": [12, 14, 16, 24], + "output_cipher": "*", + "output_hash": "*" + }, + + "aesni_mb_aead_AES_GCM_00": { + "vdev": "crypto_aesni_mb_pmd", + "chain": ["AEAD"], + "cdev_type": "SW", + "cipher_algo": ["aes-gcm"], + "cipher_op": ["ENCRYPT"], + "cipher_key": [16, 24, 32], + "iv": [12], + "auth_algo": ["aes-gcm", "aes-gmac"], + "auth_op": ["GENERATE"], + "auth_key": [16], + "auth_key_random_size": "", + "aad": [16], + "aad_random_size": "", + "input": [256], + "digest_size": [16], "output_cipher": "*", "output_hash": "*" }, @@ -2238,15 +2287,14 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc= 8454b6be54e53e3f9c99f0f830b16 "cipher_op": ["ENCRYPT"], "cipher_key": [8, 16, 24], "iv": [8], - "auth_algo": ["sha1-hmac", "sha2-224-hmac", "sha2-256-hmac", - "sha2-384-hmac", "sha2-512-hmac"], + "auth_algo": ["sha1-hmac", "sha2-256-hmac"], "auth_op": ["GENERATE"], "auth_key": [0, 64, 128], "auth_key_random_size": "", "aad": [0], "aad_random_size": "", "input": [256], - "digest_size": [20, 28, 32, 48], + "digest_size": [20, 28], "output_cipher": "*", "output_hash": "*" }, @@ -2259,15 +2307,14 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc= 8454b6be54e53e3f9c99f0f830b16 "cipher_op": ["ENCRYPT"], "cipher_key": [24], "iv": [8], - "auth_algo": ["sha1-hmac", "sha2-224-hmac", "sha2-256-hmac", - "sha2-384-hmac", "sha2-512-hmac"], + "auth_algo": ["sha1-hmac", "sha2-256-hmac"], "auth_op": ["GENERATE"], "auth_key": [0, 64, 128], "auth_key_random_size": "", "aad": [0], "aad_random_size": "", "input": [256], - "digest_size": [20, 28, 32, 48], + "digest_size": [20, 28], "output_cipher": "470c43ce135176ff34300c11b8a5dc463be774851c405eb6= 7a3c54e\ 30707b6ac47b1dca58d5a2dab1dee452f7712f1803709d100608f8df9786156e4656ff60cb= 6a2f722\ e6a96932fa0dbba8c4941e61b8ca2b5903bc724d5f68856b9e6f66d7b4e42cc49b44bb85b7= ce2f1c5\ @@ -2286,15 +2333,14 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc= 8454b6be54e53e3f9c99f0f830b16 "cipher_op": ["ENCRYPT"], "cipher_key": [16, 24, 32], "iv": [16], - "auth_algo": ["sha1-hmac", "sha2-224-hmac", "sha2-256-hmac", - "sha2-384-hmac", "sha2-512-hmac"], + "auth_algo": ["sha1-hmac", "sha2-256-hmac"], "auth_op": ["GENERATE"], "auth_key": [64, 128], "auth_key_random_size": "", "aad": [0], "aad_random_size": "", "input": [256], - "digest_size": [20, 28, 32, 48], + "digest_size": [20, 28], "output_cipher": "*", "output_hash": "*" }, @@ -2307,15 +2353,14 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc= 8454b6be54e53e3f9c99f0f830b16 "cipher_op": ["ENCRYPT"], "cipher_key": [16, 24, 32], "iv": [16], - "auth_algo": ["sha1-hmac", "sha2-224-hmac", "sha2-256-hmac", - "sha2-384-hmac", "sha2-512-hmac"], + "auth_algo": ["sha1-hmac", "sha2-256-hmac"], "auth_op": ["GENERATE"], "auth_key": [64, 128], "auth_key_random_size": "", "aad": [0], "aad_random_size": "", "input": [256], - "digest_size": [20, 28, 32, 48], + "digest_size": [20, 28], "output_cipher": "*", "output_hash": "*" }, @@ -2377,7 +2422,7 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc84= 54b6be54e53e3f9c99f0f830b16 "aad": [0], "aad_random_size": "", "input": [256], - "digest_size": [12, 16, 20, 28, 48, 64], + "digest_size": [16, 20, 28, 48, 64], "output_cipher": "*", "output_hash": "*" }, @@ -2490,15 +2535,14 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc= 8454b6be54e53e3f9c99f0f830b16 "cipher_op": ["ENCRYPT"], "cipher_key": [8], "iv": [8], - "auth_algo": ["sha1-hmac", "sha2-224-hmac", "sha2-256-hmac", - "sha2-384-hmac", "sha2-512-hmac"], + "auth_algo": ["sha1-hmac", "sha2-256-hmac"], "auth_op": ["GENERATE"], "auth_key": [64, 128], "auth_key_random_size": "", "aad": [0], "aad_random_size": "", "input": [256], - "digest_size": [12, 14, 16, 24, 32], + "digest_size": [12, 16], "output_cipher": "*", "output_hash": "*" }, @@ -2511,21 +2555,20 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc= 8454b6be54e53e3f9c99f0f830b16 "cipher_op": ["ENCRYPT"], "cipher_key": [8], "iv": [8], - "auth_algo": ["sha1-hmac", "sha2-224-hmac", "sha2-256-hmac", - "sha2-384-hmac", "sha2-512-hmac"], + "auth_algo": ["sha1-hmac", "sha2-256-hmac"], "auth_op": ["GENERATE"], "auth_key": [64, 128], "auth_key_random_size": "", "aad": [0], "aad_random_size": "", "input": [256], - "digest_size": [12, 14, 16, 24, 32], + "digest_size": [20, 28], "output_cipher": "*", "output_hash": "*" }, =20 "scheduler_rr_AES_CBC_00": { - "vdev": "", + "vdev": "crypto_scheduler_rr", "chain": ["CIPHER_ONLY", "CIPHER_HASH"], "cdev_type": "HW", "cipher_algo": ["aes-cbc"], @@ -2545,7 +2588,7 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc84= 54b6be54e53e3f9c99f0f830b16 }, =20 "scheduler_rr_AES_GCM_00": { - "vdev": "", + "vdev": "crypto_scheduler_rr", "chain": ["AEAD"], "cdev_type": "HW", "cipher_algo": ["aes-gcm"], @@ -2565,9 +2608,9 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc84= 54b6be54e53e3f9c99f0f830b16 }, =20 "scheduler_psb_AES_CBC_00": { - "vdev": "", + "vdev": "crypto_scheduler_psb", "chain": ["CIPHER_ONLY", "CIPHER_HASH"], - "cdev_type": "HW", + "cdev_type": "SW", "cipher_algo": ["aes-cbc"], "cipher_op": ["ENCRYPT", "DECRYPT"], "cipher_key": [16], @@ -2585,9 +2628,9 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc84= 54b6be54e53e3f9c99f0f830b16 }, =20 "scheduler_psb_AES_GCM_00": { - "vdev": "", + "vdev": "crypto_scheduler_psb", "chain": ["AEAD"], - "cdev_type": "HW", + "cdev_type": "SW", "cipher_algo": ["aes-gcm"], "cipher_op": ["ENCRYPT"], "cipher_key": [16, 24, 32], @@ -2605,9 +2648,9 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc84= 54b6be54e53e3f9c99f0f830b16 }, =20 "scheduler_fo_AES_CBC_00": { - "vdev": "", + "vdev": "crypto_scheduler_fo", "chain": ["CIPHER_ONLY", "CIPHER_HASH"], - "cdev_type": "HW", + "cdev_type": "SW", "cipher_algo": ["aes-cbc"], "cipher_op": ["ENCRYPT", "DECRYPT"], "cipher_key": [16], @@ -2625,9 +2668,9 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc84= 54b6be54e53e3f9c99f0f830b16 }, =20 "scheduler_fo_AES_GCM_00": { - "vdev": "", + "vdev": "crypto_scheduler_fo", "chain": ["AEAD"], - "cdev_type": "HW", + "cdev_type": "SW", "cipher_algo": ["aes-gcm"], "cipher_op": ["ENCRYPT"], "cipher_key": [16, 24, 32], @@ -2645,9 +2688,9 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc84= 54b6be54e53e3f9c99f0f830b16 }, =20 "scheduler_mm_AES_CBC_00": { - "vdev": "", + "vdev": "crypto_scheduler_mm", "chain": ["CIPHER_ONLY", "CIPHER_HASH"], - "cdev_type": "HW", + "cdev_type": "SW", "cipher_algo": ["aes-cbc"], "cipher_op": ["ENCRYPT", "DECRYPT"], "cipher_key": [16], @@ -2665,9 +2708,9 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc84= 54b6be54e53e3f9c99f0f830b16 }, =20 "scheduler_mm_AES_GCM_00": { - "vdev": "", + "vdev": "crypto_scheduler_mm", "chain": ["AEAD"], - "cdev_type": "HW", + "cdev_type": "SW", "cipher_algo": ["aes-gcm"], "cipher_op": ["ENCRYPT"], "cipher_key": [16, 24, 32], @@ -2683,4 +2726,24 @@ fc2ab337f7031a0f20636c82074a6bebcf91f06e04d45fa1dcc8= 454b6be54e53e3f9c99f0f830b16 "output_cipher": "*", "output_hash": "*" }, + + "qat_AES_XTS_00": { + "vdev": "", + "chain": ["CIPHER_ONLY", "CIPHER_HASH"], + "cdev_type": "HW", + "cipher_algo": ["aes-xts"], + "cipher_op": ["ENCRYPT"], + "cipher_key": [32], + "iv": [16], + "auth_algo": ["sha1-hmac", "sha2-256-hmac"], + "auth_op": ["GENERATE"], + "auth_key": [64, 128], + "auth_key_random_size": "", + "aad": [0], + "aad_random_size": "", + "input": [256], + "digest_size": [20, 32], + "output_cipher": "*", + "output_hash": "*" + }, } -- 2.7.4