DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mrvl: remove MRVL_MUSDK_DMA_MEMSIZE from configuration
@ 2017-10-17  9:49 Tomasz Duszynski
  2017-10-23 17:34 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Tomasz Duszynski @ 2017-10-17  9:49 UTC (permalink / raw)
  To: dev; +Cc: Tomasz Duszynski

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.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
---
 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 d9471e8..c87a26b 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 4beaa1d..74491cc 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.7.4

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

* Re: [dpdk-dev] [PATCH] net/mrvl: remove MRVL_MUSDK_DMA_MEMSIZE from configuration
  2017-10-17  9:49 [dpdk-dev] [PATCH] net/mrvl: remove MRVL_MUSDK_DMA_MEMSIZE from configuration Tomasz Duszynski
@ 2017-10-23 17:34 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2017-10-23 17:34 UTC (permalink / raw)
  To: Tomasz Duszynski, dev

On 10/17/2017 2:49 AM, Tomasz Duszynski wrote:
> 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.
> 
> Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>

Applied to dpdk-next-net/master, thanks.

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-17  9:49 [dpdk-dev] [PATCH] net/mrvl: remove MRVL_MUSDK_DMA_MEMSIZE from configuration Tomasz Duszynski
2017-10-23 17:34 ` Ferruh Yigit

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).