[dpdk-dev,1/3] bus/fslmc: create function to prefetch next DQRR entry

Message ID 1516717073-6020-1-git-send-email-nipun.gupta@nxp.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers

Checks

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

Commit Message

Nipun Gupta Jan. 23, 2018, 2:17 p.m. UTC
  Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h |  6 ++++++
 drivers/bus/fslmc/qbman/qbman_portal.c             | 11 +++++++++++
 drivers/bus/fslmc/rte_bus_fslmc_version.map        |  1 +
 3 files changed, 18 insertions(+)
  

Comments

Hemant Agrawal Jan. 24, 2018, 5:20 a.m. UTC | #1
> -----Original Message-----
> From: Nipun Gupta [mailto:nipun.gupta@nxp.com]
> Subject: [PATCH 1/3] bus/fslmc: create function to prefetch next DQRR
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> ---
>  drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h |  6 ++++++
>  drivers/bus/fslmc/qbman/qbman_portal.c             | 11 +++++++++++
>  drivers/bus/fslmc/rte_bus_fslmc_version.map        |  1 +
>  3 files changed, 18 insertions(+)

Series
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
  
Jerin Jacob Jan. 31, 2018, 6:32 a.m. UTC | #2
-----Original Message-----
> Date: Wed, 24 Jan 2018 05:20:25 +0000
> From: Hemant Agrawal <hemant.agrawal@nxp.com>
> To: Nipun Gupta <nipun.gupta@nxp.com>, "jerin.jacob@caviumnetworks.com"
>  <jerin.jacob@caviumnetworks.com>
> CC: "dev@dpdk.org" <dev@dpdk.org>
> Subject: RE: [PATCH 1/3] bus/fslmc: create function to prefetch next DQRR
>  entry
> 
> > -----Original Message-----
> > From: Nipun Gupta [mailto:nipun.gupta@nxp.com]
> > Subject: [PATCH 1/3] bus/fslmc: create function to prefetch next DQRR
> > Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> > ---
> >  drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h |  6 ++++++
> >  drivers/bus/fslmc/qbman/qbman_portal.c             | 11 +++++++++++
> >  drivers/bus/fslmc/rte_bus_fslmc_version.map        |  1 +
> >  3 files changed, 18 insertions(+)
> 
> Series
> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

Applied to dpdk-next-eventdev/master. Thanks.
  

Patch

diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
index 95d785f..3e63db3 100644
--- a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
+++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
@@ -381,6 +381,12 @@  void qbman_pull_desc_set_channel(struct qbman_pull_desc *d, uint32_t chid,
 const struct qbman_result *qbman_swp_dqrr_next(struct qbman_swp *p);
 
 /**
+ * qbman_swp_prefetch_dqrr_next() - prefetch the next DQRR entry.
+ * @s: the software portal object.
+ */
+void qbman_swp_prefetch_dqrr_next(struct qbman_swp *s);
+
+/**
  * qbman_swp_dqrr_consume() -  Consume DQRR entries previously returned from
  * qbman_swp_dqrr_next().
  * @s: the software portal object.
diff --git a/drivers/bus/fslmc/qbman/qbman_portal.c b/drivers/bus/fslmc/qbman/qbman_portal.c
index 2d324f7..e221733 100644
--- a/drivers/bus/fslmc/qbman/qbman_portal.c
+++ b/drivers/bus/fslmc/qbman/qbman_portal.c
@@ -779,6 +779,17 @@  int qbman_swp_pull(struct qbman_swp *s, struct qbman_pull_desc *d)
 #define QBMAN_RESULT_BPSCN     0x29
 #define QBMAN_RESULT_CSCN_WQ   0x2a
 
+#include <rte_prefetch.h>
+
+void qbman_swp_prefetch_dqrr_next(struct qbman_swp *s)
+{
+	const struct qbman_result *p;
+
+	p = qbman_cena_read_wo_shadow(&s->sys,
+		QBMAN_CENA_SWP_DQRR(s->dqrr.next_idx));
+	rte_prefetch0(p);
+}
+
 /* NULL return if there are no unconsumed DQRR entries. Returns a DQRR entry
  * only once, so repeated calls can return a sequence of DQRR entries, without
  * requiring they be consumed immediately or in any particular order.
diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map
index 09ec05f..3f1ba13 100644
--- a/drivers/bus/fslmc/rte_bus_fslmc_version.map
+++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map
@@ -99,6 +99,7 @@  DPDK_18.02 {
 	qbman_fq_query_state;
 	qbman_fq_state_frame_count;
 	qbman_swp_dqrr_idx_consume;
+	qbman_swp_prefetch_dqrr_next;
 	rte_fslmc_get_device_count;
 
 } DPDK_17.11;