[dpdk-dev,3/4] bus/fslmc: support for multiple parallel dq requests

Message ID 1492607395-5922-3-git-send-email-hemant.agrawal@nxp.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Hemant Agrawal April 19, 2017, 1:09 p.m. UTC
  Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 37 +++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
  

Comments

Ferruh Yigit May 12, 2017, 1:53 p.m. UTC | #1
On 4/19/2017 2:09 PM, Hemant Agrawal wrote:

Can you please note what dq stands for in commit log, and if it is an
abbreviation can you please use it uppercase in patch title?

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

<...>
  

Patch

diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index a7308ba..c4b0419 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -108,6 +108,9 @@  struct dpaa2_dpbp_dev {
 
 struct queue_storage_info_t {
 	struct qbman_result *dq_storage[NUM_DQS_PER_QUEUE];
+	struct qbman_result *active_dqs;
+	int active_dpio_id;
+	int toggle;
 };
 
 struct dpaa2_queue {
@@ -123,6 +126,15 @@  struct dpaa2_queue {
 	struct queue_storage_info_t *q_storage;
 };
 
+struct swp_active_dqs {
+	struct qbman_result *global_active_dqs;
+	uint64_t reserved[7];
+};
+
+#define NUM_MAX_SWP 64
+
+extern struct swp_active_dqs global_active_dqs_list[NUM_MAX_SWP];
+
 /*! Global MCP list */
 extern void *(*rte_mcp_ptr_list);
 
@@ -239,6 +251,31 @@  static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr)
 
 #endif /* RTE_LIBRTE_DPAA2_USE_PHYS_IOVA */
 
+static inline
+int check_swp_active_dqs(uint16_t dpio_dev_index)
+{
+	if (global_active_dqs_list[dpio_dev_index].global_active_dqs != NULL)
+		return 1;
+	return 0;
+}
+
+static inline
+void clear_swp_active_dqs(uint16_t dpio_dev_index)
+{
+	global_active_dqs_list[dpio_dev_index].global_active_dqs = NULL;
+}
+
+static inline
+struct qbman_result *get_swp_active_dqs(uint16_t dpio_dev_index)
+{
+	return global_active_dqs_list[dpio_dev_index].global_active_dqs;
+}
+
+static inline
+void set_swp_active_dqs(uint16_t dpio_dev_index, struct qbman_result *dqs)
+{
+	global_active_dqs_list[dpio_dev_index].global_active_dqs = dqs;
+}
 struct dpaa2_dpbp_dev *dpaa2_alloc_dpbp_dev(void);
 void dpaa2_free_dpbp_dev(struct dpaa2_dpbp_dev *dpbp);