net/mrvl: remove DMA buffer size from configuration
authorTomasz Duszynski <tdu@semihalf.com>
Tue, 17 Oct 2017 09:49:54 +0000 (11:49 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 26 Oct 2017 00:33:00 +0000 (02:33 +0200)
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 <tdu@semihalf.com>
config/common_base
drivers/net/mrvl/mrvl_ethdev.c

index 75aa0e1..f842399 100644 (file)
@@ -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
index 4beaa1d..74491cc 100644 (file)
@@ -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) {