From: Tomasz Duszynski Date: Tue, 17 Oct 2017 07:17:48 +0000 (+0200) Subject: crypto/mrvl: print message if DMA mem is initialized X-Git-Tag: spdx-start~1205 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5f4a38008da5861cbb4a2cc5718c7d4401cc9452;p=dpdk.git crypto/mrvl: print message if DMA mem is initialized 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 --- diff --git a/drivers/crypto/mrvl/rte_mrvl_pmd.c b/drivers/crypto/mrvl/rte_mrvl_pmd.c index 0c540fae9c..e2bbfe02df 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;