All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nipun Gupta <nipun.gupta@nxp.com>
To: <dev@dpdk.org>
Cc: <hemant.agrawal@nxp.com>, <jerin.jacob@caviumnetworks.com>,
	<harry.van.haaren@intel.com>, <bruce.richardson@intel.com>,
	<gage.eads@intel.com>, <shreyansh.jain@nxp.com>,
	Nipun Gupta <nipun.gupta@nxp.com>
Subject: [PATCH 10/21 v4] bus/fslmc: adding cpu support in stashing config
Date: Thu, 29 Jun 2017 15:57:54 +0530	[thread overview]
Message-ID: <1498732085-18449-11-git-send-email-nipun.gupta@nxp.com> (raw)
In-Reply-To: <1498732085-18449-1-git-send-email-nipun.gupta@nxp.com>

Stashing can also be configured by other drivers (for instance
event driver) passing cpu_id as an argument. This change
facilitates the same.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.c    | 14 ++++++--------
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.h    |  4 ++++
 drivers/bus/fslmc/rte_bus_fslmc_version.map |  2 ++
 3 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
index 730555f..63378f0 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
@@ -172,10 +172,9 @@
 }
 
 static int
-dpaa2_configure_stashing(struct dpaa2_dpio_dev *dpio_dev)
+dpaa2_configure_stashing(struct dpaa2_dpio_dev *dpio_dev, int cpu_id)
 {
-	int sdest;
-	int cpu_id, ret;
+	int sdest, ret;
 	static int first_time;
 
 	/* find the SoC type for the first time */
@@ -194,7 +193,6 @@
 	}
 
 	/* Set the Stashing Destination */
-	cpu_id = rte_lcore_id();
 	if (cpu_id < 0) {
 		cpu_id = rte_get_master_lcore();
 		if (cpu_id < 0) {
@@ -220,7 +218,7 @@
 	return 0;
 }
 
-static inline struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(void)
+struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(int cpu_id)
 {
 	struct dpaa2_dpio_dev *dpio_dev = NULL;
 	int ret;
@@ -236,7 +234,7 @@ static inline struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(void)
 	PMD_DRV_LOG(DEBUG, "New Portal=0x%x (%d) affined thread - %lu",
 		    dpio_dev, dpio_dev->index, syscall(SYS_gettid));
 
-	ret = dpaa2_configure_stashing(dpio_dev);
+	ret = dpaa2_configure_stashing(dpio_dev, cpu_id);
 	if (ret)
 		PMD_DRV_LOG(ERR, "dpaa2_configure_stashing failed");
 
@@ -276,7 +274,7 @@ static inline struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(void)
 	}
 
 	/* Populate the dpaa2_io_portal structure */
-	dpaa2_io_portal[lcore_id].dpio_dev = dpaa2_get_qbman_swp();
+	dpaa2_io_portal[lcore_id].dpio_dev = dpaa2_get_qbman_swp(lcore_id);
 
 	if (dpaa2_io_portal[lcore_id].dpio_dev) {
 		RTE_PER_LCORE(_dpaa2_io).dpio_dev
@@ -322,7 +320,7 @@ static inline struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(void)
 	}
 
 	/* Populate the dpaa2_io_portal structure */
-	dpaa2_io_portal[lcore_id].sec_dpio_dev = dpaa2_get_qbman_swp();
+	dpaa2_io_portal[lcore_id].sec_dpio_dev = dpaa2_get_qbman_swp(lcore_id);
 
 	if (dpaa2_io_portal[lcore_id].sec_dpio_dev) {
 		RTE_PER_LCORE(_dpaa2_io).sec_dpio_dev
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
index f2e1168..4269800 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
@@ -53,6 +53,10 @@ struct dpaa2_io_portal_t {
 #define DPAA2_PER_LCORE_SEC_DPIO RTE_PER_LCORE(_dpaa2_io).sec_dpio_dev
 #define DPAA2_PER_LCORE_SEC_PORTAL DPAA2_PER_LCORE_SEC_DPIO->sw_portal
 
+extern struct dpaa2_io_portal_t dpaa2_io_portal[RTE_MAX_LCORE];
+
+struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(int cpu_id);
+
 /* Affine a DPIO portal to current processing thread */
 int dpaa2_affine_qbman_swp(void);
 
diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map
index cf7c0ee..4509051 100644
--- a/drivers/bus/fslmc/rte_bus_fslmc_version.map
+++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map
@@ -53,6 +53,8 @@ DPDK_17.05 {
 DPDK_17.08 {
 	global:
 
+	dpaa2_io_portal;
+	dpaa2_get_qbman_swp;
 	dpci_set_rx_queue;
 	dpcon_open;
 	dpcon_get_attributes;
-- 
1.9.1

  parent reply	other threads:[~2017-06-29 10:29 UTC|newest]

Thread overview: 98+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1495735361-4840-1-git-send-email-nipun.gupta@nxp.com>
2017-06-15  8:58 ` [PATCH 00/20 v2] next-eventdev: NXP DPAA2 eventdev PMD Nipun Gupta
2017-06-15  8:58   ` [PATCH 01/20 v2] event/dpaa2: add basic build infrastructure Nipun Gupta
2017-06-15  8:58   ` [PATCH 02/20 v2] bus/fslmc: generic framework for mc object creation Nipun Gupta
2017-06-15  8:58   ` [PATCH 03/20 v2] bus/fslmc: integrating dpio and dpbp to object framework Nipun Gupta
2017-06-15  8:58   ` [PATCH 04/20 v2] bus/fslmc: adding basic dpcon support Nipun Gupta
2017-06-15  8:58   ` [PATCH 05/20 v2] bus/fslmc: export qbman dqrr funcs for eventdev usages Nipun Gupta
2017-06-15  8:58   ` [PATCH 06/20 v2] event/dpaa2: register dpcon as dpaa2 device for bus scan Nipun Gupta
2017-06-15  8:58   ` [PATCH 07/20 v2] bus/fslmc: adding basic dpci support Nipun Gupta
2017-06-15  8:58   ` [PATCH 08/20 v2] bus/fslmc: register dpci as dpaa2 device for bus scan Nipun Gupta
2017-06-15  8:58   ` [PATCH 09/20 v2] bus/fslmc: adding cpu support in stashing config Nipun Gupta
2017-06-15  8:58   ` [PATCH 10/20 v2] event/dpaa2: add initialization of event device Nipun Gupta
2017-06-15  8:58   ` [PATCH 11/20 v2] bus/fslmc: add support for static dequeue from portal Nipun Gupta
2017-06-15  8:58   ` [PATCH 12/20 v2] event/dpaa2: add configuration functions Nipun Gupta
2017-06-15  8:58   ` [PATCH 13/20 v2] bus/fslmc: support enqueue with multiple enqueue descriptors Nipun Gupta
2017-06-15  8:58   ` [PATCH 14/20 v2] bus/fslmc: add callback per queue to enable Nipun Gupta
2017-06-15  8:58   ` [PATCH 15/20 v2] bus/fslmc: change func argument to const to avoid warning Nipun Gupta
2017-06-15  8:58   ` [PATCH 16/20 v2] event/dpaa2: add enqueue and dequeue functionality Nipun Gupta
2017-06-15  8:58   ` [PATCH 17/20 v2] fslmc/bus: add interrupt enabling routine Nipun Gupta
2017-06-15  8:58   ` [PATCH 18/20 v2] bus/fslmc: enable portal interrupt handling Nipun Gupta
2017-06-15  8:58   ` [PATCH 19/20 v2] event/dpaa2: handle timeout using interrupts in dequeue Nipun Gupta
2017-06-15  8:58   ` [PATCH 20/20 v2] doc: add NXP DPAA2 EVENTDEV details Nipun Gupta
2017-06-28 13:51   ` [PATCH 00/20 v2] next-eventdev: NXP DPAA2 eventdev PMD Nipun Gupta
2017-06-29  6:39     ` Jerin Jacob
2017-06-28 15:15 ` [PATCH 00/21 v3] " Nipun Gupta
2017-06-28 15:15   ` [PATCH 01/21 v3] drivers: add bus dependency for event Nipun Gupta
2017-06-28 15:15   ` [PATCH 02/21 v3] event/dpaa2: add basic build infrastructure Nipun Gupta
2017-06-28 15:15   ` [PATCH 03/21 v3] bus/fslmc: generic framework for mc object creation Nipun Gupta
2017-06-28 15:15   ` [PATCH 04/21 v3] bus/fslmc: integrating dpio and dpbp to object framework Nipun Gupta
2017-06-28 15:15   ` [PATCH 05/21 v3] bus/fslmc: adding basic dpcon support Nipun Gupta
2017-06-28 15:15   ` [PATCH 06/21 v3] bus/fslmc: export qbman dqrr funcs for eventdev usages Nipun Gupta
2017-06-28 15:15   ` [PATCH 07/21 v3] event/dpaa2: register dpcon as dpaa2 device for bus scan Nipun Gupta
2017-06-28 15:15   ` [PATCH 08/21 v3] bus/fslmc: adding basic dpci support Nipun Gupta
2017-06-28 15:15   ` [PATCH 09/21 v3] bus/fslmc: register dpci as dpaa2 device for bus scan Nipun Gupta
2017-06-28 15:15   ` [PATCH 10/21 v3] bus/fslmc: adding cpu support in stashing config Nipun Gupta
2017-06-28 15:15   ` [PATCH 11/21 v3] event/dpaa2: add initialization of event device Nipun Gupta
2017-06-28 15:15   ` [PATCH 12/21 v3] bus/fslmc: add support for static dequeue from portal Nipun Gupta
2017-06-28 15:15   ` [PATCH 13/21 v3] event/dpaa2: add configuration functions Nipun Gupta
2017-06-28 15:15   ` [PATCH 14/21 v3] bus/fslmc: support enqueue with multiple enqueue descriptors Nipun Gupta
2017-06-28 15:15   ` [PATCH 15/21 v3] bus/fslmc: add callback per queue to enable Nipun Gupta
2017-06-28 15:15   ` [PATCH 16/21 v3] bus/fslmc: change func argument to const to avoid warning Nipun Gupta
2017-06-28 15:16   ` [PATCH 17/21 v3] event/dpaa2: add enqueue and dequeue functionality Nipun Gupta
2017-06-28 15:16   ` [PATCH 18/21 v3] fslmc/bus: add interrupt enabling routine Nipun Gupta
2017-06-28 15:16   ` [PATCH 19/21 v3] bus/fslmc: enable portal interrupt handling Nipun Gupta
2017-06-28 15:16   ` [PATCH 20/21 v3] event/dpaa2: handle timeout using interrupts in dequeue Nipun Gupta
2017-06-28 15:16   ` [PATCH 21/21 v3] doc: add NXP DPAA2 EVENTDEV details Nipun Gupta
2017-06-29  9:25     ` Jerin Jacob
2017-06-29 10:27       ` Nipun Gupta
2017-06-29  5:15   ` [PATCH 00/21 v3] next-eventdev: NXP DPAA2 eventdev PMD Hemant Agrawal
2017-06-29 10:27 ` [PATCH 00/21 v4] " Nipun Gupta
2017-06-29 10:27   ` [PATCH 01/21 v4] drivers: add bus dependency for event Nipun Gupta
2017-06-29 10:27   ` [PATCH 02/21 v4] event/dpaa2: add basic build infrastructure Nipun Gupta
2017-06-29 10:27   ` [PATCH 03/21 v4] bus/fslmc: generic framework for mc object creation Nipun Gupta
2017-06-29 10:27   ` [PATCH 04/21 v4] bus/fslmc: integrating dpio and dpbp to object framework Nipun Gupta
2017-06-29 10:27   ` [PATCH 05/21 v4] bus/fslmc: adding basic dpcon support Nipun Gupta
2017-06-29 10:27   ` [PATCH 06/21 v4] bus/fslmc: export qbman dqrr funcs for eventdev usages Nipun Gupta
2017-06-29 10:27   ` [PATCH 07/21 v4] event/dpaa2: register dpcon as dpaa2 device for bus scan Nipun Gupta
2017-06-29 10:27   ` [PATCH 08/21 v4] bus/fslmc: adding basic dpci support Nipun Gupta
2017-06-29 10:27   ` [PATCH 09/21 v4] bus/fslmc: register dpci as dpaa2 device for bus scan Nipun Gupta
2017-06-29 10:27   ` Nipun Gupta [this message]
2017-06-29 10:27   ` [PATCH 11/21 v4] event/dpaa2: add initialization of event device Nipun Gupta
2017-06-29 10:27   ` [PATCH 12/21 v4] bus/fslmc: add support for static dequeue from portal Nipun Gupta
2017-06-29 10:27   ` [PATCH 13/21 v4] event/dpaa2: add configuration functions Nipun Gupta
2017-06-29 10:27   ` [PATCH 14/21 v4] bus/fslmc: support enqueue with multiple enqueue descriptors Nipun Gupta
2017-06-29 10:27   ` [PATCH 15/21 v4] bus/fslmc: add callback per queue to enable Nipun Gupta
2017-06-29 10:28   ` [PATCH 16/21 v4] bus/fslmc: change func argument to const to avoid warning Nipun Gupta
2017-06-29 10:28   ` [PATCH 17/21 v4] event/dpaa2: add enqueue and dequeue functionality Nipun Gupta
2017-06-29 10:28   ` [PATCH 18/21 v4] fslmc/bus: add interrupt enabling routine Nipun Gupta
2017-06-29 10:28   ` [PATCH 19/21 v4] bus/fslmc: enable portal interrupt handling Nipun Gupta
2017-06-29 10:28   ` [PATCH 20/21 v4] event/dpaa2: handle timeout using interrupts in dequeue Nipun Gupta
2017-06-29 10:28   ` [PATCH 21/21 v4] doc: add NXP DPAA2 EVENTDEV details Nipun Gupta
2017-06-29 11:03   ` [PATCH 00/21 v4] next-eventdev: NXP DPAA2 eventdev PMD Jerin Jacob
2017-06-30  7:30     ` Nipun Gupta
2017-06-30  8:54 ` [PATCH 00/21 v5] " Nipun Gupta
2017-06-30  8:54   ` [PATCH 01/21 v5] drivers: add bus dependency for event Nipun Gupta
2017-06-30  8:54   ` [PATCH 02/21 v5] event/dpaa2: add basic build infrastructure Nipun Gupta
2017-06-30  8:54   ` [PATCH 03/21 v5] bus/fslmc: generic framework for mc object creation Nipun Gupta
2017-06-30  8:54   ` [PATCH 04/21 v5] bus/fslmc: integrating dpio and dpbp to object framework Nipun Gupta
2017-06-30  8:54   ` [PATCH 05/21 v5] bus/fslmc: adding basic dpcon support Nipun Gupta
2017-06-30  8:54   ` [PATCH 06/21 v5] bus/fslmc: export qbman dqrr funcs for eventdev usages Nipun Gupta
2017-06-30  8:54   ` [PATCH 07/21 v5] event/dpaa2: register dpcon as dpaa2 device for bus scan Nipun Gupta
2017-06-30  8:54   ` [PATCH 08/21 v5] bus/fslmc: adding basic dpci support Nipun Gupta
2017-06-30  8:54   ` [PATCH 09/21 v5] bus/fslmc: register dpci as dpaa2 device for bus scan Nipun Gupta
2017-06-30  8:54   ` [PATCH 10/21 v5] bus/fslmc: adding cpu support in stashing config Nipun Gupta
2017-06-30  8:54   ` [PATCH 11/21 v5] event/dpaa2: add initialization of event device Nipun Gupta
2017-06-30  8:54   ` [PATCH 12/21 v5] bus/fslmc: add support for static dequeue from portal Nipun Gupta
2017-06-30  8:54   ` [PATCH 13/21 v5] event/dpaa2: add configuration functions Nipun Gupta
2017-06-30  8:54   ` [PATCH 14/21 v5] bus/fslmc: support enqueue with multiple enqueue descriptors Nipun Gupta
2017-06-30  8:54   ` [PATCH 15/21 v5] bus/fslmc: add callback per queue to enable Nipun Gupta
2017-06-30  8:54   ` [PATCH 16/21 v5] bus/fslmc: change func argument to const to avoid warning Nipun Gupta
2017-06-30  8:54   ` [PATCH 17/21 v5] event/dpaa2: add enqueue and dequeue functionality Nipun Gupta
2017-06-30  8:54   ` [PATCH 18/21 v5] bus/fslmc: add interrupt enabling routine Nipun Gupta
2017-06-30  8:54   ` [PATCH 19/21 v5] bus/fslmc: enable portal interrupt handling Nipun Gupta
2017-06-30  8:54   ` [PATCH 20/21 v5] event/dpaa2: handle timeout using interrupts in dequeue Nipun Gupta
2017-06-30  8:54   ` [PATCH 21/21 v5] doc: add NXP DPAA2 EVENTDEV details Nipun Gupta
2017-06-30 12:13     ` Mcnamara, John
2017-07-01 12:24       ` Jerin Jacob
2017-07-04  6:55     ` Jerin Jacob
2017-07-01 12:28   ` [PATCH 00/21 v5] next-eventdev: NXP DPAA2 eventdev PMD Jerin Jacob

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=1498732085-18449-11-git-send-email-nipun.gupta@nxp.com \
    --to=nipun.gupta@nxp.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=gage.eads@intel.com \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=shreyansh.jain@nxp.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.