DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tomasz Duszynski <tdu@semihalf.com>
To: dev@dpdk.org
Cc: Tomasz Duszynski <tdu@semihalf.com>
Subject: [dpdk-dev] [PATCH] net/mrvl: remove MRVL_MUSDK_DMA_MEMSIZE from configuration
Date: Tue, 17 Oct 2017 11:49:54 +0200	[thread overview]
Message-ID: <1508233794-28068-1-git-send-email-tdu@semihalf.com> (raw)

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

             reply	other threads:[~2017-10-17  9:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17  9:49 Tomasz Duszynski [this message]
2017-10-23 17:34 ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1508233794-28068-1-git-send-email-tdu@semihalf.com \
    --to=tdu@semihalf.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).