DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/3] crypto/mrvl: updates and bugfixes
@ 2017-10-17  7:17 Tomasz Duszynski
  2017-10-17  7:17 ` [dpdk-dev] [PATCH 1/3] crypto/mrvl: fix driver name in debug log Tomasz Duszynski
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Tomasz Duszynski @ 2017-10-17  7:17 UTC (permalink / raw)
  To: dev; +Cc: Tomasz Duszynski

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH 1/3] crypto/mrvl: fix driver name in debug log
  2017-10-17  7:17 [dpdk-dev] [PATCH 0/3] crypto/mrvl: updates and bugfixes Tomasz Duszynski
@ 2017-10-17  7:17 ` Tomasz Duszynski
  2017-10-17  7:17 ` [dpdk-dev] [PATCH 2/3] crypto/mrvl: fix enabling debug logs Tomasz Duszynski
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Tomasz Duszynski @ 2017-10-17  7:17 UTC (permalink / raw)
  To: dev; +Cc: Tomasz Duszynski

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 <tdu@semihalf.com>
---
 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH 2/3] crypto/mrvl: fix enabling debug logs
  2017-10-17  7:17 [dpdk-dev] [PATCH 0/3] crypto/mrvl: updates and bugfixes Tomasz Duszynski
  2017-10-17  7:17 ` [dpdk-dev] [PATCH 1/3] crypto/mrvl: fix driver name in debug log Tomasz Duszynski
@ 2017-10-17  7:17 ` Tomasz Duszynski
  2017-10-17  7:17 ` [dpdk-dev] [PATCH 3/3] crypto/mrvl: print message if dma mem is initialized Tomasz Duszynski
  2017-10-17 11:56 ` [dpdk-dev] [PATCH 0/3] crypto/mrvl: updates and bugfixes De Lara Guarch, Pablo
  3 siblings, 0 replies; 5+ messages in thread
From: Tomasz Duszynski @ 2017-10-17  7:17 UTC (permalink / raw)
  To: dev; +Cc: Tomasz Duszynski

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 <tdu@semihalf.com>
---
 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH 3/3] crypto/mrvl: print message if dma mem is initialized
  2017-10-17  7:17 [dpdk-dev] [PATCH 0/3] crypto/mrvl: updates and bugfixes Tomasz Duszynski
  2017-10-17  7:17 ` [dpdk-dev] [PATCH 1/3] crypto/mrvl: fix driver name in debug log Tomasz Duszynski
  2017-10-17  7:17 ` [dpdk-dev] [PATCH 2/3] crypto/mrvl: fix enabling debug logs Tomasz Duszynski
@ 2017-10-17  7:17 ` Tomasz Duszynski
  2017-10-17 11:56 ` [dpdk-dev] [PATCH 0/3] crypto/mrvl: updates and bugfixes De Lara Guarch, Pablo
  3 siblings, 0 replies; 5+ messages in thread
From: Tomasz Duszynski @ 2017-10-17  7:17 UTC (permalink / raw)
  To: dev; +Cc: Tomasz Duszynski

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 <tdu@semihalf.com>
---
 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH 0/3] crypto/mrvl: updates and bugfixes
  2017-10-17  7:17 [dpdk-dev] [PATCH 0/3] crypto/mrvl: updates and bugfixes Tomasz Duszynski
                   ` (2 preceding siblings ...)
  2017-10-17  7:17 ` [dpdk-dev] [PATCH 3/3] crypto/mrvl: print message if dma mem is initialized Tomasz Duszynski
@ 2017-10-17 11:56 ` De Lara Guarch, Pablo
  3 siblings, 0 replies; 5+ messages in thread
From: De Lara Guarch, Pablo @ 2017-10-17 11:56 UTC (permalink / raw)
  To: Tomasz Duszynski, dev



> -----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 <tdu@semihalf.com>
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-17 11:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-17  7:17 [dpdk-dev] [PATCH 0/3] crypto/mrvl: updates and bugfixes Tomasz Duszynski
2017-10-17  7:17 ` [dpdk-dev] [PATCH 1/3] crypto/mrvl: fix driver name in debug log Tomasz Duszynski
2017-10-17  7:17 ` [dpdk-dev] [PATCH 2/3] crypto/mrvl: fix enabling debug logs Tomasz Duszynski
2017-10-17  7:17 ` [dpdk-dev] [PATCH 3/3] crypto/mrvl: print message if dma mem is initialized Tomasz Duszynski
2017-10-17 11:56 ` [dpdk-dev] [PATCH 0/3] crypto/mrvl: updates and bugfixes De Lara Guarch, Pablo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).