DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nipun Gupta <nipun.gupta@nxp.com>
To: thomas@monjalon.net, jerin.jacob@caviumnetworks.com
Cc: dev@dpdk.org, santosh.shukla@caviumnetworks.com,
	hemant.agrawal@nxp.com, shreyansh.jain@nxp.com,
	sunil.kori@nxp.com, Nipun Gupta <nipun.gupta@nxp.com>
Subject: [dpdk-dev] [PATCH 4/4] event/dpaa: fix portal allocation
Date: Mon,  5 Feb 2018 10:51:57 +0530	[thread overview]
Message-ID: <1517808117-28562-4-git-send-email-nipun.gupta@nxp.com> (raw)
In-Reply-To: <1517808117-28562-1-git-send-email-nipun.gupta@nxp.com>

Checking if portal has been allocated is now required at the
caller of rte_dpaa_portal_init() API. This patch adds check
in the dpaa eventdev driver.

Fixes: 5d944582d028 ("bus/dpaa: check portal presence in the caller function")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/event/dpaa/dpaa_eventdev.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index 7360fad..0006801 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -112,11 +112,13 @@
 	struct dpaa_port *portal = (struct dpaa_port *)port;
 	struct rte_mbuf *mbuf;
 
-	/* Affine current thread context to a qman portal */
-	ret = rte_dpaa_portal_init((void *)0);
-	if (ret) {
-		DPAA_EVENTDEV_ERR("Unable to initialize portal");
-		return ret;
+	if (unlikely(!RTE_PER_LCORE(dpaa_io))) {
+		/* Affine current thread context to a qman portal */
+		ret = rte_dpaa_portal_init((void *)0);
+		if (ret) {
+			DPAA_EVENTDEV_ERR("Unable to initialize portal");
+			return ret;
+		}
 	}
 
 	if (unlikely(!portal->is_port_linked)) {
-- 
1.9.1

  parent reply	other threads:[~2018-02-05  5:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-05  5:21 [dpdk-dev] [PATCH 1/4] bus/fslmc: fix registering dpaa2 mempool ops Nipun Gupta
2018-02-05  5:21 ` [dpdk-dev] [PATCH 2/4] bus/dpaa: fix registering dpaa " Nipun Gupta
2018-02-05  5:36   ` santosh
2018-02-05  6:31   ` Shreyansh Jain
2018-02-05  5:21 ` [dpdk-dev] [PATCH 3/4] event/dpaa: rename dpaa vdev with dpaa1 Nipun Gupta
2018-02-05 11:56   ` Hemant Agrawal
2018-02-05  5:21 ` Nipun Gupta [this message]
2018-02-05 11:53   ` [dpdk-dev] [PATCH 4/4] event/dpaa: fix portal allocation Hemant Agrawal
2018-02-05  6:32 ` [dpdk-dev] [PATCH 1/4] bus/fslmc: fix registering dpaa2 mempool ops Shreyansh Jain
2018-02-05 23:44   ` Thomas Monjalon

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=1517808117-28562-4-git-send-email-nipun.gupta@nxp.com \
    --to=nipun.gupta@nxp.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=santosh.shukla@caviumnetworks.com \
    --cc=shreyansh.jain@nxp.com \
    --cc=sunil.kori@nxp.com \
    --cc=thomas@monjalon.net \
    /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).