[PATCH 0/3] crypto/mrvl: updates and bugfixes

STALE3267d

5 messages, 2 authors, 2017-10-17 · open the first message on its own page

[PATCH 0/3] crypto/mrvl: updates and bugfixes

From: Tomasz Duszynski <hidden>
Date: 2017-10-17 07:17:59

This patch series brings following changes:

* A few fixes related to printing debug messages
* Extra debug message in case dma object has been already initialized

Tomasz Duszynski (3):
  crypto/mrvl: fix driver name in debug log
  crypto/mrvl: use proper config option to enable debug logs
  crypto/mrvl: print message if dma mem object is already initialized

 drivers/crypto/mrvl/rte_mrvl_pmd.c         | 12 ++++++++----
 drivers/crypto/mrvl/rte_mrvl_pmd_private.h |  8 ++++----
 2 files changed, 12 insertions(+), 8 deletions(-)

--
2.7.4

[PATCH 1/3] crypto/mrvl: fix driver name in debug log

From: Tomasz Duszynski <hidden>
Date: 2017-10-17 07:18:00

Since CRYPTODEV_NAME_MRVL_CRYPTO_PMD is undefined RTE_STR() expands
it to "CRYPTODEV_NAME_MRVL_CRYPTO_PMD" instead of "crypto_mrvl".

This patch fixes that by using proper name definition in debug logs.

Fixes: 8a61c83af2fa ("crypto/mrvl: add mrvl crypto driver")

Signed-off-by: Tomasz Duszynski <redacted>
---
 drivers/crypto/mrvl/rte_mrvl_pmd_private.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/mrvl/rte_mrvl_pmd_private.h b/drivers/crypto/mrvl/rte_mrvl_pmd_private.h
index 2da14b8..7daef68 100644
--- a/drivers/crypto/mrvl/rte_mrvl_pmd_private.h
+++ b/drivers/crypto/mrvl/rte_mrvl_pmd_private.h
@@ -40,18 +40,18 @@
 
 #define MRVL_CRYPTO_LOG_ERR(fmt, args...) \
 	RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n",  \
-			RTE_STR(CRYPTODEV_NAME_MRVL_CRYPTO_PMD), \
+			RTE_STR(CRYPTODEV_NAME_MRVL_PMD), \
 			__func__, __LINE__, ## args)
 
 #ifdef RTE_LIBRTE_MRVL_CRYPTO_DEBUG
 #define MRVL_CRYPTO_LOG_INFO(fmt, args...) \
 	RTE_LOG(INFO, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
-			RTE_STR(CRYPTODEV_NAME_MRVL_CRYPTO_PMD), \
+			RTE_STR(CRYPTODEV_NAME_MRVL_PMD), \
 			__func__, __LINE__, ## args)
 
 #define MRVL_CRYPTO_LOG_DBG(fmt, args...) \
 	RTE_LOG(DEBUG, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
-			RTE_STR(CRYPTODEV_NAME_MRVL_CRYPTO_PMD), \
+			RTE_STR(CRYPTODEV_NAME_MRVL_PMD), \
 			__func__, __LINE__, ## args)
 
 #else
-- 
2.7.4

[PATCH 2/3] crypto/mrvl: fix enabling debug logs

From: Tomasz Duszynski <hidden>
Date: 2017-10-17 07:18:01

Using non-existent configuration option for enabling debug
messages will actually never enable them.

Fixes: 8a61c83af2fa ("crypto/mrvl: add mrvl crypto driver")

Signed-off-by: Tomasz Duszynski <redacted>
---
 drivers/crypto/mrvl/rte_mrvl_pmd_private.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/mrvl/rte_mrvl_pmd_private.h b/drivers/crypto/mrvl/rte_mrvl_pmd_private.h
index 7daef68..12c546c 100644
--- a/drivers/crypto/mrvl/rte_mrvl_pmd_private.h
+++ b/drivers/crypto/mrvl/rte_mrvl_pmd_private.h
@@ -43,7 +43,7 @@
 			RTE_STR(CRYPTODEV_NAME_MRVL_PMD), \
 			__func__, __LINE__, ## args)
 
-#ifdef RTE_LIBRTE_MRVL_CRYPTO_DEBUG
+#ifdef RTE_LIBRTE_PMD_MRVL_CRYPTO_DEBUG
 #define MRVL_CRYPTO_LOG_INFO(fmt, args...) \
 	RTE_LOG(INFO, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
 			RTE_STR(CRYPTODEV_NAME_MRVL_PMD), \
-- 
2.7.4

[PATCH 3/3] crypto/mrvl: print message if dma mem is initialized

From: Tomasz Duszynski <hidden>
Date: 2017-10-17 07:18:02

In case MUSDK dma memory has been already initialized by a different
driver (and perhaps do the different size) mv_sys_dma_mem_init()
will return -EEXIST error code.

Printing extra message makes it clear.

Signed-off-by: Tomasz Duszynski <redacted>
---
 drivers/crypto/mrvl/rte_mrvl_pmd.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/crypto/mrvl/rte_mrvl_pmd.c b/drivers/crypto/mrvl/rte_mrvl_pmd.c
index 0c540fa..e2bbfe0 100644
--- a/drivers/crypto/mrvl/rte_mrvl_pmd.c
+++ b/drivers/crypto/mrvl/rte_mrvl_pmd.c
@@ -41,9 +41,7 @@
 
 #include "rte_mrvl_pmd_private.h"
 
-#ifndef RTE_MRVL_MUSDK_DMA_MEMSIZE
-#define RTE_MRVL_MUSDK_DMA_MEMSIZE 41943040
-#endif
+#define MRVL_MUSDK_DMA_MEMSIZE 41943040
 
 static uint8_t cryptodev_driver_id;
 
@@ -766,9 +764,14 @@ cryptodev_mrvl_crypto_create(const char *name,
 	 * ret == -EEXIST is correct, it means DMA
 	 * has been already initialized.
 	 */
-	ret = mv_sys_dma_mem_init(RTE_MRVL_MUSDK_DMA_MEMSIZE);
-	if ((ret < 0) && (ret != -EEXIST))
-		return ret;
+	ret = mv_sys_dma_mem_init(MRVL_MUSDK_DMA_MEMSIZE);
+	if (ret < 0) {
+		if (ret != -EEXIST)
+			return ret;
+
+		MRVL_CRYPTO_LOG_INFO(
+			"DMA memory has been already initialized by a different driver.");
+	}
 
 	sam_params.max_num_sessions = internals->max_nb_sessions;
 
-- 
2.7.4

Re: [PATCH 0/3] crypto/mrvl: updates and bugfixes

From: De Lara Guarch, Pablo <hidden>
Date: 2017-10-17 11:56:06

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tomasz Duszynski
Sent: Tuesday, October 17, 2017 8:18 AM
To: dev@dpdk.org
Cc: Tomasz Duszynski <redacted>
Subject: [dpdk-dev] [PATCH 0/3] crypto/mrvl: updates and bugfixes

This patch series brings following changes:

* A few fixes related to printing debug messages
* Extra debug message in case dma object has been already initialized

Tomasz Duszynski (3):
  crypto/mrvl: fix driver name in debug log
  crypto/mrvl: use proper config option to enable debug logs
  crypto/mrvl: print message if dma mem object is already initialized

 drivers/crypto/mrvl/rte_mrvl_pmd.c         | 12 ++++++++----
 drivers/crypto/mrvl/rte_mrvl_pmd_private.h |  8 ++++----
 2 files changed, 12 insertions(+), 8 deletions(-)

--
2.7.4
I modified the last patch's title, as check-git-log.sh was complaining,
so make sure to run it next time you send patches.

Applied to dpdk-next-crypto.
Thanks,

Pablo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help