@@ -1373,7 +1373,7 @@ cperf_options_dump(struct cperf_options *opts)
opts->op_type == CPERF_CIPHER_THEN_AUTH ||
opts->op_type == CPERF_AUTH_THEN_CIPHER) {
printf("# auth algorithm: %s\n",
- rte_crypto_auth_algorithm_strings[opts->auth_algo]);
+ rte_cryptodev_get_auth_algo_string(opts->auth_algo));
printf("# auth operation: %s\n",
rte_crypto_auth_operation_strings[opts->auth_op]);
printf("# auth key size: %u\n", opts->auth_key_sz);
@@ -1386,7 +1386,7 @@ cperf_options_dump(struct cperf_options *opts)
opts->op_type == CPERF_CIPHER_THEN_AUTH ||
opts->op_type == CPERF_AUTH_THEN_CIPHER) {
printf("# cipher algorithm: %s\n",
- rte_crypto_cipher_algorithm_strings[opts->cipher_algo]);
+ rte_cryptodev_get_cipher_algo_string(opts->cipher_algo));
printf("# cipher operation: %s\n",
rte_crypto_cipher_operation_strings[opts->cipher_op]);
printf("# cipher key size: %u\n", opts->cipher_key_sz);
@@ -1396,7 +1396,7 @@ cperf_options_dump(struct cperf_options *opts)
if (opts->op_type == CPERF_AEAD) {
printf("# aead algorithm: %s\n",
- rte_crypto_aead_algorithm_strings[opts->aead_algo]);
+ rte_cryptodev_get_aead_algo_string(opts->aead_algo));
printf("# aead operation: %s\n",
rte_crypto_aead_operation_strings[opts->aead_op]);
printf("# aead key size: %u\n", opts->aead_key_sz);
@@ -974,7 +974,7 @@ static inline void print_asym_capa(
int i = 0;
printf("\nxform type: %s\n===================\n",
- rte_crypto_asym_xform_strings[capa->xform_type]);
+ rte_cryptodev_asym_get_xform_string(capa->xform_type));
printf("operation supported -");
for (i = 0; i < RTE_CRYPTO_ASYM_OP_LIST_END; i++) {
@@ -625,20 +625,20 @@ test_ipsec_display_alg(const struct crypto_param *param1,
{
if (param1->type == RTE_CRYPTO_SYM_XFORM_AEAD) {
printf("\t%s [%d]",
- rte_crypto_aead_algorithm_strings[param1->alg.aead],
+ rte_cryptodev_get_aead_algo_string(param1->alg.aead),
param1->key_length * 8);
} else if (param1->type == RTE_CRYPTO_SYM_XFORM_AUTH) {
printf("\t%s",
- rte_crypto_auth_algorithm_strings[param1->alg.auth]);
+ rte_cryptodev_get_auth_algo_string(param1->alg.auth));
if (param1->alg.auth != RTE_CRYPTO_AUTH_NULL)
printf(" [%dB ICV]", param1->digest_length);
} else {
printf("\t%s",
- rte_crypto_cipher_algorithm_strings[param1->alg.cipher]);
+ rte_cryptodev_get_cipher_algo_string(param1->alg.cipher));
if (param1->alg.cipher != RTE_CRYPTO_CIPHER_NULL)
printf(" [%d]", param1->key_length * 8);
printf(" %s",
- rte_crypto_auth_algorithm_strings[param2->alg.auth]);
+ rte_cryptodev_get_auth_algo_string(param2->alg.auth));
if (param2->alg.auth != RTE_CRYPTO_AUTH_NULL)
printf(" [%dB ICV]", param2->digest_length);
}
@@ -114,6 +114,13 @@ Deprecation Notices
which got error interrupt to the application,
so that application can reset that particular queue pair.
+* cryptodev: The arrays of algorithm strings ``rte_crypto_cipher_algorithm_strings``,
+ ``rte_crypto_auth_algorithm_strings``, ``rte_crypto_aead_algorithm_strings`` and
+ ``rte_crypto_asym_xform_strings`` are deprecated and will be removed in DPDK 23.11.
+ Application can use the new APIs ``rte_cryptodev_get_cipher_algo_string``,
+ ``rte_cryptodev_get_auth_algo_string``, ``rte_cryptodev_get_aead_algo_string`` and
+ ``rte_cryptodev_asym_get_xform_string`` respectively.
+
* flow_classify: The flow_classify library and example have no maintainer.
The library is experimental and, as such, it could be removed from DPDK.
Its removal has been postponed to let potential users report interest
@@ -823,7 +823,7 @@ static int openssl_set_asym_session_parameters(
if ((xform->xform_type != RTE_CRYPTO_ASYM_XFORM_DH) &&
(xform->next != NULL)) {
OPENSSL_LOG(ERR, "chained xfrms are not supported on %s",
- rte_crypto_asym_xform_strings[xform->xform_type]);
+ rte_cryptodev_asym_get_xform_string(xform->xform_type));
return ret;
}
@@ -436,8 +436,8 @@ qat_sym_session_configure_cipher(struct rte_cryptodev *dev,
if (!qat_is_cipher_alg_supported(
cipher_xform->algo, internals)) {
QAT_LOG(ERR, "%s not supported on this device",
- rte_crypto_cipher_algorithm_strings
- [cipher_xform->algo]);
+ rte_cryptodev_get_cipher_algo_string(
+ cipher_xform->algo));
ret = -ENOTSUP;
goto error_out;
}
@@ -772,8 +772,7 @@ qat_sym_session_configure_auth(struct rte_cryptodev *dev,
case RTE_CRYPTO_AUTH_ZUC_EIA3:
if (!qat_is_auth_alg_supported(auth_xform->algo, internals)) {
QAT_LOG(ERR, "%s not supported on this device",
- rte_crypto_auth_algorithm_strings
- [auth_xform->algo]);
+ rte_cryptodev_get_auth_algo_string(auth_xform->algo));
return -ENOTSUP;
}
session->qat_hash_alg = ICP_QAT_HW_AUTH_ALGO_ZUC_3G_128_EIA3;
@@ -1536,7 +1536,7 @@ display_cipher_info(struct l2fwd_crypto_options *options)
{
printf("\n---- Cipher information ---\n");
printf("Algorithm: %s\n",
- rte_crypto_cipher_algorithm_strings[options->cipher_xform.cipher.algo]);
+ rte_cryptodev_get_cipher_algo_string(options->cipher_xform.cipher.algo));
rte_hexdump(stdout, "Cipher key:",
options->cipher_xform.cipher.key.data,
options->cipher_xform.cipher.key.length);
@@ -1548,7 +1548,7 @@ display_auth_info(struct l2fwd_crypto_options *options)
{
printf("\n---- Authentication information ---\n");
printf("Algorithm: %s\n",
- rte_crypto_auth_algorithm_strings[options->auth_xform.auth.algo]);
+ rte_cryptodev_get_auth_algo_string(options->auth_xform.auth.algo));
rte_hexdump(stdout, "Auth key:",
options->auth_xform.auth.key.data,
options->auth_xform.auth.key.length);
@@ -1560,7 +1560,7 @@ display_aead_info(struct l2fwd_crypto_options *options)
{
printf("\n---- AEAD information ---\n");
printf("Algorithm: %s\n",
- rte_crypto_aead_algorithm_strings[options->aead_xform.aead.algo]);
+ rte_cryptodev_get_aead_algo_string(options->aead_xform.aead.algo));
rte_hexdump(stdout, "AEAD key:",
options->aead_xform.aead.key.data,
options->aead_xform.aead.key.length);
@@ -1864,7 +1864,7 @@ check_device_support_cipher_algo(const struct l2fwd_crypto_options *options,
if (cap->op == RTE_CRYPTO_OP_TYPE_UNDEFINED) {
printf("Algorithm %s not supported by cryptodev %u"
" or device not of preferred type (%s)\n",
- rte_crypto_cipher_algorithm_strings[opt_cipher_algo],
+ rte_cryptodev_get_cipher_algo_string(opt_cipher_algo),
cdev_id,
options->string_type);
return NULL;
@@ -1898,7 +1898,7 @@ check_device_support_auth_algo(const struct l2fwd_crypto_options *options,
if (cap->op == RTE_CRYPTO_OP_TYPE_UNDEFINED) {
printf("Algorithm %s not supported by cryptodev %u"
" or device not of preferred type (%s)\n",
- rte_crypto_auth_algorithm_strings[opt_auth_algo],
+ rte_cryptodev_get_auth_algo_string(opt_auth_algo),
cdev_id,
options->string_type);
return NULL;
@@ -1932,7 +1932,7 @@ check_device_support_aead_algo(const struct l2fwd_crypto_options *options,
if (cap->op == RTE_CRYPTO_OP_TYPE_UNDEFINED) {
printf("Algorithm %s not supported by cryptodev %u"
" or device not of preferred type (%s)\n",
- rte_crypto_aead_algorithm_strings[opt_aead_algo],
+ rte_cryptodev_get_aead_algo_string(opt_aead_algo),
cdev_id,
options->string_type);
return NULL;
@@ -72,6 +72,15 @@ RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_get_auth_algo_enum,
RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_get_cipher_algo_enum,
lib.cryptodev.get.cipher.algo.enum)
+RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_get_aead_algo_string,
+ lib.cryptodev.get.aead.algo.string)
+
+RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_get_auth_algo_string,
+ lib.cryptodev.get.auth.algo.string)
+
+RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_get_cipher_algo_string,
+ lib.cryptodev.get.cipher.algo.string)
+
RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_get_dev_id,
lib.cryptodev.get.dev.id)
@@ -126,6 +135,9 @@ RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_get_private_session_size,
RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_get_xform_enum,
lib.cryptodev.asym.get.xform.enum)
+RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_get_xform_string,
+ lib.cryptodev.asym.get.xform.string)
+
RTE_TRACE_POINT_REGISTER(rte_cryptodev_trace_asym_xform_capability_check_modlen,
lib.cryptodev.asym.xform.capability.check.modlen)
@@ -30,6 +30,7 @@ extern "C" {
struct rte_cryptodev_asym_session;
/** asym xform type name strings */
+__rte_deprecated
extern const char *
rte_crypto_asym_xform_strings[];
@@ -177,6 +177,7 @@ enum rte_crypto_cipher_algorithm {
};
/** Cipher algorithm name strings */
+__rte_deprecated
extern const char *
rte_crypto_cipher_algorithm_strings[];
@@ -378,6 +379,7 @@ enum rte_crypto_auth_algorithm {
};
/** Authentication algorithm name strings */
+__rte_deprecated
extern const char *
rte_crypto_auth_algorithm_strings[];
@@ -482,6 +484,7 @@ enum rte_crypto_aead_algorithm {
};
/** AEAD algorithm name strings */
+__rte_deprecated
extern const char *
rte_crypto_aead_algorithm_strings[];
@@ -64,9 +64,11 @@ struct rte_cryptodev_callback {
};
/**
+ * @deprecated
* The crypto cipher algorithm strings identifiers.
* It could be used in application command line.
*/
+__rte_deprecated
const char *
rte_crypto_cipher_algorithm_strings[] = {
[RTE_CRYPTO_CIPHER_3DES_CBC] = "3des-cbc",
@@ -95,6 +97,39 @@ rte_crypto_cipher_algorithm_strings[] = {
[RTE_CRYPTO_CIPHER_SM4_CTR] = "sm4-ctr"
};
+/**
+ * The crypto cipher algorithm strings identifiers.
+ * Not to be used in application directly.
+ * Application can use rte_cryptodev_get_cipher_algo_string().
+ */
+static const char *
+crypto_cipher_algorithm_strings[] = {
+ [RTE_CRYPTO_CIPHER_3DES_CBC] = "3des-cbc",
+ [RTE_CRYPTO_CIPHER_3DES_ECB] = "3des-ecb",
+ [RTE_CRYPTO_CIPHER_3DES_CTR] = "3des-ctr",
+
+ [RTE_CRYPTO_CIPHER_AES_CBC] = "aes-cbc",
+ [RTE_CRYPTO_CIPHER_AES_CTR] = "aes-ctr",
+ [RTE_CRYPTO_CIPHER_AES_DOCSISBPI] = "aes-docsisbpi",
+ [RTE_CRYPTO_CIPHER_AES_ECB] = "aes-ecb",
+ [RTE_CRYPTO_CIPHER_AES_F8] = "aes-f8",
+ [RTE_CRYPTO_CIPHER_AES_XTS] = "aes-xts",
+
+ [RTE_CRYPTO_CIPHER_ARC4] = "arc4",
+
+ [RTE_CRYPTO_CIPHER_DES_CBC] = "des-cbc",
+ [RTE_CRYPTO_CIPHER_DES_DOCSISBPI] = "des-docsisbpi",
+
+ [RTE_CRYPTO_CIPHER_NULL] = "null",
+
+ [RTE_CRYPTO_CIPHER_KASUMI_F8] = "kasumi-f8",
+ [RTE_CRYPTO_CIPHER_SNOW3G_UEA2] = "snow3g-uea2",
+ [RTE_CRYPTO_CIPHER_ZUC_EEA3] = "zuc-eea3",
+ [RTE_CRYPTO_CIPHER_SM4_ECB] = "sm4-ecb",
+ [RTE_CRYPTO_CIPHER_SM4_CBC] = "sm4-cbc",
+ [RTE_CRYPTO_CIPHER_SM4_CTR] = "sm4-ctr"
+};
+
/**
* The crypto cipher operation strings identifiers.
* It could be used in application command line.
@@ -106,9 +141,11 @@ rte_crypto_cipher_operation_strings[] = {
};
/**
+ * @deprecated
* The crypto auth algorithm strings identifiers.
* It could be used in application command line.
*/
+__rte_deprecated
const char *
rte_crypto_auth_algorithm_strings[] = {
[RTE_CRYPTO_AUTH_AES_CBC_MAC] = "aes-cbc-mac",
@@ -149,9 +186,55 @@ rte_crypto_auth_algorithm_strings[] = {
};
/**
+ * The crypto auth algorithm strings identifiers.
+ * Not to be used in application directly.
+ * Application can use rte_cryptodev_get_auth_algo_string().
+ */
+static const char *
+crypto_auth_algorithm_strings[] = {
+ [RTE_CRYPTO_AUTH_AES_CBC_MAC] = "aes-cbc-mac",
+ [RTE_CRYPTO_AUTH_AES_CMAC] = "aes-cmac",
+ [RTE_CRYPTO_AUTH_AES_GMAC] = "aes-gmac",
+ [RTE_CRYPTO_AUTH_AES_XCBC_MAC] = "aes-xcbc-mac",
+
+ [RTE_CRYPTO_AUTH_MD5] = "md5",
+ [RTE_CRYPTO_AUTH_MD5_HMAC] = "md5-hmac",
+
+ [RTE_CRYPTO_AUTH_NULL] = "null",
+
+ [RTE_CRYPTO_AUTH_SHA1] = "sha1",
+ [RTE_CRYPTO_AUTH_SHA1_HMAC] = "sha1-hmac",
+
+ [RTE_CRYPTO_AUTH_SHA224] = "sha2-224",
+ [RTE_CRYPTO_AUTH_SHA224_HMAC] = "sha2-224-hmac",
+ [RTE_CRYPTO_AUTH_SHA256] = "sha2-256",
+ [RTE_CRYPTO_AUTH_SHA256_HMAC] = "sha2-256-hmac",
+ [RTE_CRYPTO_AUTH_SHA384] = "sha2-384",
+ [RTE_CRYPTO_AUTH_SHA384_HMAC] = "sha2-384-hmac",
+ [RTE_CRYPTO_AUTH_SHA512] = "sha2-512",
+ [RTE_CRYPTO_AUTH_SHA512_HMAC] = "sha2-512-hmac",
+
+ [RTE_CRYPTO_AUTH_SHA3_224] = "sha3-224",
+ [RTE_CRYPTO_AUTH_SHA3_224_HMAC] = "sha3-224-hmac",
+ [RTE_CRYPTO_AUTH_SHA3_256] = "sha3-256",
+ [RTE_CRYPTO_AUTH_SHA3_256_HMAC] = "sha3-256-hmac",
+ [RTE_CRYPTO_AUTH_SHA3_384] = "sha3-384",
+ [RTE_CRYPTO_AUTH_SHA3_384_HMAC] = "sha3-384-hmac",
+ [RTE_CRYPTO_AUTH_SHA3_512] = "sha3-512",
+ [RTE_CRYPTO_AUTH_SHA3_512_HMAC] = "sha3-512-hmac",
+
+ [RTE_CRYPTO_AUTH_KASUMI_F9] = "kasumi-f9",
+ [RTE_CRYPTO_AUTH_SNOW3G_UIA2] = "snow3g-uia2",
+ [RTE_CRYPTO_AUTH_ZUC_EIA3] = "zuc-eia3",
+ [RTE_CRYPTO_AUTH_SM3] = "sm3"
+};
+
+/**
+ * @deprecated
* The crypto AEAD algorithm strings identifiers.
* It could be used in application command line.
*/
+__rte_deprecated
const char *
rte_crypto_aead_algorithm_strings[] = {
[RTE_CRYPTO_AEAD_AES_CCM] = "aes-ccm",
@@ -159,6 +242,19 @@ rte_crypto_aead_algorithm_strings[] = {
[RTE_CRYPTO_AEAD_CHACHA20_POLY1305] = "chacha20-poly1305"
};
+/**
+ * The crypto AEAD algorithm strings identifiers.
+ * Not to be used in application directly.
+ * Application can use rte_cryptodev_get_aead_algo_string().
+ */
+static const char *
+crypto_aead_algorithm_strings[] = {
+ [RTE_CRYPTO_AEAD_AES_CCM] = "aes-ccm",
+ [RTE_CRYPTO_AEAD_AES_GCM] = "aes-gcm",
+ [RTE_CRYPTO_AEAD_CHACHA20_POLY1305] = "chacha20-poly1305"
+};
+
+
/**
* The crypto AEAD operation strings identifiers.
* It could be used in application command line.
@@ -170,8 +266,10 @@ rte_crypto_aead_operation_strings[] = {
};
/**
+ * @deprecated
* Asymmetric crypto transform operation strings identifiers.
*/
+__rte_deprecated
const char *rte_crypto_asym_xform_strings[] = {
[RTE_CRYPTO_ASYM_XFORM_NONE] = "none",
[RTE_CRYPTO_ASYM_XFORM_RSA] = "rsa",
@@ -183,6 +281,23 @@ const char *rte_crypto_asym_xform_strings[] = {
[RTE_CRYPTO_ASYM_XFORM_ECPM] = "ecpm",
};
+/**
+ * Asymmetric crypto transform operation strings identifiers.
+ * Not to be used in application directly.
+ * Application can use rte_cryptodev_asym_get_xform_string().
+ */
+static const char *
+crypto_asym_xform_strings[] = {
+ [RTE_CRYPTO_ASYM_XFORM_NONE] = "none",
+ [RTE_CRYPTO_ASYM_XFORM_RSA] = "rsa",
+ [RTE_CRYPTO_ASYM_XFORM_MODEX] = "modexp",
+ [RTE_CRYPTO_ASYM_XFORM_MODINV] = "modinv",
+ [RTE_CRYPTO_ASYM_XFORM_DH] = "dh",
+ [RTE_CRYPTO_ASYM_XFORM_DSA] = "dsa",
+ [RTE_CRYPTO_ASYM_XFORM_ECDSA] = "ecdsa",
+ [RTE_CRYPTO_ASYM_XFORM_ECPM] = "ecpm",
+};
+
/**
* Asymmetric crypto operation strings identifiers.
*/
@@ -227,8 +342,8 @@ rte_cryptodev_get_cipher_algo_enum(enum rte_crypto_cipher_algorithm *algo_enum,
unsigned int i;
int ret = -1; /* Invalid string */
- for (i = 1; i < RTE_DIM(rte_crypto_cipher_algorithm_strings); i++) {
- if (strcmp(algo_string, rte_crypto_cipher_algorithm_strings[i]) == 0) {
+ for (i = 1; i < RTE_DIM(crypto_cipher_algorithm_strings); i++) {
+ if (strcmp(algo_string, crypto_cipher_algorithm_strings[i]) == 0) {
*algo_enum = (enum rte_crypto_cipher_algorithm) i;
ret = 0;
break;
@@ -247,8 +362,8 @@ rte_cryptodev_get_auth_algo_enum(enum rte_crypto_auth_algorithm *algo_enum,
unsigned int i;
int ret = -1; /* Invalid string */
- for (i = 1; i < RTE_DIM(rte_crypto_auth_algorithm_strings); i++) {
- if (strcmp(algo_string, rte_crypto_auth_algorithm_strings[i]) == 0) {
+ for (i = 1; i < RTE_DIM(crypto_auth_algorithm_strings); i++) {
+ if (strcmp(algo_string, crypto_auth_algorithm_strings[i]) == 0) {
*algo_enum = (enum rte_crypto_auth_algorithm) i;
ret = 0;
break;
@@ -267,8 +382,8 @@ rte_cryptodev_get_aead_algo_enum(enum rte_crypto_aead_algorithm *algo_enum,
unsigned int i;
int ret = -1; /* Invalid string */
- for (i = 1; i < RTE_DIM(rte_crypto_aead_algorithm_strings); i++) {
- if (strcmp(algo_string, rte_crypto_aead_algorithm_strings[i]) == 0) {
+ for (i = 1; i < RTE_DIM(crypto_aead_algorithm_strings); i++) {
+ if (strcmp(algo_string, crypto_aead_algorithm_strings[i]) == 0) {
*algo_enum = (enum rte_crypto_aead_algorithm) i;
ret = 0;
break;
@@ -287,9 +402,9 @@ rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum,
unsigned int i;
int ret = -1; /* Invalid string */
- for (i = 1; i < RTE_DIM(rte_crypto_asym_xform_strings); i++) {
+ for (i = 1; i < RTE_DIM(crypto_asym_xform_strings); i++) {
if (strcmp(xform_string,
- rte_crypto_asym_xform_strings[i]) == 0) {
+ crypto_asym_xform_strings[i]) == 0) {
*xform_enum = (enum rte_crypto_asym_xform_type) i;
ret = 0;
break;
@@ -301,6 +416,58 @@ rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum,
return ret;
}
+const char *
+rte_cryptodev_get_cipher_algo_string(enum rte_crypto_cipher_algorithm algo_enum)
+{
+ const char *alg_str = NULL;
+
+ if ((unsigned int)algo_enum < RTE_DIM(crypto_cipher_algorithm_strings))
+ alg_str = crypto_cipher_algorithm_strings[algo_enum];
+
+ rte_cryptodev_trace_get_cipher_algo_string(algo_enum, alg_str);
+
+ return alg_str;
+}
+
+const char *
+rte_cryptodev_get_auth_algo_string(enum rte_crypto_auth_algorithm algo_enum)
+{
+ const char *alg_str = NULL;
+
+ if ((unsigned int)algo_enum < RTE_DIM(crypto_auth_algorithm_strings))
+ alg_str = crypto_auth_algorithm_strings[algo_enum];
+
+ rte_cryptodev_trace_get_auth_algo_string(algo_enum, alg_str);
+
+ return alg_str;
+}
+
+const char *
+rte_cryptodev_get_aead_algo_string(enum rte_crypto_aead_algorithm algo_enum)
+{
+ const char *alg_str = NULL;
+
+ if ((unsigned int)algo_enum < RTE_DIM(crypto_aead_algorithm_strings))
+ alg_str = crypto_aead_algorithm_strings[algo_enum];
+
+ rte_cryptodev_trace_get_aead_algo_string(algo_enum, alg_str);
+
+ return alg_str;
+}
+
+const char *
+rte_cryptodev_asym_get_xform_string(enum rte_crypto_asym_xform_type xform_enum)
+{
+ const char *xform_str = NULL;
+
+ if ((unsigned int)xform_enum < RTE_DIM(crypto_asym_xform_strings))
+ xform_str = crypto_asym_xform_strings[xform_enum];
+
+ rte_cryptodev_trace_asym_get_xform_string(xform_enum, xform_str);
+
+ return xform_str;
+}
+
/**
* The crypto auth operation strings identifiers.
* It could be used in application command line.
@@ -406,6 +406,58 @@ int
rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum,
const char *xform_string);
+/**
+ * Provide the cipher algorithm string, given an algorithm enum.
+ *
+ * @param algo_enum cipher algorithm enum
+ *
+ * @return
+ * - Return NULL if enum is not valid
+ * - Return algo_string corresponding to enum
+ */
+__rte_experimental
+const char *
+rte_cryptodev_get_cipher_algo_string(enum rte_crypto_cipher_algorithm algo_enum);
+
+/**
+ * Provide the authentication algorithm string, given an algorithm enum.
+ *
+ * @param algo_enum auth algorithm enum
+ *
+ * @return
+ * - Return NULL if enum is not valid
+ * - Return algo_string corresponding to enum
+ */
+__rte_experimental
+const char *
+rte_cryptodev_get_auth_algo_string(enum rte_crypto_auth_algorithm algo_enum);
+
+/**
+ * Provide the AEAD algorithm string, given an algorithm enum.
+ *
+ * @param algo_enum AEAD algorithm enum
+ *
+ * @return
+ * - Return NULL if enum is not valid
+ * - Return algo_string corresponding to enum
+ */
+__rte_experimental
+const char *
+rte_cryptodev_get_aead_algo_string(enum rte_crypto_aead_algorithm algo_enum);
+
+/**
+ * Provide the Asymmetric xform string, given an xform enum.
+ *
+ * @param xform_enum xform type enum
+ *
+ * @return
+ * - Return NULL, if enum is not valid.
+ * - Return xform string, for valid enum.
+ */
+__rte_experimental
+const char *
+rte_cryptodev_asym_get_xform_string(enum rte_crypto_asym_xform_type xform_enum);
+
/** Macro used at end of crypto PMD list */
#define RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() \
@@ -189,6 +189,30 @@ RTE_TRACE_POINT(
rte_trace_point_emit_int(ret);
)
+RTE_TRACE_POINT(
+ rte_cryptodev_trace_get_aead_algo_string,
+ RTE_TRACE_POINT_ARGS(enum rte_crypto_aead_algorithm algo_enum,
+ const char *algo_string),
+ rte_trace_point_emit_int(algo_enum);
+ rte_trace_point_emit_string(algo_string);
+)
+
+RTE_TRACE_POINT(
+ rte_cryptodev_trace_get_auth_algo_string,
+ RTE_TRACE_POINT_ARGS(enum rte_crypto_auth_algorithm algo_enum,
+ const char *algo_string),
+ rte_trace_point_emit_int(algo_enum);
+ rte_trace_point_emit_string(algo_string);
+)
+
+RTE_TRACE_POINT(
+ rte_cryptodev_trace_get_cipher_algo_string,
+ RTE_TRACE_POINT_ARGS(enum rte_crypto_cipher_algorithm algo_enum,
+ const char *algo_string),
+ rte_trace_point_emit_int(algo_enum);
+ rte_trace_point_emit_string(algo_string);
+)
+
RTE_TRACE_POINT(
rte_cryptodev_trace_get_dev_id,
RTE_TRACE_POINT_ARGS(const char *name, int ret),
@@ -351,6 +375,14 @@ RTE_TRACE_POINT(
rte_trace_point_emit_int(ret);
)
+RTE_TRACE_POINT(
+ rte_cryptodev_trace_asym_get_xform_string,
+ RTE_TRACE_POINT_ARGS(enum rte_crypto_asym_xform_type xform_enum,
+ const char *xform_string),
+ rte_trace_point_emit_int(xform_enum);
+ rte_trace_point_emit_string(xform_string);
+)
+
RTE_TRACE_POINT(
rte_cryptodev_trace_asym_xform_capability_check_modlen,
RTE_TRACE_POINT_ARGS(const void *capability, uint16_t modlen, int ret),
@@ -150,11 +150,21 @@ EXPERIMENTAL {
__rte_cryptodev_trace_sym_session_get_user_data;
__rte_cryptodev_trace_sym_session_set_user_data;
__rte_cryptodev_trace_count;
+
+ # added 23.03
+ rte_cryptodev_asym_get_xform_string;
+ rte_cryptodev_get_aead_algo_string;
+ rte_cryptodev_get_auth_algo_string;
+ rte_cryptodev_get_cipher_algo_string;
};
INTERNAL {
global:
+ __rte_cryptodev_trace_asym_get_xform_string;
+ __rte_cryptodev_trace_get_aead_algo_string;
+ __rte_cryptodev_trace_get_auth_algo_string;
+ __rte_cryptodev_trace_get_cipher_algo_string;
cryptodev_fp_ops_reset;
cryptodev_fp_ops_set;
rte_cryptodev_allocate_driver;