From: Nipun Gupta Date: Mon, 5 Feb 2018 05:21:57 +0000 (+0530) Subject: event/dpaa: fix portal allocation X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5b8526445d53aa172abf77076ffc952a5c6d2d17;p=dpdk.git event/dpaa: fix portal allocation 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 Acked-by: Hemant Agrawal --- diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c index 7360fad1bb..00068015e9 100644 --- a/drivers/event/dpaa/dpaa_eventdev.c +++ b/drivers/event/dpaa/dpaa_eventdev.c @@ -112,11 +112,13 @@ dpaa_event_dequeue_burst(void *port, struct rte_event ev[], 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)) {