if (nb_devs < 2) {
for (i = nb_devs; i < 2; i++) {
ret = rte_eal_vdev_init(
- CRYPTODEV_NAME_AESNI_MB_PMD, NULL);
+ RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD), NULL);
TEST_ASSERT(ret == 0,
"Failed to create instance %u of"
" pmd : %s",
- i, CRYPTODEV_NAME_AESNI_MB_PMD);
+ i, RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD));
}
}
}
if (nb_devs < 2) {
for (i = nb_devs; i < 2; i++) {
TEST_ASSERT_SUCCESS(rte_eal_vdev_init(
- CRYPTODEV_NAME_AESNI_GCM_PMD, NULL),
+ RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD), NULL),
"Failed to create instance %u of"
" pmd : %s",
- i, CRYPTODEV_NAME_AESNI_GCM_PMD);
+ i, RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD));
}
}
}
if (nb_devs < 2) {
for (i = nb_devs; i < 2; i++) {
TEST_ASSERT_SUCCESS(rte_eal_vdev_init(
- CRYPTODEV_NAME_SNOW3G_PMD, NULL),
+ RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD), NULL),
"Failed to create instance %u of"
" pmd : %s",
- i, CRYPTODEV_NAME_SNOW3G_PMD);
+ i, RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD));
}
}
}
if (nb_devs < 2) {
for (i = nb_devs; i < 2; i++) {
TEST_ASSERT_SUCCESS(rte_eal_vdev_init(
- CRYPTODEV_NAME_KASUMI_PMD, NULL),
+ RTE_STR(CRYPTODEV_NAME_KASUMI_PMD), NULL),
"Failed to create instance %u of"
" pmd : %s",
- i, CRYPTODEV_NAME_KASUMI_PMD);
+ i, RTE_STR(CRYPTODEV_NAME_KASUMI_PMD));
}
}
}
if (nb_devs < 2) {
for (i = nb_devs; i < 2; i++) {
int dev_id = rte_eal_vdev_init(
- CRYPTODEV_NAME_NULL_PMD, NULL);
+ RTE_STR(CRYPTODEV_NAME_NULL_PMD), NULL);
TEST_ASSERT(dev_id >= 0,
"Failed to create instance %u of"
" pmd : %s",
- i, CRYPTODEV_NAME_NULL_PMD);
+ i, RTE_STR(CRYPTODEV_NAME_NULL_PMD));
}
}
}
static const char *pmd_name(enum rte_cryptodev_type pmd)
{
switch (pmd) {
- case RTE_CRYPTODEV_NULL_PMD: return CRYPTODEV_NAME_NULL_PMD; break;
+ case RTE_CRYPTODEV_NULL_PMD: return RTE_STR(CRYPTODEV_NAME_NULL_PMD); break;
case RTE_CRYPTODEV_AESNI_GCM_PMD:
- return CRYPTODEV_NAME_AESNI_GCM_PMD;
+ return RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD);
case RTE_CRYPTODEV_AESNI_MB_PMD:
- return CRYPTODEV_NAME_AESNI_MB_PMD;
+ return RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD);
case RTE_CRYPTODEV_QAT_SYM_PMD:
- return CRYPTODEV_NAME_QAT_SYM_PMD;
+ return RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD);
case RTE_CRYPTODEV_SNOW3G_PMD:
- return CRYPTODEV_NAME_SNOW3G_PMD;
+ return RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD);
default:
return "";
}
if (nb_devs < 2) {
for (i = nb_devs; i < 2; i++) {
ret = rte_eal_vdev_init(
- CRYPTODEV_NAME_AESNI_MB_PMD, NULL);
+ RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD), NULL);
TEST_ASSERT(ret == 0,
"Failed to create instance %u of pmd : %s",
- i, CRYPTODEV_NAME_AESNI_MB_PMD);
+ i, RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD));
}
}
}
if (nb_devs < 2) {
for (i = nb_devs; i < 2; i++) {
ret = rte_eal_vdev_init(
- CRYPTODEV_NAME_SNOW3G_PMD, NULL);
+ RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD), NULL);
TEST_ASSERT(ret == 0,
"Failed to create instance %u of pmd : %s",
- i, CRYPTODEV_NAME_SNOW3G_PMD);
+ i, RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD));
}
}
}
if (name == NULL)
return -EINVAL;
- ret = snprintf(name, size, "%s_%u", CRYPTODEV_NAME_AESNI_GCM_PMD,
+ ret = snprintf(name, size, "%s_%u", RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD),
unique_name_id++);
if (ret < 0)
return ret;
}
static struct rte_driver aesni_gcm_pmd_drv = {
- .name = CRYPTODEV_NAME_AESNI_GCM_PMD,
.type = PMD_VDEV,
.init = aesni_gcm_init,
.uninit = aesni_gcm_uninit
};
-PMD_REGISTER_DRIVER(aesni_gcm_pmd_drv, aesni_gcm);
-DRIVER_REGISTER_PARAM_STRING(aesni_gcm, "max_nb_queue_pairs=<int> "
+PMD_REGISTER_DRIVER(aesni_gcm_pmd_drv, CRYPTODEV_NAME_AESNI_GCM_PMD);
+DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD, "max_nb_queue_pairs=<int> "
"max_nb_sessions=<int> socket_id=<int>");
#define GCM_LOG_ERR(fmt, args...) \
RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
- CRYPTODEV_NAME_AESNI_GCM_PMD, \
+ RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD), \
__func__, __LINE__, ## args)
#ifdef RTE_LIBRTE_AESNI_MB_DEBUG
#define GCM_LOG_INFO(fmt, args...) \
RTE_LOG(INFO, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
- CRYPTODEV_NAME_AESNI_GCM_PMD, \
+ RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD), \
__func__, __LINE__, ## args)
#define GCM_LOG_DBG(fmt, args...) \
RTE_LOG(DEBUG, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
- CRYPTODEV_NAME_AESNI_GCM_PMD, \
+ RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD), \
__func__, __LINE__, ## args)
#else
#define GCM_LOG_INFO(fmt, args...)
if (name == NULL)
return -EINVAL;
- ret = snprintf(name, size, "%s_%u", CRYPTODEV_NAME_AESNI_MB_PMD,
+ ret = snprintf(name, size, "%s_%u", RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD),
unique_name_id++);
if (ret < 0)
return ret;
}
static struct rte_driver cryptodev_aesni_mb_pmd_drv = {
- .name = CRYPTODEV_NAME_AESNI_MB_PMD,
.type = PMD_VDEV,
.init = cryptodev_aesni_mb_init,
.uninit = cryptodev_aesni_mb_uninit
};
-PMD_REGISTER_DRIVER(cryptodev_aesni_mb_pmd_drv, aesni_mb);
-DRIVER_REGISTER_PARAM_STRING(aesni_gcm, "max_nb_queue_pairs=<int> "
+PMD_REGISTER_DRIVER(cryptodev_aesni_mb_pmd_drv, CRYPTODEV_NAME_AESNI_MB_PMD);
+DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD, "max_nb_queue_pairs=<int> "
"max_nb_sessions=<int> socket_id=<int>");
#define MB_LOG_ERR(fmt, args...) \
RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
- CRYPTODEV_NAME_AESNI_MB_PMD, \
+ RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD), \
__func__, __LINE__, ## args)
#ifdef RTE_LIBRTE_AESNI_MB_DEBUG
if (name == NULL)
return -EINVAL;
- ret = snprintf(name, size, "%s_%u", CRYPTODEV_NAME_KASUMI_PMD,
+ ret = snprintf(name, size, "%s_%u", RTE_STR(CRYPTODEV_NAME_KASUMI_PMD),
unique_name_id++);
if (ret < 0)
return ret;
}
static struct rte_driver cryptodev_kasumi_pmd_drv = {
- .name = CRYPTODEV_NAME_KASUMI_PMD,
.type = PMD_VDEV,
.init = cryptodev_kasumi_init,
.uninit = cryptodev_kasumi_uninit
};
-PMD_REGISTER_DRIVER(cryptodev_kasumi_pmd_drv, kasumi);
-DRIVER_REGISTER_PARAM_STRING(kasumi, "max_nb_queue_pairs=<int> "
+PMD_REGISTER_DRIVER(cryptodev_kasumi_pmd_drv, CRYPTODEV_NAME_KASUMI_PMD);
+DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD, "max_nb_queue_pairs=<int> "
"max_nb_sessions=<int> socket_id=<int>");
#define KASUMI_LOG_ERR(fmt, args...) \
RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
- CRYPTODEV_NAME_KASUMI_PMD, \
+ RTE_STR(CRYPTODEV_NAME_KASUMI_PMD), \
__func__, __LINE__, ## args)
#ifdef RTE_LIBRTE_KASUMI_DEBUG
#define KASUMI_LOG_INFO(fmt, args...) \
RTE_LOG(INFO, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
- CRYPTODEV_NAME_KASUMI_PMD, \
+ RTE_STR(CRYPTODEV_NAME_KASUMI_PMD), \
__func__, __LINE__, ## args)
#define KASUMI_LOG_DBG(fmt, args...) \
RTE_LOG(DEBUG, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
- CRYPTODEV_NAME_KASUMI_PMD, \
+ RTE_STR(CRYPTODEV_NAME_KASUMI_PMD), \
__func__, __LINE__, ## args)
#else
#define KASUMI_LOG_INFO(fmt, args...)
if (name == NULL)
return -EINVAL;
- ret = snprintf(name, size, "%s_%u", CRYPTODEV_NAME_NULL_PMD,
+ ret = snprintf(name, size, "%s_%u", RTE_STR(CRYPTODEV_NAME_NULL_PMD),
unique_name_id++);
if (ret < 0)
return ret;
}
static struct rte_driver cryptodev_null_pmd_drv = {
- .name = CRYPTODEV_NAME_NULL_PMD,
.type = PMD_VDEV,
.init = cryptodev_null_init,
.uninit = cryptodev_null_uninit
};
-PMD_REGISTER_DRIVER(cryptodev_null_pmd_drv, cryptodev_null_pmd);
-DRIVER_REGISTER_PARAM_STRING(aesni_gcm, "max_nb_queue_pairs=<int> "
+PMD_REGISTER_DRIVER(cryptodev_null_pmd_drv, CRYPTODEV_NAME_NULL_PMD);
+DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD, "max_nb_queue_pairs=<int> "
"max_nb_sessions=<int> socket_id=<int>");
#define NULL_CRYPTO_LOG_ERR(fmt, args...) \
RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
- CRYPTODEV_NAME_NULL_PMD, \
+ RTE_STR(CRYPTODEV_NAME_NULL_PMD), \
__func__, __LINE__, ## args)
#ifdef RTE_LIBRTE_NULL_CRYPTO_DEBUG
#define NULL_CRYPTO_LOG_INFO(fmt, args...) \
RTE_LOG(INFO, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
- CRYPTODEV_NAME_NULL_PMD, \
+ RTE_STR(CRYPTODEV_NAME_NULL_PMD), \
__func__, __LINE__, ## args)
#define NULL_CRYPTO_LOG_DBG(fmt, args...) \
RTE_LOG(DEBUG, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
- CRYPTODEV_NAME_NULL_PMD, \
+ RTE_STR(CRYPTODEV_NAME_NULL_PMD), \
__func__, __LINE__, ## args)
#else
#define NULL_CRYPTO_LOG_INFO(fmt, args...)
static struct rte_cryptodev_driver rte_qat_pmd = {
{
- .name = "rte_qat_pmd",
.id_table = pci_id_qat_map,
.drv_flags = RTE_PCI_DRV_NEED_MAPPING,
},
.init = rte_qat_pmd_init,
};
-PMD_REGISTER_DRIVER(pmd_qat_drv, qat);
-DRIVER_REGISTER_PCI_TABLE(qat, pci_id_qat_map);
+PMD_REGISTER_DRIVER(pmd_qat_drv, CRYPTODEV_NAME_QAT_SYM_PMD);
+DRIVER_REGISTER_PCI_TABLE(CRYPTODEV_NAME_QAT_SYM_PMD, pci_id_qat_map);
if (name == NULL)
return -EINVAL;
- ret = snprintf(name, size, "%s_%u", CRYPTODEV_NAME_SNOW3G_PMD,
+ ret = snprintf(name, size, "%s_%u", RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD),
unique_name_id++);
if (ret < 0)
return ret;
}
static struct rte_driver cryptodev_snow3g_pmd_drv = {
- .name = CRYPTODEV_NAME_SNOW3G_PMD,
.type = PMD_VDEV,
.init = cryptodev_snow3g_init,
.uninit = cryptodev_snow3g_uninit
};
-PMD_REGISTER_DRIVER(cryptodev_snow3g_pmd_drv, snow3g);
-DRIVER_REGISTER_PARAM_STRING(aesni_gcm, "max_nb_queue_pairs=<int> "
+PMD_REGISTER_DRIVER(cryptodev_snow3g_pmd_drv, CRYPTODEV_NAME_SNOW3G_PMD);
+DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD, "max_nb_queue_pairs=<int> "
"max_nb_sessions=<int> socket_id=<int>");
#define SNOW3G_LOG_ERR(fmt, args...) \
RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
- CRYPTODEV_NAME_SNOW3G_PMD, \
+ RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD), \
__func__, __LINE__, ## args)
#ifdef RTE_LIBRTE_SNOW3G_DEBUG
#define SNOW3G_LOG_INFO(fmt, args...) \
RTE_LOG(INFO, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
- CRYPTODEV_NAME_SNOW3G_PMD, \
+ RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD), \
__func__, __LINE__, ## args)
#define SNOW3G_LOG_DBG(fmt, args...) \
RTE_LOG(DEBUG, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
- CRYPTODEV_NAME_SNOW3G_PMD, \
+ RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD), \
__func__, __LINE__, ## args)
#else
#define SNOW3G_LOG_INFO(fmt, args...)
#include "rte_crypto.h"
#include "rte_dev.h"
-#define CRYPTODEV_NAME_NULL_PMD ("cryptodev_null_pmd")
+#define CRYPTODEV_NAME_NULL_PMD cryptodev_null_pmd
/**< Null crypto PMD device name */
-#define CRYPTODEV_NAME_AESNI_MB_PMD ("cryptodev_aesni_mb_pmd")
+#define CRYPTODEV_NAME_AESNI_MB_PMD cryptodev_aesni_mb_pmd
/**< AES-NI Multi buffer PMD device name */
-#define CRYPTODEV_NAME_AESNI_GCM_PMD ("cryptodev_aesni_gcm_pmd")
+#define CRYPTODEV_NAME_AESNI_GCM_PMD cryptodev_aesni_gcm_pmd
/**< AES-NI GCM PMD device name */
-#define CRYPTODEV_NAME_QAT_SYM_PMD ("cryptodev_qat_sym_pmd")
+#define CRYPTODEV_NAME_QAT_SYM_PMD cryptodev_qat_sym_pmd
/**< Intel QAT Symmetric Crypto PMD device name */
-#define CRYPTODEV_NAME_SNOW3G_PMD ("cryptodev_snow3g_pmd")
+#define CRYPTODEV_NAME_SNOW3G_PMD cryptodev_snow3g_pmd
/**< SNOW 3G PMD device name */
-#define CRYPTODEV_NAME_KASUMI_PMD ("cryptodev_kasumi_pmd")
+#define CRYPTODEV_NAME_KASUMI_PMD cryptodev_kasumi_pmd
/**< KASUMI PMD device name */
/** Crypto device type */