DPDK patches and discussions
 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: [dpdk-dev] [PATCH 11/20] bus/fslmc: add support for static dequeue from portal
Date: Thu, 25 May 2017 23:37:42 +0530	[thread overview]
Message-ID: <1495735671-4917-12-git-send-email-nipun.gupta@nxp.com> (raw)
In-Reply-To: <1495735671-4917-1-git-send-email-nipun.gupta@nxp.com>

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/bus/fslmc/mc/dpio.c                 | 44 +++++++++++++++++++++++++++++
 drivers/bus/fslmc/mc/fsl_dpio.h             | 30 ++++++++++++++++++++
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.h    |  1 +
 drivers/bus/fslmc/rte_bus_fslmc_version.map |  2 ++
 4 files changed, 77 insertions(+)

diff --git a/drivers/bus/fslmc/mc/dpio.c b/drivers/bus/fslmc/mc/dpio.c
index d84232a..3553952 100644
--- a/drivers/bus/fslmc/mc/dpio.c
+++ b/drivers/bus/fslmc/mc/dpio.c
@@ -257,6 +257,50 @@ int dpio_get_stashing_destination(struct fsl_mc_io *mc_io,
 	return 0;
 }
 
+int dpio_add_static_dequeue_channel(struct fsl_mc_io *mc_io,
+				    uint32_t cmd_flags,
+				    uint16_t token,
+				    int dpcon_id,
+				    uint8_t *channel_index)
+{
+	struct mc_command cmd = { 0 };
+	int err;
+
+	/* prepare command */
+	cmd.header = mc_encode_cmd_header(DPIO_CMDID_ADD_STATIC_DEQUEUE_CHANNEL,
+					  cmd_flags,
+					  token);
+	DPIO_CMD_ADD_STATIC_DEQUEUE_CHANNEL(cmd, dpcon_id);
+
+	/* send command to mc*/
+	err = mc_send_command(mc_io, &cmd);
+	if (err)
+		return err;
+
+	/* retrieve response parameters */
+	DPIO_RSP_ADD_STATIC_DEQUEUE_CHANNEL(cmd, *channel_index);
+
+	return 0;
+}
+
+int dpio_remove_static_dequeue_channel(struct fsl_mc_io *mc_io,
+				       uint32_t cmd_flags,
+				       uint16_t token,
+				       int dpcon_id)
+{
+	struct mc_command cmd = { 0 };
+
+	/* prepare command */
+	cmd.header = mc_encode_cmd_header(
+				DPIO_CMDID_REMOVE_STATIC_DEQUEUE_CHANNEL,
+				cmd_flags,
+				token);
+	DPIO_CMD_REMOVE_STATIC_DEQUEUE_CHANNEL(cmd, dpcon_id);
+
+	/* send command to mc*/
+	return mc_send_command(mc_io, &cmd);
+}
+
 int dpio_get_api_version(struct fsl_mc_io *mc_io,
 			 uint32_t cmd_flags,
 			   uint16_t *major_ver,
diff --git a/drivers/bus/fslmc/mc/fsl_dpio.h b/drivers/bus/fslmc/mc/fsl_dpio.h
index 6d86f07..39b572d 100644
--- a/drivers/bus/fslmc/mc/fsl_dpio.h
+++ b/drivers/bus/fslmc/mc/fsl_dpio.h
@@ -230,6 +230,36 @@ int dpio_get_stashing_destination(struct fsl_mc_io	*mc_io,
 				  uint8_t		*sdest);
 
 /**
+ * dpio_add_static_dequeue_channel() - Add a static dequeue channel.
+ * @mc_io:	Pointer to MC portal's I/O object
+ * @cmd_flags:	Command flags; one or more of 'MC_CMD_FLAG_'
+ * @token:	Token of DPIO object
+ * @dpcon_id:	DPCON object ID
+ * @channel_index: Returned channel index to be used in qbman API
+ *
+ * Return:	'0' on Success; Error code otherwise.
+ */
+int dpio_add_static_dequeue_channel(struct fsl_mc_io	*mc_io,
+				    uint32_t		cmd_flags,
+				    uint16_t		token,
+				    int			dpcon_id,
+				    uint8_t		*channel_index);
+
+/**
+ * dpio_remove_static_dequeue_channel() - Remove a static dequeue channel.
+ * @mc_io:	Pointer to MC portal's I/O object
+ * @cmd_flags:	Command flags; one or more of 'MC_CMD_FLAG_'
+ * @token:	Token of DPIO object
+ * @dpcon_id:	DPCON object ID
+ *
+ * Return:	'0' on Success; Error code otherwise.
+ */
+int dpio_remove_static_dequeue_channel(struct fsl_mc_io	*mc_io,
+				       uint32_t		cmd_flags,
+				       uint16_t		token,
+				       int		dpcon_id);
+
+/**
  * struct dpio_attr - Structure representing DPIO attributes
  * @id: DPIO object ID
  * @qbman_portal_ce_offset: offset of the software portal cache-enabled area
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
index 4269800..77efe37 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
@@ -42,6 +42,7 @@ struct dpaa2_io_portal_t {
 	struct dpaa2_dpio_dev *sec_dpio_dev;
 	uint64_t net_tid;
 	uint64_t sec_tid;
+	void *eventdev;
 };
 
 /*! Global per thread DPIO portal */
diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map
index fdc6e21..79cb648 100644
--- a/drivers/bus/fslmc/rte_bus_fslmc_version.map
+++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map
@@ -58,6 +58,8 @@ DPDK_17.08 {
 	dpci_set_rx_queue;
 	dpcon_open;
 	dpcon_get_attributes;
+	dpio_add_static_dequeue_channel;
+	dpio_remove_static_dequeue_channel;
 	qbman_eq_desc_set_dca;
 	qbman_get_dqrr_from_idx;
 	qbman_get_dqrr_idx;
-- 
1.9.1

  parent reply	other threads:[~2017-05-25 18:09 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-25 18:07 [dpdk-dev] [PATCH 00/20] next-eventdev: NXP DPAA2 eventdev PMD Nipun Gupta
2017-05-25 18:07 ` [dpdk-dev] [PATCH 01/20] event/dpaa2: add basic build infrastructure Nipun Gupta
2017-05-31 14:59   ` Jerin Jacob
2017-05-25 18:07 ` [dpdk-dev] [PATCH 02/20] bus/fslmc: generic framework for mc object creation Nipun Gupta
2017-05-25 18:07 ` [dpdk-dev] [PATCH 03/20] bus/fslmc: integrating dpio and dpbp to object framework Nipun Gupta
2017-05-25 18:07 ` [dpdk-dev] [PATCH 04/20] bus/fslmc: adding basic dpcon support Nipun Gupta
2017-05-25 18:07 ` [dpdk-dev] [PATCH 05/20] bus/fslmc: export qbman dqrr funcs for eventdev usages Nipun Gupta
2017-05-25 18:07 ` [dpdk-dev] [PATCH 06/20] event/dpaa2: register dpcon as dpaa2 device for bus scan Nipun Gupta
2017-05-25 18:07 ` [dpdk-dev] [PATCH 07/20] bus/fslmc: adding basic dpci support Nipun Gupta
2017-05-25 18:07 ` [dpdk-dev] [PATCH 08/20] bus/fslmc: register dpci as dpaa2 device for bus scan Nipun Gupta
2017-05-25 18:07 ` [dpdk-dev] [PATCH 09/20] bus/fslmc: adding cpu support in stashing config Nipun Gupta
2017-05-25 18:07 ` [dpdk-dev] [PATCH 10/20] event/dpaa2: add initialization of event device Nipun Gupta
2017-05-31 15:10   ` Jerin Jacob
2017-06-01 10:25     ` Nipun Gupta
2017-06-01 10:39       ` Jerin Jacob
2017-05-25 18:07 ` Nipun Gupta [this message]
2017-05-25 18:07 ` [dpdk-dev] [PATCH 12/20] event/dpaa2: add configuration functions Nipun Gupta
2017-05-31 15:20   ` Jerin Jacob
2017-05-31 15:29   ` Jerin Jacob
2017-06-01 11:39     ` Nipun Gupta
2017-05-25 18:07 ` [dpdk-dev] [PATCH 13/20] bus/fslmc: support enqueue with multiple enqueue descriptors Nipun Gupta
2017-05-25 18:07 ` [dpdk-dev] [PATCH 14/20] bus/fslmc: add callback per queue to enable Nipun Gupta
2017-05-25 18:07 ` [dpdk-dev] [PATCH 15/20] bus/fslmc: change func argument to const to avoid warning Nipun Gupta
2017-05-25 18:07 ` [dpdk-dev] [PATCH 16/20] event/dpaa2: add enqueue and dequeue functionality Nipun Gupta
2017-05-25 18:07 ` [dpdk-dev] [PATCH 17/20] fslmc/bus: add interrupt enabling routine Nipun Gupta
2017-05-25 18:07 ` [dpdk-dev] [PATCH 18/20] bus/fslmc: enable portal interrupt handling Nipun Gupta
2017-05-25 18:07 ` [dpdk-dev] [PATCH 19/20] event/dpaa2: handle timeout using interrupts in dequeue Nipun Gupta
2017-05-31 15:49   ` Jerin Jacob
2017-06-01 11:42     ` Nipun Gupta
2017-05-25 18:07 ` [dpdk-dev] [PATCH 20/20] doc: add NXP DPAA2 EVENTDEV details Nipun Gupta
2017-05-31 15:58   ` Jerin Jacob
2017-06-01 12:07     ` Nipun Gupta
2017-05-31 14:50 ` [dpdk-dev] [PATCH 00/20] next-eventdev: NXP DPAA2 eventdev PMD Jerin Jacob
2017-05-31 16:17   ` 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=1495735671-4917-12-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 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).