From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 5AA498D3D for ; Fri, 8 Jul 2016 18:45:00 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 08 Jul 2016 09:44:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,330,1464678000"; d="scan'208";a="991519345" Received: from sie-lab-212-116.ir.intel.com (HELO silpixa00378492.ir.intel.com) ([10.237.212.116]) by orsmga001.jf.intel.com with ESMTP; 08 Jul 2016 09:44:54 -0700 From: Pablo de Lara To: dev@dpdk.org Cc: Pablo de Lara , Neil Horman , Bruce Richardson , Thomas Monjalon , Stephen Hemminger , Panu Matilainen Date: Fri, 8 Jul 2016 17:46:51 +0100 Message-Id: <1467996411-7939-1-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1467995655-7261-1-git-send-email-pablo.de.lara.guarch@intel.com> References: <1467995655-7261-1-git-send-email-pablo.de.lara.guarch@intel.com> Subject: [dpdk-dev] [PATCH v3] crypto: normalize cryptodev pmd names with macros X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jul 2016 16:45:01 -0000 Recently reported, the introduction of pmd information exports led to a breakage of cryptodev unit tests because the test infrastructure relies on the cryptodev names being available in macros. This patch fixes the pmd naming to use the macro names. Note that the macro names were already pre-stringified, which won't work as the PMD_REGISTER_DRIVER macro requires the name in both a processing token and stringified form. As such the names are defined now as tokens, and converted where needed to stringified form on demand using RTE_STR. Tested using the null and aesni_mb crypto pmds, as I don't have hardware for any other device. Also not build tested on snow3g or kasumi pmd because building those requires external libraries that appear to not be open source licensed. Signed-off-by: Neil Horman Signed-off-by: Pablo de Lara CC: Bruce Richardson CC: Thomas Monjalon CC: "De Lara Guarch, Pablo" CC: Stephen Hemminger CC: Panu Matilainen --- Changes in v3: - Rebased against HEAD Changes in v2: - Fixed compilation issue on snow3g/kasumi pmd - Removed static name of qat pmd app/test/test_cryptodev.c | 20 ++++++++++---------- app/test/test_cryptodev_perf.c | 18 +++++++++--------- drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 7 +++---- drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h | 6 +++--- drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 7 +++---- drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h | 2 +- drivers/crypto/kasumi/rte_kasumi_pmd.c | 7 +++---- drivers/crypto/kasumi/rte_kasumi_pmd_private.h | 6 +++--- drivers/crypto/null/null_crypto_pmd.c | 7 +++---- drivers/crypto/null/null_crypto_pmd_private.h | 6 +++--- drivers/crypto/qat/rte_qat_cryptodev.c | 5 ++--- drivers/crypto/snow3g/rte_snow3g_pmd.c | 7 +++---- drivers/crypto/snow3g/rte_snow3g_pmd_private.h | 6 +++--- lib/librte_cryptodev/rte_cryptodev.h | 12 ++++++------ 14 files changed, 55 insertions(+), 61 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index fbfe1d0..1e1f887 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -186,12 +186,12 @@ testsuite_setup(void) 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)); } } } @@ -203,10 +203,10 @@ testsuite_setup(void) 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)); } } } @@ -217,10 +217,10 @@ testsuite_setup(void) 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)); } } } @@ -231,10 +231,10 @@ testsuite_setup(void) 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)); } } } @@ -246,12 +246,12 @@ testsuite_setup(void) 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)); } } } diff --git a/app/test/test_cryptodev_perf.c b/app/test/test_cryptodev_perf.c index d728211..815c41f 100644 --- a/app/test/test_cryptodev_perf.c +++ b/app/test/test_cryptodev_perf.c @@ -120,15 +120,15 @@ static const char *chain_mode_name(enum chain_mode mode) 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 ""; } @@ -249,11 +249,11 @@ testsuite_setup(void) 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)); } } } @@ -264,11 +264,11 @@ testsuite_setup(void) 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)); } } } diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c index f43e407..f9be44a 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c @@ -57,7 +57,7 @@ create_unique_device_name(char *name, size_t size) 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; @@ -515,12 +515,11 @@ aesni_gcm_uninit(const char *name) } 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= " +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= " "max_nb_sessions= socket_id="); diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h index a42f941..9878d6e 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h @@ -37,18 +37,18 @@ #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...) diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c index 859a04b..2140b92 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c @@ -54,7 +54,7 @@ create_unique_device_name(char *name, size_t size) 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; @@ -715,12 +715,11 @@ cryptodev_aesni_mb_uninit(const char *name) } 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= " +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= " "max_nb_sessions= socket_id="); diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h index 949d9a6..17f367f 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h @@ -37,7 +37,7 @@ #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 diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c index 1d5af46..400a248 100644 --- a/drivers/crypto/kasumi/rte_kasumi_pmd.c +++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c @@ -61,7 +61,7 @@ create_unique_device_name(char *name, size_t size) 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; @@ -648,12 +648,11 @@ cryptodev_kasumi_uninit(const char *name) } 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= " +PMD_REGISTER_DRIVER(cryptodev_kasumi_pmd_drv, CRYPTODEV_NAME_KASUMI_PMD); +DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD, "max_nb_queue_pairs= " "max_nb_sessions= socket_id="); diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h index 04e1c43..fb586ca 100644 --- a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h +++ b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h @@ -37,18 +37,18 @@ #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...) diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c index 0a195ed..e03d0eb 100644 --- a/drivers/crypto/null/null_crypto_pmd.c +++ b/drivers/crypto/null/null_crypto_pmd.c @@ -51,7 +51,7 @@ create_unique_device_name(char *name, size_t size) 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; @@ -269,12 +269,11 @@ cryptodev_null_uninit(const char *name) } 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= " +PMD_REGISTER_DRIVER(cryptodev_null_pmd_drv, CRYPTODEV_NAME_NULL_PMD); +DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD, "max_nb_queue_pairs= " "max_nb_sessions= socket_id="); diff --git a/drivers/crypto/null/null_crypto_pmd_private.h b/drivers/crypto/null/null_crypto_pmd_private.h index 2a4c739..acebc97 100644 --- a/drivers/crypto/null/null_crypto_pmd_private.h +++ b/drivers/crypto/null/null_crypto_pmd_private.h @@ -37,18 +37,18 @@ #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...) diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c b/drivers/crypto/qat/rte_qat_cryptodev.c index b35267e..82ab047 100644 --- a/drivers/crypto/qat/rte_qat_cryptodev.c +++ b/drivers/crypto/qat/rte_qat_cryptodev.c @@ -114,7 +114,6 @@ crypto_qat_dev_init(__attribute__((unused)) struct rte_cryptodev_driver *crypto_ 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, }, @@ -134,6 +133,6 @@ static struct rte_driver pmd_qat_drv = { .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); diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c index ddb724c..a474a4d 100644 --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c @@ -60,7 +60,7 @@ create_unique_device_name(char *name, size_t size) 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; @@ -639,12 +639,11 @@ cryptodev_snow3g_uninit(const char *name) } 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= " +PMD_REGISTER_DRIVER(cryptodev_snow3g_pmd_drv, CRYPTODEV_NAME_SNOW3G_PMD); +DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD, "max_nb_queue_pairs= " "max_nb_sessions= socket_id="); diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h index b383cbc..03973b9 100644 --- a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h +++ b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h @@ -37,18 +37,18 @@ #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...) diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h index 7768f0a..4c02307 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -49,17 +49,17 @@ extern "C" { #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 */ -- 2.7.4