test/crypto: use generic crypto auto test framework
cover test/crypto: use generic crypto auto test framework
This patch series enables the generic auto test crypto framework for the OCTEON TX PMDs. The patch series also resolves the bugs observed while testing these test cases.
Ankur Dwivedi (6):
common/cpt: fix encryption offset
crypto/octeontx: remove stats callback
crypto/octeontx: set session private data
crypto/octeontx2: set session private data
crypto/octeontx: remove unsupported feature
crypto/octeontx2: remove unsupported feature
Anoob Joseph (1):
test/crypto: use generic cryptotests for OCTEON TX PMDs
app/test/test_cryptodev.c | 769 +------------------------- doc/guides/cryptodevs/features/octeontx.ini | 1 - doc/guides/cryptodevs/features/octeontx2.ini | 1 - drivers/common/cpt/cpt_ucode.h | 24 +- drivers/crypto/octeontx/otx_cryptodev_ops.c | 21 +- drivers/crypto/octeontx2/otx2_cryptodev.c | 1 - drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 3 + 7 files changed, 20 insertions(+), 800 deletions(-)
Signature · 1 line
1.9.3
PATCH 1/7 common/cpt: fix encryption offset
In case of gmac auth the encryption offset should be set to zero.
--- drivers/common/cpt/cpt_ucode.h | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-)
drivers/common/cpt/cpt_ucode.h +10 -14
@@ -682,9 +682,6 @@ m_vaddr = (uint8_t *)m_vaddr + size; m_dma += size; -if (hash_type ==GMAC_TYPE ) - encr_data_len =0 ; -if (unlikely (!(flags &VALID_IV_BUF ))) { iv_len =0 ; iv_offset =ENCR_IV_OFFSET (d_offs);
@@ -716,6 +713,11 @@ opcode.s.major =CPT_MAJOR_OP_FC ; opcode.s.minor =0 ; +if (hash_type ==GMAC_TYPE ) { + encr_offset =0 ; + encr_data_len =0 ; + } + auth_dlen = auth_offset + auth_data_len; enc_dlen = encr_data_len + encr_offset;if (unlikely (encr_data_len &0xf )) {
@@ -726,11 +728,6 @@ enc_dlen =ROUNDUP16 (encr_data_len) + encr_offset; } -if (unlikely (hash_type ==GMAC_TYPE )) { - encr_offset = auth_dlen; - enc_dlen =0 ; - } -if (unlikely (auth_dlen > enc_dlen)) { inputlen = auth_dlen; outputlen = auth_dlen + mac_len;
@@ -1033,9 +1030,6 @@ hash_type = cpt_ctx->hash_type; mac_len = cpt_ctx->mac_len; -if (hash_type ==GMAC_TYPE ) - encr_data_len =0 ; -if (unlikely (!(flags &VALID_IV_BUF ))) { iv_len =0 ; iv_offset =ENCR_IV_OFFSET (d_offs);
@@ -1092,6 +1086,11 @@ opcode.s.major =CPT_MAJOR_OP_FC ; opcode.s.minor =1 ; +if (hash_type ==GMAC_TYPE ) { + encr_offset =0 ; + encr_data_len =0 ; + } + enc_dlen = encr_offset + encr_data_len; auth_dlen = auth_offset + auth_data_len;
@@ -1103,9 +1102,6 @@ outputlen = enc_dlen; } -if (hash_type ==GMAC_TYPE ) - encr_offset = inputlen; - vq_cmd_w0.u64 =0 ; vq_cmd_w0.s.param1 = encr_data_len; vq_cmd_w0.s.param2 = auth_data_len;
Signature · 1 line
1.9.3
PATCH 2/7 crypto/octeontx: remove stats callback
In reply to Ankur DwivediThe stats get and reset functions for octeontx crypto PMD are unimplemented. So removing them.
--- drivers/crypto/octeontx/otx_cryptodev_ops.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-)
drivers/crypto/octeontx/otx_cryptodev_ops.c +2 -15
@@ -127,19 +127,6 @@ } } -static void -otx_cpt_stats_get(struct rte_cryptodev *dev __rte_unused, - struct rte_cryptodev_stats *stats __rte_unused) -{ -CPT_PMD_INIT_FUNC_TRACE (); -} - -static void -otx_cpt_stats_reset(struct rte_cryptodev *dev __rte_unused) -{ -CPT_PMD_INIT_FUNC_TRACE (); -} - static int otx_cpt_que_pair_setup(struct rte_cryptodev *dev, uint16_t que_pair_id,
@@ -915,8 +902,8 @@ .dev_close = otx_cpt_dev_close, .dev_infos_get = otx_cpt_dev_info_get, - .stats_get = otx_cpt_stats_get, - .stats_reset = otx_cpt_stats_reset, + .stats_get = NULL, + .stats_reset = NULL, .queue_pair_setup = otx_cpt_que_pair_setup, .queue_pair_release = otx_cpt_que_pair_release,
Signature · 1 line
1.9.3
PATCH 3/7 crypto/octeontx: set session private data
In reply to Ankur DwivediThis patch sets the first 32 bytes of session private data to zero. This prevents garbage data to be used in code logic.
--- drivers/crypto/octeontx/otx_cryptodev_ops.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/crypto/octeontx/otx_cryptodev_ops.c +3 -0
@@ -252,6 +252,9 @@return -ENOMEM ; } +memset (priv,0 ,sizeof (struct cpt_sess_misc ) + + offsetof(struct cpt_ctx , fctx)); + misc = priv;for ( ; xform !=NULL ; xform = xform->next) {
Signature · 1 line
1.9.3
PATCH 4/7 crypto/octeontx2: set session private data
In reply to Ankur DwivediThis patch sets the first 32 bytes of session private data to zero. This prevents garbage data to be used in code logic.
--- drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/crypto/octeontx2/otx2_cryptodev_ops.c +3 -0
@@ -364,6 +364,9 @@return -ENOMEM ; } +memset (priv,0 ,sizeof (struct cpt_sess_misc ) + + offsetof(struct cpt_ctx , fctx)); + misc = priv;for ( ; xform !=NULL ; xform = xform->next) {
Signature · 1 line
1.9.3
PATCH 5/7 crypto/octeontx: remove unsupported feature
In reply to Ankur DwivediFor SNOW and ZUC algos the offset value for enryption and decryption is converted to bytes. Hence RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA feature is not supported by the octeontx crypto pmd.
--- doc/guides/cryptodevs/features/octeontx.ini | 1 - drivers/crypto/octeontx/otx_cryptodev_ops.c | 1 - 2 files changed, 2 deletions(-)
doc/guides/cryptodevs/features/octeontx.ini +0 -1
@@ -13,7 +13,6 @@ OOP SGL In LB Out = Y OOP SGL In SGL Out = Y RSA PRIV OP KEY QT = Y Symmetric sessionless = Y -Non-Byte aligned data = Y ; ; Supported crypto algorithms of 'octeontx' crypto driver.
drivers/crypto/octeontx/otx_cryptodev_ops.c +0 -1
@@ -979,7 +979,6 @@RTE_CRYPTODEV_FF_IN_PLACE_SGL |RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT | -RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA |RTE_CRYPTODEV_FF_SYM_SESSIONLESS ;break ;default :
Signature · 1 line
1.9.3
PATCH 6/7 crypto/octeontx2: remove unsupported feature
In reply to Ankur DwivediFor SNOW and ZUC algos the offset value for enryption and decryption is converted to bytes. Hence RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA feature is not supported by the octeontx2 crypto pmd.
--- doc/guides/cryptodevs/features/octeontx2.ini | 1 - drivers/crypto/octeontx2/otx2_cryptodev.c | 1 - 2 files changed, 2 deletions(-)
doc/guides/cryptodevs/features/octeontx2.ini +0 -1
@@ -13,7 +13,6 @@ OOP SGL In LB Out = Y OOP SGL In SGL Out = Y RSA PRIV OP KEY QT = Y Symmetric sessionless = Y -Non-Byte aligned data = Y ; ; Supported crypto algorithms of 'octeontx2' crypto driver.
drivers/crypto/octeontx2/otx2_cryptodev.c +0 -1
@@ -104,7 +104,6 @@RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO |RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT | -RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA |RTE_CRYPTODEV_FF_SYM_SESSIONLESS ;return 0 ;
Signature · 1 line
1.9.3
PATCH 7/7 test/crypto: use generic cryptotests for OCTEON TX PMDs
In reply to Ankur DwivediFrom: Anoob Joseph <[email protected]>
This patch enables the generic crypto tests for OCTEON TX PMDs. Reomves the PMD specific tests.
--- app/test/test_cryptodev.c | 769 +--------------------------------------------- 1 file changed, 2 insertions(+), 767 deletions(-)
app/test/test_cryptodev.c +2 -767
@@ -9247,361 +9247,10 @@ struct multi_session_params {return TEST_SUCCESS ; } -static int -test_null_cipher_only_operation (void ) -{ -struct crypto_testsuite_params *ts_params = &testsuite_params; -struct crypto_unittest_params *ut_params = &unittest_params; - -/* Verify the capabilities */ -struct rte_cryptodev_sym_capability_idx cap_idx; - cap_idx.type =RTE_CRYPTO_SYM_XFORM_CIPHER ; - cap_idx.algo.cipher =RTE_CRYPTO_CIPHER_NULL ; -if (rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], - &cap_idx) ==NULL ) -return -ENOTSUP ; - -/* Generate test mbuf data and space for digest */ - ut_params->ibuf =setup_test_string (ts_params->mbuf_pool, - catch_22_quote,QUOTE_512_BYTES ,0 ); - -/* Setup Cipher Parameters */ - ut_params->cipher_xform.type =RTE_CRYPTO_SYM_XFORM_CIPHER ; - ut_params->cipher_xform.next =NULL ; - - ut_params->cipher_xform.cipher.algo =RTE_CRYPTO_CIPHER_NULL ; - ut_params->cipher_xform.cipher.op =RTE_CRYPTO_CIPHER_OP_ENCRYPT ; - - ut_params->sess =rte_cryptodev_sym_session_create ( - ts_params->session_mpool); - -/* Create Crypto session*/ -rte_cryptodev_sym_session_init (ts_params->valid_devs[0 ], - ut_params->sess, - &ut_params->cipher_xform, - ts_params->session_priv_mpool); -TEST_ASSERT_NOT_NULL (ut_params->sess,"Session creation failed" ); - -/* Generate Crypto op data structure */ - ut_params->op =rte_crypto_op_alloc (ts_params->op_mpool, -RTE_CRYPTO_OP_TYPE_SYMMETRIC ); -TEST_ASSERT_NOT_NULL (ut_params->op, -"Failed to allocate symmetric crypto operation struct" ); - -/* Set crypto operation data parameters */ -rte_crypto_op_attach_sym_session (ut_params->op, ut_params->sess); - -struct rte_crypto_sym_op *sym_op = ut_params->op->sym; - -/* set crypto operation source mbuf */ - sym_op->m_src = ut_params->ibuf; - - sym_op->cipher.data.offset =0 ; - sym_op->cipher.data.length =QUOTE_512_BYTES ; - -/* Process crypto operation */ - ut_params->op =process_crypto_request (ts_params->valid_devs[0 ], - ut_params->op); -TEST_ASSERT_NOT_NULL (ut_params->op,"no crypto operation returned" ); - -TEST_ASSERT_EQUAL (ut_params->op->status,RTE_CRYPTO_OP_STATUS_SUCCESS , -"crypto operation processing failed" ); - -/* Validate obuf */ -TEST_ASSERT_BUFFERS_ARE_EQUAL ( - rte_pktmbuf_mtod(ut_params->op->sym->m_src, uint8_t *), - catch_22_quote, -QUOTE_512_BYTES , -"Ciphertext data not as expected" ); - -return TEST_SUCCESS ; -}uint8_t orig_data[] = {0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab }; -static int -test_null_auth_only_operation (void ) -{ -struct crypto_testsuite_params *ts_params = &testsuite_params; -struct crypto_unittest_params *ut_params = &unittest_params; -uint8_t *digest; - -/* Verify the capabilities */ -struct rte_cryptodev_sym_capability_idx cap_idx; - cap_idx.type =RTE_CRYPTO_SYM_XFORM_AUTH ; - cap_idx.algo.auth =RTE_CRYPTO_AUTH_NULL ; -if (rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], - &cap_idx) ==NULL ) -return -ENOTSUP ; - -/* Generate test mbuf data and space for digest */ - ut_params->ibuf =setup_test_string (ts_params->mbuf_pool, - catch_22_quote,QUOTE_512_BYTES ,0 ); - -/* create a pointer for digest, but don't expect anything to be written -* here in a NULL auth algo so no mbuf append done. -*/ - digest = rte_pktmbuf_mtod_offset(ut_params->ibuf, uint8_t *, -QUOTE_512_BYTES ); -/* prefill the memory pointed to by digest */ -memcpy (digest, orig_data,sizeof (orig_data)); - -/* Setup HMAC Parameters */ - ut_params->auth_xform.type =RTE_CRYPTO_SYM_XFORM_AUTH ; - ut_params->auth_xform.next =NULL ; - - ut_params->auth_xform.auth.algo =RTE_CRYPTO_AUTH_NULL ; - ut_params->auth_xform.auth.op =RTE_CRYPTO_AUTH_OP_GENERATE ; - - ut_params->sess =rte_cryptodev_sym_session_create ( - ts_params->session_mpool); - -/* Create Crypto session*/ -rte_cryptodev_sym_session_init (ts_params->valid_devs[0 ], - ut_params->sess, &ut_params->auth_xform, - ts_params->session_priv_mpool); -TEST_ASSERT_NOT_NULL (ut_params->sess,"Session creation failed" ); - -/* Generate Crypto op data structure */ - ut_params->op =rte_crypto_op_alloc (ts_params->op_mpool, -RTE_CRYPTO_OP_TYPE_SYMMETRIC ); -TEST_ASSERT_NOT_NULL (ut_params->op, -"Failed to allocate symmetric crypto operation struct" ); - -/* Set crypto operation data parameters */ -rte_crypto_op_attach_sym_session (ut_params->op, ut_params->sess); - -struct rte_crypto_sym_op *sym_op = ut_params->op->sym; - - sym_op->m_src = ut_params->ibuf; - - sym_op->auth.data.offset =0 ; - sym_op->auth.data.length =QUOTE_512_BYTES ; - sym_op->auth.digest.data = digest; - sym_op->auth.digest.phys_addr =rte_pktmbuf_iova_offset (ut_params->ibuf, -QUOTE_512_BYTES ); - -/* Process crypto operation */ - ut_params->op =process_crypto_request (ts_params->valid_devs[0 ], - ut_params->op); -TEST_ASSERT_NOT_NULL (ut_params->op,"no crypto operation returned" ); - -TEST_ASSERT_EQUAL (ut_params->op->status,RTE_CRYPTO_OP_STATUS_SUCCESS , -"crypto operation processing failed" ); -/* Make sure memory pointed to by digest hasn't been overwritten */ -TEST_ASSERT_BUFFERS_ARE_EQUAL ( - orig_data, - digest, -sizeof (orig_data), -"Memory at digest ptr overwritten unexpectedly" ); - -return TEST_SUCCESS ; -} - - -static int -test_null_cipher_auth_operation (void ) -{ -struct crypto_testsuite_params *ts_params = &testsuite_params; -struct crypto_unittest_params *ut_params = &unittest_params; -uint8_t *digest; - -/* Verify the capabilities */ -struct rte_cryptodev_sym_capability_idx cap_idx; - cap_idx.type =RTE_CRYPTO_SYM_XFORM_AUTH ; - cap_idx.algo.auth =RTE_CRYPTO_AUTH_NULL ; -if (rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], - &cap_idx) ==NULL ) -return -ENOTSUP ; - cap_idx.type =RTE_CRYPTO_SYM_XFORM_CIPHER ; - cap_idx.algo.cipher =RTE_CRYPTO_CIPHER_NULL ; -if (rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], - &cap_idx) ==NULL ) -return -ENOTSUP ; - -/* Generate test mbuf data and space for digest */ - ut_params->ibuf =setup_test_string (ts_params->mbuf_pool, - catch_22_quote,QUOTE_512_BYTES ,0 ); - -/* create a pointer for digest, but don't expect anything to be written -* here in a NULL auth algo so no mbuf append done. -*/ - digest = rte_pktmbuf_mtod_offset(ut_params->ibuf, uint8_t *, -QUOTE_512_BYTES ); -/* prefill the memory pointed to by digest */ -memcpy (digest, orig_data,sizeof (orig_data)); - -/* Setup Cipher Parameters */ - ut_params->cipher_xform.type =RTE_CRYPTO_SYM_XFORM_CIPHER ; - ut_params->cipher_xform.next = &ut_params->auth_xform; - - ut_params->cipher_xform.cipher.algo =RTE_CRYPTO_CIPHER_NULL ; - ut_params->cipher_xform.cipher.op =RTE_CRYPTO_CIPHER_OP_ENCRYPT ; - -/* Setup HMAC Parameters */ - ut_params->auth_xform.type =RTE_CRYPTO_SYM_XFORM_AUTH ; - ut_params->auth_xform.next =NULL ; - - ut_params->auth_xform.auth.algo =RTE_CRYPTO_AUTH_NULL ; - ut_params->auth_xform.auth.op =RTE_CRYPTO_AUTH_OP_GENERATE ; - - ut_params->sess =rte_cryptodev_sym_session_create ( - ts_params->session_mpool); - -/* Create Crypto session*/ -rte_cryptodev_sym_session_init (ts_params->valid_devs[0 ], - ut_params->sess, &ut_params->cipher_xform, - ts_params->session_priv_mpool); -TEST_ASSERT_NOT_NULL (ut_params->sess,"Session creation failed" ); - -/* Generate Crypto op data structure */ - ut_params->op =rte_crypto_op_alloc (ts_params->op_mpool, -RTE_CRYPTO_OP_TYPE_SYMMETRIC ); -TEST_ASSERT_NOT_NULL (ut_params->op, -"Failed to allocate symmetric crypto operation struct" ); - -/* Set crypto operation data parameters */ -rte_crypto_op_attach_sym_session (ut_params->op, ut_params->sess); - -struct rte_crypto_sym_op *sym_op = ut_params->op->sym; - - sym_op->m_src = ut_params->ibuf; - - sym_op->cipher.data.offset =0 ; - sym_op->cipher.data.length =QUOTE_512_BYTES ; - - sym_op->auth.data.offset =0 ; - sym_op->auth.data.length =QUOTE_512_BYTES ; - sym_op->auth.digest.data = digest; - sym_op->auth.digest.phys_addr =rte_pktmbuf_iova_offset (ut_params->ibuf, -QUOTE_512_BYTES ); - -/* Process crypto operation */ - ut_params->op =process_crypto_request (ts_params->valid_devs[0 ], - ut_params->op); -TEST_ASSERT_NOT_NULL (ut_params->op,"no crypto operation returned" ); - -TEST_ASSERT_EQUAL (ut_params->op->status,RTE_CRYPTO_OP_STATUS_SUCCESS , -"crypto operation processing failed" ); - -/* Validate obuf */ -TEST_ASSERT_BUFFERS_ARE_EQUAL ( - rte_pktmbuf_mtod(ut_params->op->sym->m_src, uint8_t *), - catch_22_quote, -QUOTE_512_BYTES , -"Ciphertext data not as expected" ); -/* Make sure memory pointed to by digest hasn't been overwritten */ -TEST_ASSERT_BUFFERS_ARE_EQUAL ( - orig_data, - digest, -sizeof (orig_data), -"Memory at digest ptr overwritten unexpectedly" ); - -return TEST_SUCCESS ; -} - -static int -test_null_auth_cipher_operation (void ) -{ -struct crypto_testsuite_params *ts_params = &testsuite_params; -struct crypto_unittest_params *ut_params = &unittest_params; -uint8_t *digest; - -/* Verify the capabilities */ -struct rte_cryptodev_sym_capability_idx cap_idx; - cap_idx.type =RTE_CRYPTO_SYM_XFORM_AUTH ; - cap_idx.algo.auth =RTE_CRYPTO_AUTH_NULL ; -if (rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], - &cap_idx) ==NULL ) -return -ENOTSUP ; - cap_idx.type =RTE_CRYPTO_SYM_XFORM_CIPHER ; - cap_idx.algo.cipher =RTE_CRYPTO_CIPHER_NULL ; -if (rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], - &cap_idx) ==NULL ) -return -ENOTSUP ; - -/* Generate test mbuf data */ - ut_params->ibuf =setup_test_string (ts_params->mbuf_pool, - catch_22_quote,QUOTE_512_BYTES ,0 ); - -/* create a pointer for digest, but don't expect anything to be written -* here in a NULL auth algo so no mbuf append done. -*/ - digest = rte_pktmbuf_mtod_offset(ut_params->ibuf, uint8_t *, -QUOTE_512_BYTES ); -/* prefill the memory pointed to by digest */ -memcpy (digest, orig_data,sizeof (orig_data)); - -/* Setup Cipher Parameters */ - ut_params->cipher_xform.type =RTE_CRYPTO_SYM_XFORM_CIPHER ; - ut_params->cipher_xform.next =NULL ; - - ut_params->cipher_xform.cipher.algo =RTE_CRYPTO_CIPHER_NULL ; - ut_params->cipher_xform.cipher.op =RTE_CRYPTO_CIPHER_OP_ENCRYPT ; - -/* Setup HMAC Parameters */ - ut_params->auth_xform.type =RTE_CRYPTO_SYM_XFORM_AUTH ; - ut_params->auth_xform.next = &ut_params->cipher_xform; - - ut_params->auth_xform.auth.algo =RTE_CRYPTO_AUTH_NULL ; - ut_params->auth_xform.auth.op =RTE_CRYPTO_AUTH_OP_GENERATE ; - - ut_params->sess =rte_cryptodev_sym_session_create ( - ts_params->session_mpool); - -/* Create Crypto session*/ -rte_cryptodev_sym_session_init (ts_params->valid_devs[0 ], - ut_params->sess, &ut_params->cipher_xform, - ts_params->session_priv_mpool); -TEST_ASSERT_NOT_NULL (ut_params->sess,"Session creation failed" ); - -/* Generate Crypto op data structure */ - ut_params->op =rte_crypto_op_alloc (ts_params->op_mpool, -RTE_CRYPTO_OP_TYPE_SYMMETRIC ); -TEST_ASSERT_NOT_NULL (ut_params->op, -"Failed to allocate symmetric crypto operation struct" ); - -/* Set crypto operation data parameters */ -rte_crypto_op_attach_sym_session (ut_params->op, ut_params->sess); - -struct rte_crypto_sym_op *sym_op = ut_params->op->sym; - - sym_op->m_src = ut_params->ibuf; - - sym_op->cipher.data.offset =0 ; - sym_op->cipher.data.length =QUOTE_512_BYTES ; - - sym_op->auth.data.offset =0 ; - sym_op->auth.data.length =QUOTE_512_BYTES ; - sym_op->auth.digest.data = digest; - sym_op->auth.digest.phys_addr =rte_pktmbuf_iova_offset (ut_params->ibuf, -QUOTE_512_BYTES ); - -/* Process crypto operation */ - ut_params->op =process_crypto_request (ts_params->valid_devs[0 ], - ut_params->op); -TEST_ASSERT_NOT_NULL (ut_params->op,"no crypto operation returned" ); - -TEST_ASSERT_EQUAL (ut_params->op->status,RTE_CRYPTO_OP_STATUS_SUCCESS , -"crypto operation processing failed" ); - -/* Validate obuf */ -TEST_ASSERT_BUFFERS_ARE_EQUAL ( - rte_pktmbuf_mtod(ut_params->op->sym->m_src, uint8_t *), - catch_22_quote, -QUOTE_512_BYTES , -"Ciphertext data not as expected" ); -/* Make sure memory pointed to by digest hasn't been overwritten */ -TEST_ASSERT_BUFFERS_ARE_EQUAL ( - orig_data, - digest, -sizeof (orig_data), -"Memory at digest ptr overwritten unexpectedly" ); - -return TEST_SUCCESS ; -} -static int test_null_invalid_operation (void )
@@ -12451,213 +12100,6 @@ struct test_crypto_vector { } }; -static struct unit_test_suite cryptodev_octeontx_testsuite = { - .suite_name ="Crypto Device OCTEONTX Unit Test Suite" , - .setup = testsuite_setup, - .teardown = testsuite_teardown, - .unit_test_cases = { -TEST_CASE_ST (ut_setup, ut_teardown, test_AES_chain_all), -TEST_CASE_ST (ut_setup, ut_teardown, test_AES_cipheronly_all), -TEST_CASE_ST (ut_setup, ut_teardown, test_3DES_chain_all), -TEST_CASE_ST (ut_setup, ut_teardown, test_3DES_cipheronly_all), -TEST_CASE_ST (ut_setup, ut_teardown, test_authonly_all), - -/** AES GCM Authenticated Encryption */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_6), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_7), - -/** AES GCM Authenticated Decryption */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_6), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_7), -/** AES GMAC Authentication */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_verify_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_verify_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_verify_test_case_3), - -/** SNOW 3G encrypt only (UEA2) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_5), - -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1_oop), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_1_oop), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1_oop_sgl), - -/** SNOW 3G decrypt only (UEA2) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_5), - -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_3), - -/** ZUC encrypt only (EEA3) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_6_sgl), - -/** KASUMI encrypt only (UEA1) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1_sgl), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1_oop_sgl), -/** KASUMI decrypt only (UEA1) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_5), - -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1_oop), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_1_oop), - -/** KASUMI hash only (UIA1) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_6), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_5), - -/** NULL tests */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_null_cipher_only_operation), -TEST_CASE_ST (ut_setup, ut_teardown, - test_null_auth_only_operation), -TEST_CASE_ST (ut_setup, ut_teardown, - test_null_cipher_auth_operation), -TEST_CASE_ST (ut_setup, ut_teardown, - test_null_auth_cipher_operation), - -/** Negative tests */ -TEST_CASE_ST (ut_setup, ut_teardown, - authentication_verify_HMAC_SHA1_fail_data_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - authentication_verify_HMAC_SHA1_fail_tag_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - authentication_verify_AES128_GMAC_fail_data_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - authentication_verify_AES128_GMAC_fail_tag_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - auth_decryption_AES128CBC_HMAC_SHA1_fail_data_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt), -TEST_CASES_END ()/**< NULL terminate unit test array */ - } -}; -static struct unit_test_suite cryptodev_nitrox_testsuite = { .suite_name ="Crypto NITROX Unit Test Suite" , .setup = testsuite_setup,
@@ -12674,213 +12116,6 @@ struct test_crypto_vector { } }; -static struct unit_test_suite cryptodev_octeontx2_testsuite = { - .suite_name ="Crypto Device OCTEON TX2 Unit Test Suite" , - .setup = testsuite_setup, - .teardown = testsuite_teardown, - .unit_test_cases = { -TEST_CASE_ST (ut_setup, ut_teardown, test_AES_chain_all), -TEST_CASE_ST (ut_setup, ut_teardown, test_AES_cipheronly_all), -TEST_CASE_ST (ut_setup, ut_teardown, test_3DES_chain_all), -TEST_CASE_ST (ut_setup, ut_teardown, test_3DES_cipheronly_all), -TEST_CASE_ST (ut_setup, ut_teardown, test_authonly_all), - -/** AES GCM Authenticated Encryption */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_6), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_7), - -/** AES GCM Authenticated Decryption */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_6), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_7), -/** AES GMAC Authentication */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_verify_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_verify_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_verify_test_case_3), - -/** SNOW 3G encrypt only (UEA2) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_5), - -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1_oop), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_1_oop), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1_oop_sgl), - -/** SNOW 3G decrypt only (UEA2) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_5), - -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_3), - -/** ZUC encrypt only (EEA3) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_6_sgl), - -/** KASUMI encrypt only (UEA1) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1_sgl), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1_oop_sgl), -/** KASUMI decrypt only (UEA1) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_5), - -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1_oop), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_1_oop), - -/** KASUMI hash only (UIA1) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_6), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_5), - -/** NULL tests */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_null_cipher_only_operation), -TEST_CASE_ST (ut_setup, ut_teardown, - test_null_auth_only_operation), -TEST_CASE_ST (ut_setup, ut_teardown, - test_null_cipher_auth_operation), -TEST_CASE_ST (ut_setup, ut_teardown, - test_null_auth_cipher_operation), - -/** Negative tests */ -TEST_CASE_ST (ut_setup, ut_teardown, - authentication_verify_HMAC_SHA1_fail_data_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - authentication_verify_HMAC_SHA1_fail_tag_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - authentication_verify_AES128_GMAC_fail_data_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - authentication_verify_AES128_GMAC_fail_tag_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - auth_decryption_AES128CBC_HMAC_SHA1_fail_data_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt), -TEST_CASES_END ()/**< NULL terminate unit test array */ - } -}; -static int test_cryptodev_qat (void /*argv __rte_unused, int argc __rte_unused*/ ) {
@@ -13191,7 +12426,7 @@ struct test_crypto_vector { "testsuite.\n");return TEST_FAILED ; } -return unit_test_suite_runner (&cryptodev_octeontx_testsuite); +return unit_test_suite_runner (&cryptodev_testsuite); } static int
@@ -13206,7 +12441,7 @@ struct test_crypto_vector { "testsuite.\n");return TEST_FAILED ; } -return unit_test_suite_runner (&cryptodev_octeontx2_testsuite); +return unit_test_suite_runner (&cryptodev_testsuite); } static int
Signature · 1 line
1.9.3
Re: [dpdk-dev] [PATCH 7/7] test/crypto: use generic cryptotests for OCTEON TX PMDs
Hi Anoob/Ankur,
Quoted 4 lines
From: Anoob Joseph <[email protected]>
This patch enables the generic crypto tests for OCTEON TX PMDs. Reomves the PMD specific tests.
Spell check.
Quoted 7 lines
Signed-off-by Ankur Dwivedi <[email protected]>Signed-off-by Anoob Joseph <[email protected]>--- app/test/test_cryptodev.c | 769 +--------------------------------------------- 1 file changed, 2 insertions(+), 767 deletions(-)
Please split this patch into two patches. When I try to apply this patch, The contents of this patch gets changed. I believe a lot of similar lines of Code make git confused and it jumble up the code.
So probably, you can remove the PMD specific cases in one patch and Testsuite in the other one.
Rename the title of the patch as test/crypto: use generic testsuite for OCTEON TX/TX2
Re: [dpdk-dev] [PATCH 1/7] common/cpt: fix encryption offset
In reply to Ankur DwivediQuoted 7 lines
In case of gmac auth the encryption offset should be set to zero.
Fixes b74652f3a91f ("common/cpt: add microcode interface for encryption")Fixes 177b41ceee61 ("common/cpt: add microcode interface for decryption")Signed-off-by Ankur Dwivedi <[email protected]>
I believe this should be backported to stable as well.
Re: [dpdk-dev] [PATCH 5/7] crypto/octeontx: remove unsupported feature
In reply to Ankur DwivediHi,
Quoted 10 lines
Subject: [PATCH 5/7]
crypto/octeontx: remove unsupported featureFor SNOW and ZUC algos the offset value for enryption and decryption is converted to bytes. Hence
RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATAfeature is not supported by the octeontx crypto pmd.Fixes 32b8f26adf8b ("crypto/octeontx: enable non-byte aligned data")Signed-off-by Ankur Dwivedi <[email protected]>---
This patch is actually reverting the original patch. So probably you should create a revert commit And also cc stable.
Same comment for 6/7 patch.
Re: [dpdk-dev] [PATCH 7/7] test/crypto: use generic cryptotests for OCTEON TX PMDs
In reply to Akhil GoyalHi Akhil,
Please see my response inline.
Thanks
Ankur
Quoted 10 lines
-----Original Message-----
From: Akhil Goyal <[email protected]>
Sent: Thursday, July 2, 2020 1:53 AM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; Anoob Joseph <[email protected]>
Subject: [EXT] RE: [PATCH 7/7] test/crypto: use generic cryptotests for OCTEON TX PMDsExternal Email
Quoted 8 lines
----------------------------------------------------------------------
Hi Anoob/Ankur,Quoted 4 lines
From: Anoob Joseph <[email protected]>
This patch enables the generic crypto tests for OCTEON TX PMDs. Reomves the PMD specific tests.
Spell check.
[Ankur] Will address this in v2.
Quoted 10 lines
Quoted 9 lines
Signed-off-by Ankur Dwivedi <[email protected]>Signed-off-by Anoob Joseph <[email protected]>--- app/test/test_cryptodev.c | 769 +--------------------------------------------- 1 file changed, 2 insertions(+), 767 deletions(-)
Quoted 5 lines
Please split this patch into two patches. When I try to apply this patch, The contents of this patch gets changed. I believe a lot of similar lines of Code make git confused and it jumble up the code.
So probably, you can remove the PMD specific cases in one patch and Testsuite in the other one.
[Ankur] Will address this in v2.
Quoted 3 lines
Rename the title of the patch as test/crypto: use generic testsuite for OCTEON TX/TX2
[Ankur] Will address this in v2.
Re: [dpdk-dev] [PATCH 1/7] common/cpt: fix encryption offset
In reply to Akhil GoyalHi Akhil,
Please see my response inline.
Thanks
Ankur
Quoted 13 lines
-----Original Message-----
From: Akhil Goyal <[email protected]>
Sent: Thursday, July 2, 2020 1:54 AM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; Anoob Joseph <[email protected]>
Subject: [EXT] RE: [PATCH 1/7] common/cpt: fix encryption offsetExternal Email
----------------------------------------------------------------------
Quoted 3 lines
In case of gmac auth the encryption offset should be set to zero.
Quoted 7 lines
Quoted 1 line
Fixes b74652f3a91f ("common/cpt: add microcode interface forencryption")
Quoted 1 line
Fixes 177b41ceee61 ("common/cpt: add microcode interface fordecryption")
Quoted 2 lines
Signed-off-by Ankur Dwivedi <[email protected]>I believe this should be backported to stable as well.
[Ankur] Will address this in v2.
Re: [dpdk-dev] [PATCH 5/7] crypto/octeontx: remove unsupported feature
In reply to Akhil GoyalHi Akhil,
Please see my response inline.
Thanks
Ankur
Quoted 19 lines
-----Original Message-----
From: Akhil Goyal <[email protected]>
Sent: Thursday, July 2, 2020 1:57 AM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; Anoob Joseph <[email protected]>
Subject: [EXT] RE: [PATCH 5/7]crypto/octeontx: remove unsupported featureExternal Email
----------------------------------------------------------------------
Hi,Quoted 4 lines
Subject: [PATCH 5/7]
crypto/octeontx: remove unsupported featureFor SNOW and ZUC algos the offset value for enryption and decryption is converted to bytes. Hence
RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATAQuoted 2 lines
feature is not supported by the octeontx crypto pmd.
Quoted 8 lines
Quoted 4 lines
Fixes 32b8f26adf8b ("crypto/octeontx: enable non-byte aligned data")Signed-off-by Ankur Dwivedi <[email protected]>---
This patch is actually reverting the original patch.
So probably you should create a revert commit And also cc stable.Same comment for 6/7 patch.
[Ankur] Will address these in v2.
PATCH v2 1/8 common/cpt: fix encryption offset
In reply to Ankur DwivediIn case of gmac auth the encryption offset should be set to zero.
--- drivers/common/cpt/cpt_ucode.h | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-)
drivers/common/cpt/cpt_ucode.h +10 -14
@@ -682,9 +682,6 @@ m_vaddr = (uint8_t *)m_vaddr + size; m_dma += size; -if (hash_type ==GMAC_TYPE ) - encr_data_len =0 ; -if (unlikely (!(flags &VALID_IV_BUF ))) { iv_len =0 ; iv_offset =ENCR_IV_OFFSET (d_offs);
@@ -716,6 +713,11 @@ opcode.s.major =CPT_MAJOR_OP_FC ; opcode.s.minor =0 ; +if (hash_type ==GMAC_TYPE ) { + encr_offset =0 ; + encr_data_len =0 ; + } + auth_dlen = auth_offset + auth_data_len; enc_dlen = encr_data_len + encr_offset;if (unlikely (encr_data_len &0xf )) {
@@ -726,11 +728,6 @@ enc_dlen =ROUNDUP16 (encr_data_len) + encr_offset; } -if (unlikely (hash_type ==GMAC_TYPE )) { - encr_offset = auth_dlen; - enc_dlen =0 ; - } -if (unlikely (auth_dlen > enc_dlen)) { inputlen = auth_dlen; outputlen = auth_dlen + mac_len;
@@ -1033,9 +1030,6 @@ hash_type = cpt_ctx->hash_type; mac_len = cpt_ctx->mac_len; -if (hash_type ==GMAC_TYPE ) - encr_data_len =0 ; -if (unlikely (!(flags &VALID_IV_BUF ))) { iv_len =0 ; iv_offset =ENCR_IV_OFFSET (d_offs);
@@ -1092,6 +1086,11 @@ opcode.s.major =CPT_MAJOR_OP_FC ; opcode.s.minor =1 ; +if (hash_type ==GMAC_TYPE ) { + encr_offset =0 ; + encr_data_len =0 ; + } + enc_dlen = encr_offset + encr_data_len; auth_dlen = auth_offset + auth_data_len;
@@ -1103,9 +1102,6 @@ outputlen = enc_dlen; } -if (hash_type ==GMAC_TYPE ) - encr_offset = inputlen; - vq_cmd_w0.u64 =0 ; vq_cmd_w0.s.param1 = encr_data_len; vq_cmd_w0.s.param2 = auth_data_len;
Signature · 1 line
1.9.3
PATCH v2 2/8 crypto/octeontx: remove stats callback
The stats get and reset functions for octeontx crypto PMD are unimplemented. So removing them.
--- drivers/crypto/octeontx/otx_cryptodev_ops.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-)
drivers/crypto/octeontx/otx_cryptodev_ops.c +2 -15
@@ -127,19 +127,6 @@ } } -static void -otx_cpt_stats_get(struct rte_cryptodev *dev __rte_unused, - struct rte_cryptodev_stats *stats __rte_unused) -{ -CPT_PMD_INIT_FUNC_TRACE (); -} - -static void -otx_cpt_stats_reset(struct rte_cryptodev *dev __rte_unused) -{ -CPT_PMD_INIT_FUNC_TRACE (); -} - static int otx_cpt_que_pair_setup(struct rte_cryptodev *dev, uint16_t que_pair_id,
@@ -915,8 +902,8 @@ .dev_close = otx_cpt_dev_close, .dev_infos_get = otx_cpt_dev_info_get, - .stats_get = otx_cpt_stats_get, - .stats_reset = otx_cpt_stats_reset, + .stats_get = NULL, + .stats_reset = NULL, .queue_pair_setup = otx_cpt_que_pair_setup, .queue_pair_release = otx_cpt_que_pair_release,
Signature · 1 line
1.9.3
PATCH v2 3/8 crypto/octeontx: set session private data
In reply to Ankur DwivediThis patch sets the first 32 bytes of session private data to zero. This prevents garbage data to be used in code logic.
--- drivers/crypto/octeontx/otx_cryptodev_ops.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/crypto/octeontx/otx_cryptodev_ops.c +3 -0
@@ -252,6 +252,9 @@return -ENOMEM ; } +memset (priv,0 ,sizeof (struct cpt_sess_misc ) + + offsetof(struct cpt_ctx , fctx)); + misc = priv;for ( ; xform !=NULL ; xform = xform->next) {
Signature · 1 line
1.9.3
PATCH v2 4/8 crypto/octeontx2: set session private data
In reply to Ankur DwivediThis patch sets the first 32 bytes of session private data to zero. This prevents garbage data to be used in code logic.
--- drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/crypto/octeontx2/otx2_cryptodev_ops.c +3 -0
@@ -364,6 +364,9 @@return -ENOMEM ; } +memset (priv,0 ,sizeof (struct cpt_sess_misc ) + + offsetof(struct cpt_ctx , fctx)); + misc = priv;for ( ; xform !=NULL ; xform = xform->next) {
Signature · 1 line
1.9.3
PATCH v2 5/8 crypto/octeontx: revert non-byte aligned data feature
In reply to Ankur DwivediThis reverts commit 32b8f26adf8b26a55230408ff6adffd4b2327e52.
For SNOW and ZUC algos the offset value for enryption and decryption is converted to bytes. Hence RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA feature is not supported by the octeontx crypto pmd.
--- doc/guides/cryptodevs/features/octeontx.ini | 1 - drivers/crypto/octeontx/otx_cryptodev_ops.c | 1 - 2 files changed, 2 deletions(-)
doc/guides/cryptodevs/features/octeontx.ini +0 -1
@@ -13,7 +13,6 @@ OOP SGL In LB Out = Y OOP SGL In SGL Out = Y RSA PRIV OP KEY QT = Y Symmetric sessionless = Y -Non-Byte aligned data = Y ; ; Supported crypto algorithms of 'octeontx' crypto driver.
drivers/crypto/octeontx/otx_cryptodev_ops.c +0 -1
@@ -979,7 +979,6 @@RTE_CRYPTODEV_FF_IN_PLACE_SGL |RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT | -RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA |RTE_CRYPTODEV_FF_SYM_SESSIONLESS ;break ;default :
Signature · 1 line
1.9.3
PATCH v2 6/8 crypto/octeontx2: revert non-byte aligned data feature
In reply to Ankur DwivediThis reverts commit 51f3e107aca23a1cbc1a5ad9fdce7921340307b5.
For SNOW and ZUC algos the offset value for enryption and decryption is converted to bytes. Hence RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA feature is not supported by the octeontx2 crypto pmd.
--- doc/guides/cryptodevs/features/octeontx2.ini | 1 - drivers/crypto/octeontx2/otx2_cryptodev.c | 1 - 2 files changed, 2 deletions(-)
doc/guides/cryptodevs/features/octeontx2.ini +0 -1
@@ -13,7 +13,6 @@ OOP SGL In LB Out = Y OOP SGL In SGL Out = Y RSA PRIV OP KEY QT = Y Symmetric sessionless = Y -Non-Byte aligned data = Y ; ; Supported crypto algorithms of 'octeontx2' crypto driver.
drivers/crypto/octeontx2/otx2_cryptodev.c +0 -1
@@ -104,7 +104,6 @@RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO |RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT | -RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA |RTE_CRYPTODEV_FF_SYM_SESSIONLESS ;return 0 ;
Signature · 1 line
1.9.3
PATCH v2 7/8 test/crypto: remove PMD specific tests
In reply to Ankur DwivediFrom: Anoob Joseph <[email protected]>
This patch removes the OCTEON TX and OCTEON TX2 PMDs specific test cases related to null cipher.
--- app/test/test_cryptodev.c | 371 ---------------------------------------------- 1 file changed, 371 deletions(-)
app/test/test_cryptodev.c +0 -371
@@ -9247,361 +9247,10 @@ struct multi_session_params {return TEST_SUCCESS ; } -static int -test_null_cipher_only_operation (void ) -{ -struct crypto_testsuite_params *ts_params = &testsuite_params; -struct crypto_unittest_params *ut_params = &unittest_params; - -/* Verify the capabilities */ -struct rte_cryptodev_sym_capability_idx cap_idx; - cap_idx.type =RTE_CRYPTO_SYM_XFORM_CIPHER ; - cap_idx.algo.cipher =RTE_CRYPTO_CIPHER_NULL ; -if (rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], - &cap_idx) ==NULL ) -return -ENOTSUP ; - -/* Generate test mbuf data and space for digest */ - ut_params->ibuf =setup_test_string (ts_params->mbuf_pool, - catch_22_quote,QUOTE_512_BYTES ,0 ); - -/* Setup Cipher Parameters */ - ut_params->cipher_xform.type =RTE_CRYPTO_SYM_XFORM_CIPHER ; - ut_params->cipher_xform.next =NULL ; - - ut_params->cipher_xform.cipher.algo =RTE_CRYPTO_CIPHER_NULL ; - ut_params->cipher_xform.cipher.op =RTE_CRYPTO_CIPHER_OP_ENCRYPT ; - - ut_params->sess =rte_cryptodev_sym_session_create ( - ts_params->session_mpool); - -/* Create Crypto session*/ -rte_cryptodev_sym_session_init (ts_params->valid_devs[0 ], - ut_params->sess, - &ut_params->cipher_xform, - ts_params->session_priv_mpool); -TEST_ASSERT_NOT_NULL (ut_params->sess,"Session creation failed" ); - -/* Generate Crypto op data structure */ - ut_params->op =rte_crypto_op_alloc (ts_params->op_mpool, -RTE_CRYPTO_OP_TYPE_SYMMETRIC ); -TEST_ASSERT_NOT_NULL (ut_params->op, -"Failed to allocate symmetric crypto operation struct" ); - -/* Set crypto operation data parameters */ -rte_crypto_op_attach_sym_session (ut_params->op, ut_params->sess); - -struct rte_crypto_sym_op *sym_op = ut_params->op->sym; - -/* set crypto operation source mbuf */ - sym_op->m_src = ut_params->ibuf; - - sym_op->cipher.data.offset =0 ; - sym_op->cipher.data.length =QUOTE_512_BYTES ; - -/* Process crypto operation */ - ut_params->op =process_crypto_request (ts_params->valid_devs[0 ], - ut_params->op); -TEST_ASSERT_NOT_NULL (ut_params->op,"no crypto operation returned" ); - -TEST_ASSERT_EQUAL (ut_params->op->status,RTE_CRYPTO_OP_STATUS_SUCCESS , -"crypto operation processing failed" ); - -/* Validate obuf */ -TEST_ASSERT_BUFFERS_ARE_EQUAL ( - rte_pktmbuf_mtod(ut_params->op->sym->m_src, uint8_t *), - catch_22_quote, -QUOTE_512_BYTES , -"Ciphertext data not as expected" ); - -return TEST_SUCCESS ; -}uint8_t orig_data[] = {0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab ,0xab }; -static int -test_null_auth_only_operation (void ) -{ -struct crypto_testsuite_params *ts_params = &testsuite_params; -struct crypto_unittest_params *ut_params = &unittest_params; -uint8_t *digest; - -/* Verify the capabilities */ -struct rte_cryptodev_sym_capability_idx cap_idx; - cap_idx.type =RTE_CRYPTO_SYM_XFORM_AUTH ; - cap_idx.algo.auth =RTE_CRYPTO_AUTH_NULL ; -if (rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], - &cap_idx) ==NULL ) -return -ENOTSUP ; - -/* Generate test mbuf data and space for digest */ - ut_params->ibuf =setup_test_string (ts_params->mbuf_pool, - catch_22_quote,QUOTE_512_BYTES ,0 ); - -/* create a pointer for digest, but don't expect anything to be written -* here in a NULL auth algo so no mbuf append done. -*/ - digest = rte_pktmbuf_mtod_offset(ut_params->ibuf, uint8_t *, -QUOTE_512_BYTES ); -/* prefill the memory pointed to by digest */ -memcpy (digest, orig_data,sizeof (orig_data)); - -/* Setup HMAC Parameters */ - ut_params->auth_xform.type =RTE_CRYPTO_SYM_XFORM_AUTH ; - ut_params->auth_xform.next =NULL ; - - ut_params->auth_xform.auth.algo =RTE_CRYPTO_AUTH_NULL ; - ut_params->auth_xform.auth.op =RTE_CRYPTO_AUTH_OP_GENERATE ; - - ut_params->sess =rte_cryptodev_sym_session_create ( - ts_params->session_mpool); - -/* Create Crypto session*/ -rte_cryptodev_sym_session_init (ts_params->valid_devs[0 ], - ut_params->sess, &ut_params->auth_xform, - ts_params->session_priv_mpool); -TEST_ASSERT_NOT_NULL (ut_params->sess,"Session creation failed" ); - -/* Generate Crypto op data structure */ - ut_params->op =rte_crypto_op_alloc (ts_params->op_mpool, -RTE_CRYPTO_OP_TYPE_SYMMETRIC ); -TEST_ASSERT_NOT_NULL (ut_params->op, -"Failed to allocate symmetric crypto operation struct" ); - -/* Set crypto operation data parameters */ -rte_crypto_op_attach_sym_session (ut_params->op, ut_params->sess); - -struct rte_crypto_sym_op *sym_op = ut_params->op->sym; - - sym_op->m_src = ut_params->ibuf; - - sym_op->auth.data.offset =0 ; - sym_op->auth.data.length =QUOTE_512_BYTES ; - sym_op->auth.digest.data = digest; - sym_op->auth.digest.phys_addr =rte_pktmbuf_iova_offset (ut_params->ibuf, -QUOTE_512_BYTES ); - -/* Process crypto operation */ - ut_params->op =process_crypto_request (ts_params->valid_devs[0 ], - ut_params->op); -TEST_ASSERT_NOT_NULL (ut_params->op,"no crypto operation returned" ); - -TEST_ASSERT_EQUAL (ut_params->op->status,RTE_CRYPTO_OP_STATUS_SUCCESS , -"crypto operation processing failed" ); -/* Make sure memory pointed to by digest hasn't been overwritten */ -TEST_ASSERT_BUFFERS_ARE_EQUAL ( - orig_data, - digest, -sizeof (orig_data), -"Memory at digest ptr overwritten unexpectedly" ); - -return TEST_SUCCESS ; -} - - -static int -test_null_cipher_auth_operation (void ) -{ -struct crypto_testsuite_params *ts_params = &testsuite_params; -struct crypto_unittest_params *ut_params = &unittest_params; -uint8_t *digest; - -/* Verify the capabilities */ -struct rte_cryptodev_sym_capability_idx cap_idx; - cap_idx.type =RTE_CRYPTO_SYM_XFORM_AUTH ; - cap_idx.algo.auth =RTE_CRYPTO_AUTH_NULL ; -if (rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], - &cap_idx) ==NULL ) -return -ENOTSUP ; - cap_idx.type =RTE_CRYPTO_SYM_XFORM_CIPHER ; - cap_idx.algo.cipher =RTE_CRYPTO_CIPHER_NULL ; -if (rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], - &cap_idx) ==NULL ) -return -ENOTSUP ; - -/* Generate test mbuf data and space for digest */ - ut_params->ibuf =setup_test_string (ts_params->mbuf_pool, - catch_22_quote,QUOTE_512_BYTES ,0 ); - -/* create a pointer for digest, but don't expect anything to be written -* here in a NULL auth algo so no mbuf append done. -*/ - digest = rte_pktmbuf_mtod_offset(ut_params->ibuf, uint8_t *, -QUOTE_512_BYTES ); -/* prefill the memory pointed to by digest */ -memcpy (digest, orig_data,sizeof (orig_data)); - -/* Setup Cipher Parameters */ - ut_params->cipher_xform.type =RTE_CRYPTO_SYM_XFORM_CIPHER ; - ut_params->cipher_xform.next = &ut_params->auth_xform; - - ut_params->cipher_xform.cipher.algo =RTE_CRYPTO_CIPHER_NULL ; - ut_params->cipher_xform.cipher.op =RTE_CRYPTO_CIPHER_OP_ENCRYPT ; - -/* Setup HMAC Parameters */ - ut_params->auth_xform.type =RTE_CRYPTO_SYM_XFORM_AUTH ; - ut_params->auth_xform.next =NULL ; - - ut_params->auth_xform.auth.algo =RTE_CRYPTO_AUTH_NULL ; - ut_params->auth_xform.auth.op =RTE_CRYPTO_AUTH_OP_GENERATE ; - - ut_params->sess =rte_cryptodev_sym_session_create ( - ts_params->session_mpool); - -/* Create Crypto session*/ -rte_cryptodev_sym_session_init (ts_params->valid_devs[0 ], - ut_params->sess, &ut_params->cipher_xform, - ts_params->session_priv_mpool); -TEST_ASSERT_NOT_NULL (ut_params->sess,"Session creation failed" ); - -/* Generate Crypto op data structure */ - ut_params->op =rte_crypto_op_alloc (ts_params->op_mpool, -RTE_CRYPTO_OP_TYPE_SYMMETRIC ); -TEST_ASSERT_NOT_NULL (ut_params->op, -"Failed to allocate symmetric crypto operation struct" ); - -/* Set crypto operation data parameters */ -rte_crypto_op_attach_sym_session (ut_params->op, ut_params->sess); - -struct rte_crypto_sym_op *sym_op = ut_params->op->sym; - - sym_op->m_src = ut_params->ibuf; - - sym_op->cipher.data.offset =0 ; - sym_op->cipher.data.length =QUOTE_512_BYTES ; - - sym_op->auth.data.offset =0 ; - sym_op->auth.data.length =QUOTE_512_BYTES ; - sym_op->auth.digest.data = digest; - sym_op->auth.digest.phys_addr =rte_pktmbuf_iova_offset (ut_params->ibuf, -QUOTE_512_BYTES ); - -/* Process crypto operation */ - ut_params->op =process_crypto_request (ts_params->valid_devs[0 ], - ut_params->op); -TEST_ASSERT_NOT_NULL (ut_params->op,"no crypto operation returned" ); - -TEST_ASSERT_EQUAL (ut_params->op->status,RTE_CRYPTO_OP_STATUS_SUCCESS , -"crypto operation processing failed" ); - -/* Validate obuf */ -TEST_ASSERT_BUFFERS_ARE_EQUAL ( - rte_pktmbuf_mtod(ut_params->op->sym->m_src, uint8_t *), - catch_22_quote, -QUOTE_512_BYTES , -"Ciphertext data not as expected" ); -/* Make sure memory pointed to by digest hasn't been overwritten */ -TEST_ASSERT_BUFFERS_ARE_EQUAL ( - orig_data, - digest, -sizeof (orig_data), -"Memory at digest ptr overwritten unexpectedly" ); - -return TEST_SUCCESS ; -} - -static int -test_null_auth_cipher_operation (void ) -{ -struct crypto_testsuite_params *ts_params = &testsuite_params; -struct crypto_unittest_params *ut_params = &unittest_params; -uint8_t *digest; - -/* Verify the capabilities */ -struct rte_cryptodev_sym_capability_idx cap_idx; - cap_idx.type =RTE_CRYPTO_SYM_XFORM_AUTH ; - cap_idx.algo.auth =RTE_CRYPTO_AUTH_NULL ; -if (rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], - &cap_idx) ==NULL ) -return -ENOTSUP ; - cap_idx.type =RTE_CRYPTO_SYM_XFORM_CIPHER ; - cap_idx.algo.cipher =RTE_CRYPTO_CIPHER_NULL ; -if (rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], - &cap_idx) ==NULL ) -return -ENOTSUP ; - -/* Generate test mbuf data */ - ut_params->ibuf =setup_test_string (ts_params->mbuf_pool, - catch_22_quote,QUOTE_512_BYTES ,0 ); - -/* create a pointer for digest, but don't expect anything to be written -* here in a NULL auth algo so no mbuf append done. -*/ - digest = rte_pktmbuf_mtod_offset(ut_params->ibuf, uint8_t *, -QUOTE_512_BYTES ); -/* prefill the memory pointed to by digest */ -memcpy (digest, orig_data,sizeof (orig_data)); - -/* Setup Cipher Parameters */ - ut_params->cipher_xform.type =RTE_CRYPTO_SYM_XFORM_CIPHER ; - ut_params->cipher_xform.next =NULL ; - - ut_params->cipher_xform.cipher.algo =RTE_CRYPTO_CIPHER_NULL ; - ut_params->cipher_xform.cipher.op =RTE_CRYPTO_CIPHER_OP_ENCRYPT ; - -/* Setup HMAC Parameters */ - ut_params->auth_xform.type =RTE_CRYPTO_SYM_XFORM_AUTH ; - ut_params->auth_xform.next = &ut_params->cipher_xform; - - ut_params->auth_xform.auth.algo =RTE_CRYPTO_AUTH_NULL ; - ut_params->auth_xform.auth.op =RTE_CRYPTO_AUTH_OP_GENERATE ; - - ut_params->sess =rte_cryptodev_sym_session_create ( - ts_params->session_mpool); - -/* Create Crypto session*/ -rte_cryptodev_sym_session_init (ts_params->valid_devs[0 ], - ut_params->sess, &ut_params->cipher_xform, - ts_params->session_priv_mpool); -TEST_ASSERT_NOT_NULL (ut_params->sess,"Session creation failed" ); - -/* Generate Crypto op data structure */ - ut_params->op =rte_crypto_op_alloc (ts_params->op_mpool, -RTE_CRYPTO_OP_TYPE_SYMMETRIC ); -TEST_ASSERT_NOT_NULL (ut_params->op, -"Failed to allocate symmetric crypto operation struct" ); - -/* Set crypto operation data parameters */ -rte_crypto_op_attach_sym_session (ut_params->op, ut_params->sess); - -struct rte_crypto_sym_op *sym_op = ut_params->op->sym; - - sym_op->m_src = ut_params->ibuf; - - sym_op->cipher.data.offset =0 ; - sym_op->cipher.data.length =QUOTE_512_BYTES ; - - sym_op->auth.data.offset =0 ; - sym_op->auth.data.length =QUOTE_512_BYTES ; - sym_op->auth.digest.data = digest; - sym_op->auth.digest.phys_addr =rte_pktmbuf_iova_offset (ut_params->ibuf, -QUOTE_512_BYTES ); - -/* Process crypto operation */ - ut_params->op =process_crypto_request (ts_params->valid_devs[0 ], - ut_params->op); -TEST_ASSERT_NOT_NULL (ut_params->op,"no crypto operation returned" ); - -TEST_ASSERT_EQUAL (ut_params->op->status,RTE_CRYPTO_OP_STATUS_SUCCESS , -"crypto operation processing failed" ); - -/* Validate obuf */ -TEST_ASSERT_BUFFERS_ARE_EQUAL ( - rte_pktmbuf_mtod(ut_params->op->sym->m_src, uint8_t *), - catch_22_quote, -QUOTE_512_BYTES , -"Ciphertext data not as expected" ); -/* Make sure memory pointed to by digest hasn't been overwritten */ -TEST_ASSERT_BUFFERS_ARE_EQUAL ( - orig_data, - digest, -sizeof (orig_data), -"Memory at digest ptr overwritten unexpectedly" ); - -return TEST_SUCCESS ; -} -static int test_null_invalid_operation (void )
@@ -12631,16 +12280,6 @@ struct test_crypto_vector {TEST_CASE_ST (ut_setup, ut_teardown, test_kasumi_hash_verify_test_case_5), -/** NULL tests */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_null_cipher_only_operation), -TEST_CASE_ST (ut_setup, ut_teardown, - test_null_auth_only_operation), -TEST_CASE_ST (ut_setup, ut_teardown, - test_null_cipher_auth_operation), -TEST_CASE_ST (ut_setup, ut_teardown, - test_null_auth_cipher_operation), -/** Negative tests */ TEST_CASE_ST (ut_setup, ut_teardown, authentication_verify_HMAC_SHA1_fail_data_corrupt),
@@ -12854,16 +12493,6 @@ struct test_crypto_vector {TEST_CASE_ST (ut_setup, ut_teardown, test_kasumi_hash_verify_test_case_5), -/** NULL tests */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_null_cipher_only_operation), -TEST_CASE_ST (ut_setup, ut_teardown, - test_null_auth_only_operation), -TEST_CASE_ST (ut_setup, ut_teardown, - test_null_cipher_auth_operation), -TEST_CASE_ST (ut_setup, ut_teardown, - test_null_auth_cipher_operation), -/** Negative tests */ TEST_CASE_ST (ut_setup, ut_teardown, authentication_verify_HMAC_SHA1_fail_data_corrupt),
Signature · 1 line
1.9.3
PATCH v2 8/8 test/crypto: use generic testsuite for OCTEON TX/TX2
In reply to Ankur DwivediFrom: Anoob Joseph <[email protected]>
This patch enables the generic crypto tests for OCTEON TX and OCTEON TX2 PMDs. Removes the PMD specific tests.
--- app/test/test_cryptodev.c | 398 +--------------------------------------------- 1 file changed, 2 insertions(+), 396 deletions(-)
app/test/test_cryptodev.c +2 -396
@@ -12100,203 +12100,6 @@ struct test_crypto_vector { } }; -static struct unit_test_suite cryptodev_octeontx_testsuite = { - .suite_name ="Crypto Device OCTEONTX Unit Test Suite" , - .setup = testsuite_setup, - .teardown = testsuite_teardown, - .unit_test_cases = { -TEST_CASE_ST (ut_setup, ut_teardown, test_AES_chain_all), -TEST_CASE_ST (ut_setup, ut_teardown, test_AES_cipheronly_all), -TEST_CASE_ST (ut_setup, ut_teardown, test_3DES_chain_all), -TEST_CASE_ST (ut_setup, ut_teardown, test_3DES_cipheronly_all), -TEST_CASE_ST (ut_setup, ut_teardown, test_authonly_all), - -/** AES GCM Authenticated Encryption */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_6), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_7), - -/** AES GCM Authenticated Decryption */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_6), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_7), -/** AES GMAC Authentication */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_verify_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_verify_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_verify_test_case_3), - -/** SNOW 3G encrypt only (UEA2) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_5), - -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1_oop), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_1_oop), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1_oop_sgl), - -/** SNOW 3G decrypt only (UEA2) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_5), - -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_3), - -/** ZUC encrypt only (EEA3) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_6_sgl), - -/** KASUMI encrypt only (UEA1) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1_sgl), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1_oop_sgl), -/** KASUMI decrypt only (UEA1) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_5), - -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1_oop), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_1_oop), - -/** KASUMI hash only (UIA1) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_6), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_5), - -/** Negative tests */ -TEST_CASE_ST (ut_setup, ut_teardown, - authentication_verify_HMAC_SHA1_fail_data_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - authentication_verify_HMAC_SHA1_fail_tag_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - authentication_verify_AES128_GMAC_fail_data_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - authentication_verify_AES128_GMAC_fail_tag_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - auth_decryption_AES128CBC_HMAC_SHA1_fail_data_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt), -TEST_CASES_END ()/**< NULL terminate unit test array */ - } -}; -static struct unit_test_suite cryptodev_nitrox_testsuite = { .suite_name ="Crypto NITROX Unit Test Suite" , .setup = testsuite_setup,
@@ -12313,203 +12116,6 @@ struct test_crypto_vector { } }; -static struct unit_test_suite cryptodev_octeontx2_testsuite = { - .suite_name ="Crypto Device OCTEON TX2 Unit Test Suite" , - .setup = testsuite_setup, - .teardown = testsuite_teardown, - .unit_test_cases = { -TEST_CASE_ST (ut_setup, ut_teardown, test_AES_chain_all), -TEST_CASE_ST (ut_setup, ut_teardown, test_AES_cipheronly_all), -TEST_CASE_ST (ut_setup, ut_teardown, test_3DES_chain_all), -TEST_CASE_ST (ut_setup, ut_teardown, test_3DES_cipheronly_all), -TEST_CASE_ST (ut_setup, ut_teardown, test_authonly_all), - -/** AES GCM Authenticated Encryption */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_6), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_encryption_test_case_7), - -/** AES GCM Authenticated Decryption */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_6), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GCM_authenticated_decryption_test_case_7), -/** AES GMAC Authentication */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_verify_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_verify_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_AES_GMAC_authentication_verify_test_case_3), - -/** SNOW 3G encrypt only (UEA2) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_5), - -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1_oop), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_1_oop), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_encryption_test_case_1_oop_sgl), - -/** SNOW 3G decrypt only (UEA2) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_decryption_test_case_5), - -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_generate_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_snow3g_hash_verify_test_case_3), - -/** ZUC encrypt only (EEA3) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_hash_generate_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_zuc_encryption_test_case_6_sgl), - -/** KASUMI encrypt only (UEA1) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1_sgl), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1_oop_sgl), -/** KASUMI decrypt only (UEA1) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_5), - -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_encryption_test_case_1_oop), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_decryption_test_case_1_oop), - -/** KASUMI hash only (UIA1) */ -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_5), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_generate_test_case_6), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_1), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_2), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_3), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_4), -TEST_CASE_ST (ut_setup, ut_teardown, - test_kasumi_hash_verify_test_case_5), - -/** Negative tests */ -TEST_CASE_ST (ut_setup, ut_teardown, - authentication_verify_HMAC_SHA1_fail_data_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - authentication_verify_HMAC_SHA1_fail_tag_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - authentication_verify_AES128_GMAC_fail_data_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - authentication_verify_AES128_GMAC_fail_tag_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - auth_decryption_AES128CBC_HMAC_SHA1_fail_data_corrupt), -TEST_CASE_ST (ut_setup, ut_teardown, - auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt), -TEST_CASES_END ()/**< NULL terminate unit test array */ - } -}; -static int test_cryptodev_qat (void /*argv __rte_unused, int argc __rte_unused*/ ) {
@@ -12820,7 +12426,7 @@ struct test_crypto_vector { "testsuite.\n");return TEST_FAILED ; } -return unit_test_suite_runner (&cryptodev_octeontx_testsuite); +return unit_test_suite_runner (&cryptodev_testsuite); } static int
@@ -12835,7 +12441,7 @@ struct test_crypto_vector { "testsuite.\n");return TEST_FAILED ; } -return unit_test_suite_runner (&cryptodev_octeontx2_testsuite); +return unit_test_suite_runner (&cryptodev_testsuite); } static int
Signature · 1 line
1.9.3
Re: [dpdk-dev] [PATCH v2 1/8] common/cpt: fix encryption offset
In reply to Ankur DwivediQuoted 8 lines
In case of gmac auth the encryption offset should be set to zero.
Fixes b74652f3a91f ("common/cpt: add microcode interface for encryption")Fixes 177b41ceee61 ("common/cpt: add microcode interface for decryption")Signed-off-by Ankur Dwivedi <[email protected]>---
Series applied to dpdk-next-crypto
Thanks.