From b32a42e4d69dbe1728b9199096b0d08dfb855d52 Mon Sep 17 00:00:00 2001 From: Tomasz Duszynski Date: Tue, 17 Oct 2017 11:49:54 +0200 Subject: [PATCH] net/mrvl: remove DMA buffer size from configuration RTE_MRVL_MUSDK_DMA_MEMSIZE can be removed from DPDK configuration as it's no longer used as a synchronization point for net and crypto mrvl pmds. Fixes: 0ddc9b815b11 ("net/mrvl: add net PMD skeleton") Signed-off-by: Tomasz Duszynski --- config/common_base | 1 - drivers/net/mrvl/mrvl_ethdev.c | 14 +++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/config/common_base b/config/common_base index 75aa0e1c06..f842399464 100644 --- a/config/common_base +++ b/config/common_base @@ -264,7 +264,6 @@ CONFIG_RTE_LIBRTE_NFP_DEBUG=n # Compile Marvell PMD driver # CONFIG_RTE_LIBRTE_MRVL_PMD=n -CONFIG_RTE_MRVL_MUSDK_DMA_MEMSIZE=41943040 # # Compile burst-oriented Broadcom BNXT PMD driver diff --git a/drivers/net/mrvl/mrvl_ethdev.c b/drivers/net/mrvl/mrvl_ethdev.c index 4beaa1d004..74491cc4d9 100644 --- a/drivers/net/mrvl/mrvl_ethdev.c +++ b/drivers/net/mrvl/mrvl_ethdev.c @@ -93,6 +93,9 @@ #define MRVL_COOKIE_HIGH_ADDR_SHIFT (sizeof(pp2_cookie_t) * 8) #define MRVL_COOKIE_HIGH_ADDR_MASK (~0ULL << MRVL_COOKIE_HIGH_ADDR_SHIFT) +/* Memory size (in bytes) for MUSDK dma buffers */ +#define MRVL_MUSDK_DMA_MEMSIZE 41943040 + static const char * const valid_args[] = { MRVL_IFACE_NAME_ARG, MRVL_CFG_ARG, @@ -2193,9 +2196,14 @@ rte_pmd_mrvl_probe(struct rte_vdev_device *vdev) * ret == -EEXIST is correct, it means DMA * has been already initialized (by another PMD). */ - ret = mv_sys_dma_mem_init(RTE_MRVL_MUSDK_DMA_MEMSIZE); - if (ret < 0 && ret != -EEXIST) - goto out_free_kvlist; + ret = mv_sys_dma_mem_init(MRVL_MUSDK_DMA_MEMSIZE); + if (ret < 0) { + if (ret != -EEXIST) + goto out_free_kvlist; + else + RTE_LOG(INFO, PMD, + "DMA memory has been already initialized by a different driver.\n"); + } ret = mrvl_init_pp2(); if (ret) { -- 2.20.1