summaryrefslogtreecommitdiff
path: root/drivers/bus/fslmc
diff options
context:
space:
mode:
authorNipun Gupta <nipun.gupta@nxp.com>2018-01-17 17:09:10 +0530
committerJerin Jacob <jerin.jacob@caviumnetworks.com>2018-01-19 16:09:56 +0100
commit4170dbe2661d8fffa14fc54d5f31369d88a5e889 (patch)
tree7609a82ca6be95b51289b6d3a0b3c0b55011c331 /drivers/bus/fslmc
parent72654f090a113d430a15733a27f759d07e5132d1 (diff)
downloaddpdk-4170dbe2661d8fffa14fc54d5f31369d88a5e889.zip
dpdk-4170dbe2661d8fffa14fc54d5f31369d88a5e889.tar.gz
dpdk-4170dbe2661d8fffa14fc54d5f31369d88a5e889.tar.xz
bus/fslmc: introduce API to consume dqrr using index
A new API qbman_swp_dqrr_idx_consume is defined which takes input as DQRR index to consume corresponding DQRR entry. 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/qbman/include/fsl_qbman_portal.h7
-rw-r--r--drivers/bus/fslmc/qbman/qbman_portal.c7
-rw-r--r--drivers/bus/fslmc/rte_bus_fslmc_version.map1
3 files changed, 15 insertions, 0 deletions
diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
index 019deae..10f38ca 100644
--- a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
+++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
@@ -389,6 +389,13 @@ const struct qbman_result *qbman_swp_dqrr_next(struct qbman_swp *p);
void qbman_swp_dqrr_consume(struct qbman_swp *s, const struct qbman_result *dq);
/**
+ * qbman_swp_dqrr_idx_consume() - Given the DQRR index consume the DQRR entry
+ * @s: the software portal object.
+ * @dqrr_index: the DQRR index entry to be consumed.
+ */
+void qbman_swp_dqrr_idx_consume(struct qbman_swp *s, uint8_t dqrr_index);
+
+/**
* qbman_get_dqrr_idx() - Get dqrr index from the given dqrr
* @dqrr: the given dqrr object.
*
diff --git a/drivers/bus/fslmc/qbman/qbman_portal.c b/drivers/bus/fslmc/qbman/qbman_portal.c
index b5c8b50..b02dfa2 100644
--- a/drivers/bus/fslmc/qbman/qbman_portal.c
+++ b/drivers/bus/fslmc/qbman/qbman_portal.c
@@ -859,6 +859,13 @@ void qbman_swp_dqrr_consume(struct qbman_swp *s,
qbman_cinh_write(&s->sys, QBMAN_CINH_SWP_DCAP, QBMAN_IDX_FROM_DQRR(dq));
}
+/* Consume DQRR entries previously returned from qbman_swp_dqrr_next(). */
+void qbman_swp_dqrr_idx_consume(struct qbman_swp *s,
+ uint8_t dqrr_index)
+{
+ qbman_cinh_write(&s->sys, QBMAN_CINH_SWP_DCAP, dqrr_index);
+}
+
/*********************************/
/* Polling user-provided storage */
/*********************************/
diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map
index 16b759d..b9dd063 100644
--- a/drivers/bus/fslmc/rte_bus_fslmc_version.map
+++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map
@@ -97,6 +97,7 @@ DPDK_18.02 {
dpaa2_virt_mode;
qbman_fq_query_state;
qbman_fq_state_frame_count;
+ qbman_swp_dqrr_idx_consume;
rte_fslmc_get_device_count;
} DPDK_17.11;