DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/4] bus/fslmc: fix registering dpaa2 mempool ops
@ 2018-02-05  5:21 Nipun Gupta
  2018-02-05  5:21 ` [dpdk-dev] [PATCH 2/4] bus/dpaa: fix registering dpaa " Nipun Gupta
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Nipun Gupta @ 2018-02-05  5:21 UTC (permalink / raw)
  To: thomas, jerin.jacob
  Cc: dev, santosh.shukla, hemant.agrawal, shreyansh.jain, sunil.kori,
	Nipun Gupta

Fixes: 8824b74d8f5f ("bus/fslmc: register platform HW mempool on runtime")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
Though I have sent these patches yesterday, but they did not reach out.
If by any chance they have entered your mailbox before please ignore
the older patches.

 drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
index 1539739..f1f14e2 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
@@ -77,8 +77,8 @@
 	RTE_LOG(DEBUG, PMD, "DPAA2: Added [dpbp.%d]\n", dpbp_id);
 
 	if (!register_once) {
-		if (rte_mbuf_set_platform_mempool_ops(DPAA2_MEMPOOL_OPS_NAME))
-			register_once = 1;
+		rte_mbuf_set_platform_mempool_ops(DPAA2_MEMPOOL_OPS_NAME);
+		register_once = 1;
 	}
 
 	return 0;
-- 
1.9.1

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

* [dpdk-dev] [PATCH 2/4] bus/dpaa: fix registering dpaa mempool ops
  2018-02-05  5:21 [dpdk-dev] [PATCH 1/4] bus/fslmc: fix registering dpaa2 mempool ops Nipun Gupta
@ 2018-02-05  5:21 ` 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
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 10+ messages in thread
From: Nipun Gupta @ 2018-02-05  5:21 UTC (permalink / raw)
  To: thomas, jerin.jacob
  Cc: dev, santosh.shukla, hemant.agrawal, shreyansh.jain, sunil.kori,
	Nipun Gupta

Fixes: 2bd0d5b951a9 ("bus/dpaa: register platform HW mempool on runtime")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/bus/dpaa/dpaa_bus.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 1946bbe..290b967 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -495,10 +495,16 @@ int rte_dpaa_portal_fq_close(struct qman_fq *fq)
 			ret = drv->probe(drv, dev);
 			if (ret)
 				DPAA_BUS_ERR("Unable to probe.\n");
+
 			break;
 		}
 	}
-	rte_mbuf_set_platform_mempool_ops(DPAA_MEMPOOL_OPS_NAME);
+
+	/* Register DPAA mempool ops only if any DPAA device has
+	 * been detected.
+	 */
+	if (!TAILQ_EMPTY(&rte_dpaa_bus.device_list))
+		rte_mbuf_set_platform_mempool_ops(DPAA_MEMPOOL_OPS_NAME);
 
 	svr_file = fopen(DPAA_SOC_ID_FILE, "r");
 	if (svr_file) {
-- 
1.9.1

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

* [dpdk-dev] [PATCH 3/4] event/dpaa: rename dpaa vdev with dpaa1
  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:21 ` Nipun Gupta
  2018-02-05 11:56   ` Hemant Agrawal
  2018-02-05  5:21 ` [dpdk-dev] [PATCH 4/4] event/dpaa: fix portal allocation Nipun Gupta
  2018-02-05  6:32 ` [dpdk-dev] [PATCH 1/4] bus/fslmc: fix registering dpaa2 mempool ops Shreyansh Jain
  3 siblings, 1 reply; 10+ messages in thread
From: Nipun Gupta @ 2018-02-05  5:21 UTC (permalink / raw)
  To: thomas, jerin.jacob
  Cc: dev, santosh.shukla, hemant.agrawal, shreyansh.jain, sunil.kori,
	Nipun Gupta

DPAA2 eventdev is named as event_dpaa2 which conflicts with
event_dpaa when both are compiled in together. So event_dpaa
is required to renamed.

Fixes: 1ee9569576f6 ("config: enable dpaaX drivers for generic ARMv8")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 doc/guides/eventdevs/dpaa.rst      | 6 +++---
 drivers/event/dpaa/dpaa_eventdev.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/guides/eventdevs/dpaa.rst b/doc/guides/eventdevs/dpaa.rst
index 44ed128..7383295 100644
--- a/doc/guides/eventdevs/dpaa.rst
+++ b/doc/guides/eventdevs/dpaa.rst
@@ -111,16 +111,16 @@ The dpaa eventdev is exposed as a vdev device which consists of a set of channel
 and queues. On EAL initialization, dpaa components will be
 probed and then vdev device can be created from the application code by
 
-* Invoking ``rte_vdev_init("event_dpaa")`` from the application
+* Invoking ``rte_vdev_init("event_dpaa1")`` from the application
 
-* Using ``--vdev="event_dpaa"`` in the EAL options, which will call
+* Using ``--vdev="event_dpaa1"`` in the EAL options, which will call
   rte_vdev_init() internally
 
 Example:
 
 .. code-block:: console
 
-    ./your_eventdev_application --vdev="event_dpaa"
+    ./your_eventdev_application --vdev="event_dpaa1"
 
 Limitations
 -----------
diff --git a/drivers/event/dpaa/dpaa_eventdev.h b/drivers/event/dpaa/dpaa_eventdev.h
index 153f38d..918fe35 100644
--- a/drivers/event/dpaa/dpaa_eventdev.h
+++ b/drivers/event/dpaa/dpaa_eventdev.h
@@ -10,7 +10,7 @@
 #include <rte_atomic.h>
 #include <rte_per_lcore.h>
 
-#define EVENTDEV_NAME_DPAA_PMD		event_dpaa
+#define EVENTDEV_NAME_DPAA_PMD		event_dpaa1
 
 #define EVENTDEV_DRV_LOG(fmt, args...)	\
 		DPAA_EVENTDEV_INFO(fmt, ## args)
-- 
1.9.1

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

* [dpdk-dev] [PATCH 4/4] event/dpaa: fix portal allocation
  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:21 ` [dpdk-dev] [PATCH 3/4] event/dpaa: rename dpaa vdev with dpaa1 Nipun Gupta
@ 2018-02-05  5:21 ` Nipun Gupta
  2018-02-05 11:53   ` Hemant Agrawal
  2018-02-05  6:32 ` [dpdk-dev] [PATCH 1/4] bus/fslmc: fix registering dpaa2 mempool ops Shreyansh Jain
  3 siblings, 1 reply; 10+ messages in thread
From: Nipun Gupta @ 2018-02-05  5:21 UTC (permalink / raw)
  To: thomas, jerin.jacob
  Cc: dev, santosh.shukla, hemant.agrawal, shreyansh.jain, sunil.kori,
	Nipun Gupta

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

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

* Re: [dpdk-dev] [PATCH 2/4] bus/dpaa: fix registering dpaa mempool ops
  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
  1 sibling, 0 replies; 10+ messages in thread
From: santosh @ 2018-02-05  5:36 UTC (permalink / raw)
  To: Nipun Gupta, thomas, jerin.jacob
  Cc: dev, hemant.agrawal, shreyansh.jain, sunil.kori


On Monday 05 February 2018 10:51 AM, Nipun Gupta wrote:
> Fixes: 2bd0d5b951a9 ("bus/dpaa: register platform HW mempool on runtime")
>
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> ---
>  drivers/bus/dpaa/dpaa_bus.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
> index 1946bbe..290b967 100644
> --- a/drivers/bus/dpaa/dpaa_bus.c
> +++ b/drivers/bus/dpaa/dpaa_bus.c
> @@ -495,10 +495,16 @@ int rte_dpaa_portal_fq_close(struct qman_fq *fq)
>  			ret = drv->probe(drv, dev);
>  			if (ret)
>  				DPAA_BUS_ERR("Unable to probe.\n");
> +
>  			break;
>  		}
>  	}
> -	rte_mbuf_set_platform_mempool_ops(DPAA_MEMPOOL_OPS_NAME);
> +
> +	/* Register DPAA mempool ops only if any DPAA device has
> +	 * been detected.
> +	 */
> +	if (!TAILQ_EMPTY(&rte_dpaa_bus.device_list))
> +		rte_mbuf_set_platform_mempool_ops(DPAA_MEMPOOL_OPS_NAME);
>  

change will fix octeontx regression introduced by eal mempool patch.
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>

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

* Re: [dpdk-dev] [PATCH 2/4] bus/dpaa: fix registering dpaa mempool ops
  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
  1 sibling, 0 replies; 10+ messages in thread
From: Shreyansh Jain @ 2018-02-05  6:31 UTC (permalink / raw)
  To: Nipun Gupta
  Cc: dev, santosh.shukla, Hemant Agrawal, Sunil Kumar Kori, thomas,
	jerin.jacob

> -----Original Message-----
> From: Nipun Gupta
> Sent: Monday, February 5, 2018 10:52 AM
> To: thomas@monjalon.net; jerin.jacob@caviumnetworks.com
> Cc: dev@dpdk.org; santosh.shukla@caviumnetworks.com; Hemant Agrawal
> <hemant.agrawal@nxp.com>; Shreyansh Jain <shreyansh.jain@nxp.com>;
> Sunil Kumar Kori <sunil.kori@nxp.com>; Nipun Gupta
> <nipun.gupta@nxp.com>
> Subject: [PATCH 2/4] bus/dpaa: fix registering dpaa mempool ops
> 
> Fixes: 2bd0d5b951a9 ("bus/dpaa: register platform HW mempool on
> runtime")
> 
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> ---
>  drivers/bus/dpaa/dpaa_bus.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
> index 1946bbe..290b967 100644
> --- a/drivers/bus/dpaa/dpaa_bus.c
> +++ b/drivers/bus/dpaa/dpaa_bus.c
> @@ -495,10 +495,16 @@ int rte_dpaa_portal_fq_close(struct qman_fq *fq)
>                         ret = drv->probe(drv, dev);
>                         if (ret)
>                                 DPAA_BUS_ERR("Unable to probe.\n");
> +
>                         break;
>                 }
>         }
> -       rte_mbuf_set_platform_mempool_ops(DPAA_MEMPOOL_OPS_NAME);
> +
> +       /* Register DPAA mempool ops only if any DPAA device has
> +        * been detected.
> +        */
> +       if (!TAILQ_EMPTY(&rte_dpaa_bus.device_list))
> +
> rte_mbuf_set_platform_mempool_ops(DPAA_MEMPOOL_OPS_NAME);
> 
>         svr_file = fopen(DPAA_SOC_ID_FILE, "r");
>         if (svr_file) {
> --
> 1.9.1
> 

Just a note: there is an extra line insertion in this patch which is not related to the patch fix. Though, I think that makes the code more readable as preceding if() for this new line is without {}.

Acked-by: Shreyansh Jain <Shreyansh.jain@nxp.com>

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

* Re: [dpdk-dev] [PATCH 1/4] bus/fslmc: fix registering dpaa2 mempool ops
  2018-02-05  5:21 [dpdk-dev] [PATCH 1/4] bus/fslmc: fix registering dpaa2 mempool ops Nipun Gupta
                   ` (2 preceding siblings ...)
  2018-02-05  5:21 ` [dpdk-dev] [PATCH 4/4] event/dpaa: fix portal allocation Nipun Gupta
@ 2018-02-05  6:32 ` Shreyansh Jain
  2018-02-05 23:44   ` Thomas Monjalon
  3 siblings, 1 reply; 10+ messages in thread
From: Shreyansh Jain @ 2018-02-05  6:32 UTC (permalink / raw)
  To: Nipun Gupta, dev
  Cc: santosh.shukla, Hemant Agrawal, Sunil Kumar Kori, thomas, jerin.jacob

> -----Original Message-----
> From: Nipun Gupta
> Sent: Monday, February 5, 2018 10:52 AM
> To: thomas@monjalon.net; jerin.jacob@caviumnetworks.com
> Cc: dev@dpdk.org; santosh.shukla@caviumnetworks.com; Hemant Agrawal
> <hemant.agrawal@nxp.com>; Shreyansh Jain <shreyansh.jain@nxp.com>;
> Sunil Kumar Kori <sunil.kori@nxp.com>; Nipun Gupta
> <nipun.gupta@nxp.com>
> Subject: [PATCH 1/4] bus/fslmc: fix registering dpaa2 mempool ops
> 
> Fixes: 8824b74d8f5f ("bus/fslmc: register platform HW mempool on
> runtime")
> 
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> ---

Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>

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

* Re: [dpdk-dev] [PATCH 4/4] event/dpaa: fix portal allocation
  2018-02-05  5:21 ` [dpdk-dev] [PATCH 4/4] event/dpaa: fix portal allocation Nipun Gupta
@ 2018-02-05 11:53   ` Hemant Agrawal
  0 siblings, 0 replies; 10+ messages in thread
From: Hemant Agrawal @ 2018-02-05 11:53 UTC (permalink / raw)
  To: Nipun Gupta, thomas, jerin.jacob
  Cc: dev, santosh.shukla, shreyansh.jain, sunil.kori

On 2/5/2018 10:51 AM, Nipun Gupta wrote:
> 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(-)
> 
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
<snip..>

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

* Re: [dpdk-dev] [PATCH 3/4] event/dpaa: rename dpaa vdev with dpaa1
  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
  0 siblings, 0 replies; 10+ messages in thread
From: Hemant Agrawal @ 2018-02-05 11:56 UTC (permalink / raw)
  To: Nipun Gupta, thomas, jerin.jacob
  Cc: dev, santosh.shukla, shreyansh.jain, sunil.kori

On 2/5/2018 10:51 AM, Nipun Gupta wrote:
> DPAA2 eventdev is named as event_dpaa2 which conflicts with
> event_dpaa when both are compiled in together. So event_dpaa
> is required to renamed.
> 
> Fixes: 1ee9569576f6 ("config: enable dpaaX drivers for generic ARMv8")
> 
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> ---
>   doc/guides/eventdevs/dpaa.rst      | 6 +++---
>   drivers/event/dpaa/dpaa_eventdev.h | 2 +-
>   2 files changed, 4 insertions(+), 4 deletions(-)
> 

Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
<snip..>

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

* Re: [dpdk-dev] [PATCH 1/4] bus/fslmc: fix registering dpaa2 mempool ops
  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
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Monjalon @ 2018-02-05 23:44 UTC (permalink / raw)
  To: Nipun Gupta
  Cc: dev, Shreyansh Jain, santosh.shukla, Hemant Agrawal,
	Sunil Kumar Kori, jerin.jacob

> > Fixes: 8824b74d8f5f ("bus/fslmc: register platform HW mempool on
> > runtime")
> > 
> > Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> 
> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>

Series applied, thanks

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

end of thread, other threads:[~2018-02-05 23:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [dpdk-dev] [PATCH 4/4] event/dpaa: fix portal allocation Nipun Gupta
2018-02-05 11:53   ` 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

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