bus/fslmc: support for parallel Rx DQ requests
authorHemant Agrawal <hemant.agrawal@nxp.com>
Fri, 26 May 2017 06:51:10 +0000 (12:21 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 12 Jun 2017 09:41:26 +0000 (10:41 +0100)
DPAA2 hardware support the option to configure
multiple memories for Rx recv buffer (DPAA2-DQRR).
Each Rx request executing is called as 'DQ' request.
This patch adds routines to get information w.r.t each DQ request.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
drivers/bus/fslmc/rte_bus_fslmc_version.map

index a1a58b9..7c35f86 100644 (file)
@@ -67,6 +67,8 @@
 struct dpaa2_io_portal_t dpaa2_io_portal[RTE_MAX_LCORE];
 RTE_DEFINE_PER_LCORE(struct dpaa2_io_portal_t, _dpaa2_io);
 
+struct swp_active_dqs rte_global_active_dqs_list[NUM_MAX_SWP];
+
 TAILQ_HEAD(dpio_device_list, dpaa2_dpio_dev);
 static struct dpio_device_list *dpio_dev_list; /*!< DPIO device list */
 static uint32_t io_space_count;
index 9ffcec3..e04edc6 100644 (file)
@@ -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 rte_global_active_dqs_list[NUM_MAX_SWP];
+
 /*! Global MCP list */
 extern void *(*rte_mcp_ptr_list);
 
@@ -264,6 +276,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_index)
+{
+       if (rte_global_active_dqs_list[dpio_index].global_active_dqs != NULL)
+               return 1;
+       return 0;
+}
+
+static inline
+void clear_swp_active_dqs(uint16_t dpio_index)
+{
+       rte_global_active_dqs_list[dpio_index].global_active_dqs = NULL;
+}
+
+static inline
+struct qbman_result *get_swp_active_dqs(uint16_t dpio_index)
+{
+       return rte_global_active_dqs_list[dpio_index].global_active_dqs;
+}
+
+static inline
+void set_swp_active_dqs(uint16_t dpio_index, struct qbman_result *dqs)
+{
+       rte_global_active_dqs_list[dpio_index].global_active_dqs = dqs;
+}
 struct dpaa2_dpbp_dev *dpaa2_alloc_dpbp_dev(void);
 void dpaa2_free_dpbp_dev(struct dpaa2_dpbp_dev *dpbp);
 
index 2db0fce..2f36e9f 100644 (file)
@@ -49,3 +49,10 @@ DPDK_17.05 {
 
        local: *;
 };
+
+DPDK_17.08 {
+       global:
+
+       rte_global_active_dqs_list;
+
+} DPDK_17.05;