From 8be94df6e9f5f70516cb86d82dd04fefaa0fe8b3 Mon Sep 17 00:00:00 2001
From: Ricardo Salveti <ricardo.salveti@linaro.org>
Date: Mon, 18 Jul 2016 15:30:06 -0300
Subject: Imported Upstream version 16.07-rc2

Change-Id: Ie9e8ec528a2a0dace085c5e44aa7fa3b489d4ba0
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
---
 drivers/crypto/snow3g/rte_snow3g_pmd.c         | 9 ++++++---
 drivers/crypto/snow3g/rte_snow3g_pmd_private.h | 6 +++---
 2 files changed, 9 insertions(+), 6 deletions(-)

(limited to 'drivers/crypto/snow3g')

diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index dc8de6bd..87cd070a 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,10 +639,13 @@ 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);
+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>");
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
index b383cbcb..03973b97 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...)
-- 
cgit 1.2.3-korg