summaryrefslogtreecommitdiff
path: root/drivers/bus/fslmc
diff options
context:
space:
mode:
authorNipun Gupta <nipun.gupta@nxp.com>2018-01-17 17:09:12 +0530
committerJerin Jacob <jerin.jacob@caviumnetworks.com>2018-01-19 16:09:56 +0100
commit7b6edb640b735f4a9807b78812c81eacebff5528 (patch)
tree7718c28880fdf21081528e990c5732d50aaf9b20 /drivers/bus/fslmc
parent7c9e094fe5fc361e9c1780b8f917c1cb82a20afd (diff)
downloaddpdk-7b6edb640b735f4a9807b78812c81eacebff5528.zip
dpdk-7b6edb640b735f4a9807b78812c81eacebff5528.tar.gz
dpdk-7b6edb640b735f4a9807b78812c81eacebff5528.tar.xz
event/dpaa2: have separate structure to hold dqrr entries
This patch provides cleaner approach to store the DQRR entries, which are yet to be consumed in case of atomic queues. Also, this patch changes the storage of the DQRR entry index into the mbuf->seqn instead of ev->opaque Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Diffstat (limited to 'drivers/bus/fslmc')
-rw-r--r--drivers/bus/fslmc/fslmc_bus.c2
-rw-r--r--drivers/bus/fslmc/portal/dpaa2_hw_pvt.h2
-rw-r--r--drivers/bus/fslmc/rte_bus_fslmc_version.map1
-rw-r--r--drivers/bus/fslmc/rte_fslmc.h18
4 files changed, 21 insertions, 2 deletions
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index acc275a..8fe08f6 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -35,6 +35,8 @@ rte_fslmc_get_device_count(enum rte_dpaa2_dev_type device_type)
return rte_fslmc_bus.device_count[device_type];
}
+RTE_DEFINE_PER_LCORE(struct dpaa2_portal_dqrr, dpaa2_held_bufs);
+
static void
cleanup_fslmc_device_list(void)
{
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index 2e79399..46f1e75 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -79,8 +79,6 @@ struct dpaa2_dpio_dev {
struct rte_intr_handle intr_handle; /* Interrupt related info */
int32_t epoll_fd; /**< File descriptor created for interrupt polling */
int32_t hw_id; /**< An unique ID of this DPIO device instance */
- uint64_t dqrr_held;
- uint8_t dqrr_size;
};
struct dpaa2_dpbp_dev {
diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map
index b9dd063..09ec05f 100644
--- a/drivers/bus/fslmc/rte_bus_fslmc_version.map
+++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map
@@ -95,6 +95,7 @@ DPDK_18.02 {
dpaa2_svr_family;
dpaa2_virt_mode;
+ per_lcore_dpaa2_held_bufs;
qbman_fq_query_state;
qbman_fq_state_frame_count;
qbman_swp_dqrr_idx_consume;
diff --git a/drivers/bus/fslmc/rte_fslmc.h b/drivers/bus/fslmc/rte_fslmc.h
index c447b06..69d0fec 100644
--- a/drivers/bus/fslmc/rte_fslmc.h
+++ b/drivers/bus/fslmc/rte_fslmc.h
@@ -129,6 +129,24 @@ struct rte_fslmc_bus {
/**< Count of all devices scanned */
};
+#define DPAA2_PORTAL_DEQUEUE_DEPTH 32
+
+/* Create storage for dqrr entries per lcore */
+struct dpaa2_portal_dqrr {
+ struct rte_mbuf *mbuf[DPAA2_PORTAL_DEQUEUE_DEPTH];
+ uint64_t dqrr_held;
+ uint8_t dqrr_size;
+};
+
+RTE_DECLARE_PER_LCORE(struct dpaa2_portal_dqrr, dpaa2_held_bufs);
+
+#define DPAA2_PER_LCORE_DQRR_SIZE \
+ RTE_PER_LCORE(dpaa2_held_bufs).dqrr_size
+#define DPAA2_PER_LCORE_DQRR_HELD \
+ RTE_PER_LCORE(dpaa2_held_bufs).dqrr_held
+#define DPAA2_PER_LCORE_DQRR_MBUF(i) \
+ RTE_PER_LCORE(dpaa2_held_bufs).mbuf[i]
+
/**
* Register a DPAA2 driver.
*