From 6aef763816fd3561c4ba825a0322b3bff3ab9d37 Mon Sep 17 00:00:00 2001 From: Pablo de Lara Date: Wed, 21 Sep 2016 02:45:18 +0100 Subject: [PATCH] crypto: rename some SNOW 3G references SNOW 3G algorithm has all uppercase letters in its name and a space between SNOW and 3G, but some references of it had some lowercase letters or no space. Signed-off-by: Pablo de Lara Acked-by: Deepak Kumar Jain --- app/test/test_cryptodev.c | 74 +++++++++---------- app/test/test_cryptodev_perf.c | 2 +- doc/guides/cryptodevs/qat.rst | 8 +- doc/guides/cryptodevs/snow3g.rst | 4 +- .../crypto/qat/qat_adf/qat_algs_build_desc.c | 4 +- drivers/crypto/qat/qat_crypto.c | 10 +-- drivers/crypto/snow3g/rte_snow3g_pmd.c | 2 +- drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 6 +- examples/l2fwd-crypto/main.c | 4 +- lib/librte_cryptodev/rte_crypto_sym.h | 20 ++--- 10 files changed, 67 insertions(+), 67 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 18457c5519..024a9e0c04 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -212,7 +212,7 @@ testsuite_setup(void) } } - /* Create 2 Snow3G devices if required */ + /* Create 2 SNOW 3G devices if required */ if (gbl_cryptodev_type == RTE_CRYPTODEV_SNOW3G_PMD) { nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_SNOW3G_PMD); if (nb_devs < 2) { @@ -1093,7 +1093,7 @@ test_AES_qat_all(void) return TEST_SUCCESS; } -/* ***** Snow3G Tests ***** */ +/* ***** SNOW 3G Tests ***** */ static int create_snow3g_kasumi_hash_session(uint8_t dev_id, const uint8_t *key, const uint8_t key_len, @@ -1372,7 +1372,7 @@ create_snow3g_kasumi_hash_operation(const uint8_t *auth_tag, * The cryptodev API calls out - * - the array must be big enough to hold the AAD, plus any * space to round this up to the nearest multiple of the - * block size (8 bytes for KASUMI and 16 bytes for SNOW3G). + * block size (8 bytes for KASUMI and 16 bytes for SNOW 3G). */ if (algo == RTE_CRYPTO_AUTH_KASUMI_F9) aad_buffer_len = ALIGN_POW2_ROUNDUP(aad_len, 8); @@ -1473,7 +1473,7 @@ create_snow3g_kasumi_cipher_hash_operation(const uint8_t *auth_tag, * The cryptodev API calls out - * - the array must be big enough to hold the AAD, plus any * space to round this up to the nearest multiple of the - * block size (8 bytes for KASUMI and 16 bytes for SNOW3G). + * block size (8 bytes for KASUMI and 16 bytes for SNOW 3G). */ if (auth_algo == RTE_CRYPTO_AUTH_KASUMI_F9) aad_buffer_len = ALIGN_POW2_ROUNDUP(aad_len, 8); @@ -1619,7 +1619,7 @@ test_snow3g_authentication(const struct snow3g_hash_test_data *tdata) unsigned plaintext_len; uint8_t *plaintext; - /* Create SNOW3G session */ + /* Create SNOW 3G session */ retval = create_snow3g_kasumi_hash_session(ts_params->valid_devs[0], tdata->key.data, tdata->key.len, tdata->aad.len, tdata->digest.len, @@ -1642,7 +1642,7 @@ test_snow3g_authentication(const struct snow3g_hash_test_data *tdata) plaintext_pad_len); memcpy(plaintext, tdata->plaintext.data, plaintext_len); - /* Create SNOW3G operation */ + /* Create SNOW 3G operation */ retval = create_snow3g_kasumi_hash_operation(NULL, tdata->digest.len, tdata->aad.data, tdata->aad.len, plaintext_pad_len, RTE_CRYPTO_AUTH_OP_GENERATE, @@ -1664,7 +1664,7 @@ test_snow3g_authentication(const struct snow3g_hash_test_data *tdata) ut_params->digest, tdata->digest.data, DIGEST_BYTE_LENGTH_SNOW3G_UIA2, - "Snow3G Generated auth tag not as expected"); + "SNOW 3G Generated auth tag not as expected"); return 0; } @@ -1680,7 +1680,7 @@ test_snow3g_authentication_verify(const struct snow3g_hash_test_data *tdata) unsigned plaintext_len; uint8_t *plaintext; - /* Create SNOW3G session */ + /* Create SNOW 3G session */ retval = create_snow3g_kasumi_hash_session(ts_params->valid_devs[0], tdata->key.data, tdata->key.len, tdata->aad.len, tdata->digest.len, @@ -1702,7 +1702,7 @@ test_snow3g_authentication_verify(const struct snow3g_hash_test_data *tdata) plaintext_pad_len); memcpy(plaintext, tdata->plaintext.data, plaintext_len); - /* Create SNOW3G operation */ + /* Create SNOW 3G operation */ retval = create_snow3g_kasumi_hash_operation(tdata->digest.data, tdata->digest.len, tdata->aad.data, tdata->aad.len, @@ -2269,7 +2269,7 @@ test_snow3g_encryption(const struct snow3g_test_data *tdata) unsigned plaintext_pad_len; unsigned plaintext_len; - /* Create SNOW3G session */ + /* Create SNOW 3G session */ retval = create_snow3g_kasumi_cipher_session(ts_params->valid_devs[0], RTE_CRYPTO_CIPHER_OP_ENCRYPT, RTE_CRYPTO_CIPHER_SNOW3G_UEA2, @@ -2293,7 +2293,7 @@ test_snow3g_encryption(const struct snow3g_test_data *tdata) TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len); - /* Create SNOW3G operation */ + /* Create SNOW 3G operation */ retval = create_snow3g_kasumi_cipher_operation(tdata->iv.data, tdata->iv.len, tdata->validCipherLenInBits.len, tdata->validCipherOffsetLenInBits.len, @@ -2319,7 +2319,7 @@ test_snow3g_encryption(const struct snow3g_test_data *tdata) ciphertext, tdata->ciphertext.data, tdata->validDataLenInBits.len, - "Snow3G Ciphertext data not as expected"); + "SNOW 3G Ciphertext data not as expected"); return 0; } @@ -2335,7 +2335,7 @@ test_snow3g_encryption_oop(const struct snow3g_test_data *tdata) unsigned plaintext_pad_len; unsigned plaintext_len; - /* Create SNOW3G session */ + /* Create SNOW 3G session */ retval = create_snow3g_kasumi_cipher_session(ts_params->valid_devs[0], RTE_CRYPTO_CIPHER_OP_ENCRYPT, RTE_CRYPTO_CIPHER_SNOW3G_UEA2, @@ -2366,7 +2366,7 @@ test_snow3g_encryption_oop(const struct snow3g_test_data *tdata) TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len); - /* Create SNOW3G operation */ + /* Create SNOW 3G operation */ retval = create_snow3g_kasumi_cipher_operation_oop(tdata->iv.data, tdata->iv.len, tdata->validCipherLenInBits.len, @@ -2393,7 +2393,7 @@ test_snow3g_encryption_oop(const struct snow3g_test_data *tdata) ciphertext, tdata->ciphertext.data, tdata->validDataLenInBits.len, - "Snow3G Ciphertext data not as expected"); + "SNOW 3G Ciphertext data not as expected"); return 0; } @@ -2429,7 +2429,7 @@ test_snow3g_encryption_offset_oop(const struct snow3g_test_data *tdata) uint8_t extra_offset = 4; uint8_t *expected_ciphertext_shifted; - /* Create SNOW3G session */ + /* Create SNOW 3G session */ retval = create_snow3g_kasumi_cipher_session(ts_params->valid_devs[0], RTE_CRYPTO_CIPHER_OP_ENCRYPT, RTE_CRYPTO_CIPHER_SNOW3G_UEA2, @@ -2467,7 +2467,7 @@ test_snow3g_encryption_offset_oop(const struct snow3g_test_data *tdata) #ifdef RTE_APP_TEST_DEBUG rte_hexdump(stdout, "plaintext:", plaintext, tdata->plaintext.len); #endif - /* Create SNOW3G operation */ + /* Create SNOW 3G operation */ retval = create_snow3g_kasumi_cipher_operation_oop(tdata->iv.data, tdata->iv.len, tdata->validCipherLenInBits.len, @@ -2508,7 +2508,7 @@ test_snow3g_encryption_offset_oop(const struct snow3g_test_data *tdata) expected_ciphertext_shifted, tdata->validDataLenInBits.len, extra_offset, - "Snow3G Ciphertext data not as expected"); + "SNOW 3G Ciphertext data not as expected"); return 0; } @@ -2523,7 +2523,7 @@ static int test_snow3g_decryption(const struct snow3g_test_data *tdata) unsigned ciphertext_pad_len; unsigned ciphertext_len; - /* Create SNOW3G session */ + /* Create SNOW 3G session */ retval = create_snow3g_kasumi_cipher_session(ts_params->valid_devs[0], RTE_CRYPTO_CIPHER_OP_DECRYPT, RTE_CRYPTO_CIPHER_SNOW3G_UEA2, @@ -2547,7 +2547,7 @@ static int test_snow3g_decryption(const struct snow3g_test_data *tdata) TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, ciphertext_len); - /* Create SNOW3G operation */ + /* Create SNOW 3G operation */ retval = create_snow3g_kasumi_cipher_operation(tdata->iv.data, tdata->iv.len, tdata->validCipherLenInBits.len, tdata->validCipherOffsetLenInBits.len, @@ -2571,7 +2571,7 @@ static int test_snow3g_decryption(const struct snow3g_test_data *tdata) TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(plaintext, tdata->plaintext.data, tdata->validDataLenInBits.len, - "Snow3G Plaintext data not as expected"); + "SNOW 3G Plaintext data not as expected"); return 0; } @@ -2586,7 +2586,7 @@ static int test_snow3g_decryption_oop(const struct snow3g_test_data *tdata) unsigned ciphertext_pad_len; unsigned ciphertext_len; - /* Create SNOW3G session */ + /* Create SNOW 3G session */ retval = create_snow3g_kasumi_cipher_session(ts_params->valid_devs[0], RTE_CRYPTO_CIPHER_OP_DECRYPT, RTE_CRYPTO_CIPHER_SNOW3G_UEA2, @@ -2620,7 +2620,7 @@ static int test_snow3g_decryption_oop(const struct snow3g_test_data *tdata) TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, ciphertext_len); - /* Create SNOW3G operation */ + /* Create SNOW 3G operation */ retval = create_snow3g_kasumi_cipher_operation_oop(tdata->iv.data, tdata->iv.len, tdata->validCipherLenInBits.len, @@ -2645,7 +2645,7 @@ static int test_snow3g_decryption_oop(const struct snow3g_test_data *tdata) TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(plaintext, tdata->plaintext.data, tdata->validDataLenInBits.len, - "Snow3G Plaintext data not as expected"); + "SNOW 3G Plaintext data not as expected"); return 0; } @@ -2661,7 +2661,7 @@ test_snow3g_cipher_auth(const struct snow3g_test_data *tdata) unsigned plaintext_pad_len; unsigned plaintext_len; - /* Create SNOW3G session */ + /* Create SNOW 3G session */ retval = create_snow3g_kasumi_cipher_auth_session(ts_params->valid_devs[0], RTE_CRYPTO_CIPHER_OP_ENCRYPT, RTE_CRYPTO_AUTH_OP_GENERATE, @@ -2687,7 +2687,7 @@ test_snow3g_cipher_auth(const struct snow3g_test_data *tdata) TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len); - /* Create SNOW3G operation */ + /* Create SNOW 3G operation */ retval = create_snow3g_kasumi_cipher_hash_operation(tdata->digest.data, tdata->digest.len, tdata->aad.data, tdata->aad.len, /*tdata->plaintext.len,*/ @@ -2719,7 +2719,7 @@ test_snow3g_cipher_auth(const struct snow3g_test_data *tdata) ciphertext, tdata->ciphertext.data, tdata->validDataLenInBits.len, - "Snow3G Ciphertext data not as expected"); + "SNOW 3G Ciphertext data not as expected"); ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *) + plaintext_pad_len + tdata->aad.len + tdata->iv.len; @@ -2729,7 +2729,7 @@ test_snow3g_cipher_auth(const struct snow3g_test_data *tdata) ut_params->digest, tdata->digest.data, DIGEST_BYTE_LENGTH_SNOW3G_UIA2, - "Snow3G Generated auth tag not as expected"); + "SNOW 3G Generated auth tag not as expected"); return 0; } static int @@ -2744,7 +2744,7 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata) unsigned plaintext_pad_len; unsigned plaintext_len; - /* Create SNOW3G session */ + /* Create SNOW 3G session */ retval = create_snow3g_kasumi_auth_cipher_session(ts_params->valid_devs[0], RTE_CRYPTO_CIPHER_OP_ENCRYPT, RTE_CRYPTO_AUTH_OP_GENERATE, @@ -2771,7 +2771,7 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata) TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len); - /* Create SNOW3G operation */ + /* Create SNOW 3G operation */ retval = create_snow3g_kasumi_auth_cipher_operation( tdata->digest.len, tdata->iv.data, tdata->iv.len, @@ -2807,14 +2807,14 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata) ciphertext, tdata->ciphertext.data, tdata->validDataLenInBits.len, - "Snow3G Ciphertext data not as expected"); + "SNOW 3G Ciphertext data not as expected"); /* Validate obuf */ TEST_ASSERT_BUFFERS_ARE_EQUAL( ut_params->digest, tdata->digest.data, DIGEST_BYTE_LENGTH_SNOW3G_UIA2, - "Snow3G Generated auth tag not as expected"); + "SNOW 3G Generated auth tag not as expected"); return 0; } @@ -4517,7 +4517,7 @@ static struct unit_test_suite cryptodev_qat_testsuite = { TEST_CASE_ST(ut_setup, ut_teardown, test_AES_GMAC_authentication_verify_test_case_3), - /** Snow3G encrypt only (UEA2) */ + /** 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, @@ -4534,7 +4534,7 @@ static struct unit_test_suite cryptodev_qat_testsuite = { TEST_CASE_ST(ut_setup, ut_teardown, test_snow3g_decryption_test_case_1_oop), - /** Snow3G decrypt only (UEA2) */ + /** 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, @@ -4715,11 +4715,11 @@ static struct unit_test_suite cryptodev_sw_kasumi_testsuite = { } }; static struct unit_test_suite cryptodev_sw_snow3g_testsuite = { - .suite_name = "Crypto Device SW Snow3G Unit Test Suite", + .suite_name = "Crypto Device SW SNOW 3G Unit Test Suite", .setup = testsuite_setup, .teardown = testsuite_teardown, .unit_test_cases = { - /** Snow3G encrypt only (UEA2) */ + /** 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, @@ -4739,7 +4739,7 @@ static struct unit_test_suite cryptodev_sw_snow3g_testsuite = { TEST_CASE_ST(ut_setup, ut_teardown, test_snow3g_encryption_test_case_1_offset_oop), - /** Snow3G decrypt only (UEA2) */ + /** 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, diff --git a/app/test/test_cryptodev_perf.c b/app/test/test_cryptodev_perf.c index 2398d84426..20713d49b6 100644 --- a/app/test/test_cryptodev_perf.c +++ b/app/test/test_cryptodev_perf.c @@ -2875,7 +2875,7 @@ static struct unit_test_suite cryptodev_aes_testsuite = { }; static struct unit_test_suite cryptodev_snow3g_testsuite = { - .suite_name = "Crypto Device Snow3G Unit Test Suite", + .suite_name = "Crypto Device SNOW3G Unit Test Suite", .setup = testsuite_setup, .teardown = testsuite_teardown, .unit_test_cases = { diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst index a8f9074f53..483433f86f 100644 --- a/doc/guides/cryptodevs/qat.rst +++ b/doc/guides/cryptodevs/qat.rst @@ -72,12 +72,12 @@ Limitations ----------- * Chained mbufs are not supported. -* Hash only is not supported except Snow3G UIA2 and KASUMI F9. -* Cipher only is not supported except Snow3G UEA2 and KASUMI F8. +* Hash only is not supported except SNOW 3G UIA2 and KASUMI F9. +* Cipher only is not supported except SNOW 3G UEA2 and KASUMI F8. * Only supports the session-oriented API implementation (session-less APIs are not supported). * Not performance tuned. -* Snow3g(UEA2) and KASUMI(F8) supported only if cipher length, cipher offset fields are byte-aligned. -* Snow3g(UIA2) and KASUMI(F9) supported only if hash length, hash offset fields are byte-aligned. +* SNOW 3G (UEA2) and KASUMI (F8) supported only if cipher length, cipher offset fields are byte-aligned. +* SNOW 3G (UIA2) and KASUMI (F9) supported only if hash length, hash offset fields are byte-aligned. * No BSD support as BSD QAT kernel driver not available. diff --git a/doc/guides/cryptodevs/snow3g.rst b/doc/guides/cryptodevs/snow3g.rst index 4f71c3ac65..f6eb538a7b 100644 --- a/doc/guides/cryptodevs/snow3g.rst +++ b/doc/guides/cryptodevs/snow3g.rst @@ -51,8 +51,8 @@ Limitations ----------- * Chained mbufs are not supported. -* Snow3g(UIA2) supported only if hash offset field is byte-aligned. -* In-place bit-level operations for Snow3g(UEA2) are not supported +* SNOW 3G (UIA2) supported only if hash offset field is byte-aligned. +* In-place bit-level operations for SNOW 3G (UEA2) are not supported (if length and/or offset of data to be ciphered is not byte-aligned). Installation diff --git a/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c b/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c index 198b551254..66beaba46c 100644 --- a/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c +++ b/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c @@ -454,7 +454,7 @@ int qat_alg_aead_session_create_content_desc_cipher(struct qat_session *cdesc, struct icp_qat_fw_auth_cd_ctrl_hdr *hash_cd_ctrl = ptr; enum icp_qat_hw_cipher_convert key_convert; uint32_t total_key_size; - uint16_t proto = ICP_QAT_FW_LA_NO_PROTO; /* no CCM/GCM/Snow3G */ + uint16_t proto = ICP_QAT_FW_LA_NO_PROTO; /* no CCM/GCM/SNOW 3G */ uint16_t cipher_offset, cd_size; uint32_t wordIndex = 0; uint32_t *temp_key = NULL; @@ -581,7 +581,7 @@ int qat_alg_aead_session_create_content_desc_auth(struct qat_session *cdesc, (struct icp_qat_fw_la_auth_req_params *) ((char *)&req_tmpl->serv_specif_rqpars + sizeof(struct icp_qat_fw_la_cipher_req_params)); - uint16_t proto = ICP_QAT_FW_LA_NO_PROTO; /* no CCM/GCM/Snow3G */ + uint16_t proto = ICP_QAT_FW_LA_NO_PROTO; /* no CCM/GCM/SNOW 3G */ uint16_t state1_size = 0, state2_size = 0; uint16_t hash_offset, cd_size; uint32_t *aad_len = NULL; diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c index 5969ba6f03..e4a70c9b89 100644 --- a/drivers/crypto/qat/qat_crypto.c +++ b/drivers/crypto/qat/qat_crypto.c @@ -265,7 +265,7 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = { }, } }, } }, - { /* SNOW3G (UIA2) */ + { /* SNOW 3G (UIA2) */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, @@ -330,7 +330,7 @@ static const struct rte_cryptodev_capabilities qat_pmd_capabilities[] = { }, } }, } }, - { /* SNOW3G (UEA2) */ + { /* SNOW 3G (UEA2) */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, @@ -573,7 +573,7 @@ qat_crypto_sym_configure_session_cipher(struct rte_cryptodev *dev, case RTE_CRYPTO_CIPHER_SNOW3G_UEA2: if (qat_alg_validate_snow3g_key(cipher_xform->key.length, &session->qat_cipher_alg) != 0) { - PMD_DRV_LOG(ERR, "Invalid SNOW3G cipher key size"); + PMD_DRV_LOG(ERR, "Invalid SNOW 3G cipher key size"); goto error_out; } session->qat_mode = ICP_QAT_HW_CIPHER_ECB_MODE; @@ -942,7 +942,7 @@ qat_write_hw_desc_entry(struct rte_crypto_op *op, uint8_t *out_msg) if (unlikely((cipher_param->cipher_length % BYTE_LENGTH != 0) || (cipher_param->cipher_offset % BYTE_LENGTH != 0))) { - PMD_DRV_LOG(ERR, " For Snow3g/Kasumi, QAT PMD only " + PMD_DRV_LOG(ERR, " For SNOW 3G/Kasumi, QAT PMD only " "supports byte aligned values"); op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS; return -EINVAL; @@ -973,7 +973,7 @@ qat_write_hw_desc_entry(struct rte_crypto_op *op, uint8_t *out_msg) if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_SNOW_3G_UIA2) { if (unlikely((auth_param->auth_off % BYTE_LENGTH != 0) || (auth_param->auth_len % BYTE_LENGTH != 0))) { - PMD_DRV_LOG(ERR, " For Snow3g, QAT PMD only " + PMD_DRV_LOG(ERR, " For SNOW 3G, QAT PMD only " "supports byte aligned values"); op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS; return -EINVAL; diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c index f4b596eb5a..e64d7a7ee1 100644 --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c @@ -631,7 +631,7 @@ cryptodev_snow3g_remove(const char *name) if (name == NULL) return -EINVAL; - RTE_LOG(INFO, PMD, "Closing SNOW3G crypto device %s" + RTE_LOG(INFO, PMD, "Closing SNOW 3G crypto device %s" " on numa socket %u\n", name, rte_socket_id()); diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c index 6f00b066f6..4602dfd4d3 100644 --- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c +++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c @@ -39,7 +39,7 @@ #include "rte_snow3g_pmd_private.h" static const struct rte_cryptodev_capabilities snow3g_pmd_capabilities[] = { - { /* SNOW3G (UIA2) */ + { /* SNOW 3G (UIA2) */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, @@ -64,7 +64,7 @@ static const struct rte_cryptodev_capabilities snow3g_pmd_capabilities[] = { }, } }, } }, - { /* SNOW3G (UEA2) */ + { /* SNOW 3G (UEA2) */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, {.sym = { .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, @@ -228,7 +228,7 @@ snow3g_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id, snow3g_pmd_qp_release(dev, qp_id); /* Allocate the queue pair data structure. */ - qp = rte_zmalloc_socket("SNOW3G PMD Queue Pair", sizeof(*qp), + qp = rte_zmalloc_socket("SNOW 3G PMD Queue Pair", sizeof(*qp), RTE_CACHE_LINE_SIZE, socket_id); if (qp == NULL) return (-ENOMEM); diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index ffce5f3b7d..b348d594c7 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -469,7 +469,7 @@ l2fwd_simple_crypto_enqueue(struct rte_mbuf *m, rte_pktmbuf_pkt_len(m) - cparams->digest_length); op->sym->auth.digest.length = cparams->digest_length; - /* For SNOW3G/KASUMI algorithms, offset/length must be in bits */ + /* For SNOW 3G/KASUMI algorithms, offset/length must be in bits */ if (cparams->auth_algo == RTE_CRYPTO_AUTH_SNOW3G_UIA2 || cparams->auth_algo == RTE_CRYPTO_AUTH_KASUMI_F9) { op->sym->auth.data.offset = ipdata_offset << 3; @@ -491,7 +491,7 @@ l2fwd_simple_crypto_enqueue(struct rte_mbuf *m, op->sym->cipher.iv.phys_addr = cparams->iv.phys_addr; op->sym->cipher.iv.length = cparams->iv.length; - /* For SNOW3G algorithms, offset/length must be in bits */ + /* For SNOW 3G algorithms, offset/length must be in bits */ if (cparams->cipher_algo == RTE_CRYPTO_CIPHER_SNOW3G_UEA2 || cparams->cipher_algo == RTE_CRYPTO_CIPHER_KASUMI_F8) { op->sym->cipher.data.offset = ipdata_offset << 3; diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h index 5b18865892..34a6bbf5e8 100644 --- a/lib/librte_cryptodev/rte_crypto_sym.h +++ b/lib/librte_cryptodev/rte_crypto_sym.h @@ -100,7 +100,7 @@ enum rte_crypto_cipher_algorithm { /**< Kasumi algorithm in F8 mode */ RTE_CRYPTO_CIPHER_SNOW3G_UEA2, - /**< SNOW3G algorithm in UEA2 mode */ + /**< SNOW 3G algorithm in UEA2 mode */ RTE_CRYPTO_CIPHER_ZUC_EEA3, /**< ZUC algorithm in EEA3 mode */ @@ -233,7 +233,7 @@ enum rte_crypto_auth_algorithm { /**< HMAC using 512 bit SHA algorithm. */ RTE_CRYPTO_AUTH_SNOW3G_UIA2, - /**< SNOW3G algorithm in UIA2 mode. */ + /**< SNOW 3G algorithm in UIA2 mode. */ RTE_CRYPTO_AUTH_ZUC_EIA3, /**< ZUC algorithm in EIA3 mode */ @@ -291,7 +291,7 @@ struct rte_crypto_auth_xform { * This field must be specified when the hash algorithm is one of the * following: * - * - For SNOW3G (@ref RTE_CRYPTO_AUTH_SNOW3G_UIA2), this is the + * - For SNOW 3G (@ref RTE_CRYPTO_AUTH_SNOW3G_UIA2), this is the * length of the IV (which should be 16). * * - For GCM (@ref RTE_CRYPTO_AUTH_AES_GCM). In this case, this is @@ -391,7 +391,7 @@ struct rte_crypto_sym_op { * this location. * * @note - * For Snow3G @ RTE_CRYPTO_CIPHER_SNOW3G_UEA2 + * For SNOW 3G @ RTE_CRYPTO_CIPHER_SNOW3G_UEA2 * and KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8, * this field should be in bits. */ @@ -416,7 +416,7 @@ struct rte_crypto_sym_op { * field should be set to 0. * * @note - * For Snow3G @ RTE_CRYPTO_AUTH_SNOW3G_UEA2 + * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UEA2 * and KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8, * this field should be in bits. */ @@ -427,7 +427,7 @@ struct rte_crypto_sym_op { /**< Initialisation Vector or Counter. * * - For block ciphers in CBC or F8 mode, or for Kasumi - * in F8 mode, or for SNOW3G in UEA2 mode, this is the + * in F8 mode, or for SNOW 3G in UEA2 mode, this is the * Initialisation Vector (IV) value. * * - For block ciphers in CTR mode, this is the counter. @@ -455,7 +455,7 @@ struct rte_crypto_sym_op { /**< Length of valid IV data. * * - For block ciphers in CBC or F8 mode, or for Kasumi - * in F8 mode, or for SNOW3G in UEA2 mode, this is the + * in F8 mode, or for SNOW 3G in UEA2 mode, this is the * length of the IV (which must be the same as the * block length of the cipher). * @@ -490,7 +490,7 @@ struct rte_crypto_sym_op { * used instead * * @note - * For Snow3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2 + * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2 * and KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9, * this field should be in bits. */ @@ -510,7 +510,7 @@ struct rte_crypto_sym_op { * Auth.aad.length is used instead. * * @note - * For Snow3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2 + * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2 * and KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9, * this field should be in bits. */ @@ -555,7 +555,7 @@ struct rte_crypto_sym_op { uint8_t *data; /**< Pointer to Additional Authenticated Data (AAD) * needed for authenticated cipher mechanisms (CCM and - * GCM), and to the IV for SNOW3G authentication + * GCM), and to the IV for SNOW 3G authentication * (@ref RTE_CRYPTO_AUTH_SNOW3G_UIA2). For other * authentication mechanisms this pointer is ignored. * -- 2.20.1