* [dpdk-dev] [PATCH 1/3] bus/fslmc: create function to prefetch next DQRR entry
@ 2018-01-23 14:17 Nipun Gupta
2018-01-23 14:17 ` [dpdk-dev] [PATCH 2/3] event/dpaa2: prefetch the " Nipun Gupta
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Nipun Gupta @ 2018-01-23 14:17 UTC (permalink / raw)
To: jerin.jacob; +Cc: dev, hemant.agrawal, Nipun Gupta
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(+)
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;
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 2/3] event/dpaa2: prefetch the next DQRR entry
2018-01-23 14:17 [dpdk-dev] [PATCH 1/3] bus/fslmc: create function to prefetch next DQRR entry Nipun Gupta
@ 2018-01-23 14:17 ` Nipun Gupta
2018-01-23 14:17 ` [dpdk-dev] [PATCH 3/3] net/dpaa2: prefetch the annotation in event processing Nipun Gupta
2018-01-24 5:20 ` [dpdk-dev] [PATCH 1/3] bus/fslmc: create function to prefetch next DQRR entry Hemant Agrawal
2 siblings, 0 replies; 5+ messages in thread
From: Nipun Gupta @ 2018-01-23 14:17 UTC (permalink / raw)
To: jerin.jacob; +Cc: dev, hemant.agrawal, Nipun Gupta
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
drivers/event/dpaa2/dpaa2_eventdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index 84ecd1b..c3e6fbf 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -255,9 +255,9 @@ static void dpaa2_eventdev_process_atomic(struct qbman_swp *swp,
}
return num_pkts;
}
+ qbman_swp_prefetch_dqrr_next(swp);
fd = qbman_result_DQ_fd(dq);
-
rxq = (struct dpaa2_queue *)qbman_result_DQ_fqd_ctx(dq);
if (rxq) {
rxq->cb(swp, fd, dq, rxq, &ev[num_pkts]);
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 3/3] net/dpaa2: prefetch the annotation in event processing
2018-01-23 14:17 [dpdk-dev] [PATCH 1/3] bus/fslmc: create function to prefetch next DQRR entry Nipun Gupta
2018-01-23 14:17 ` [dpdk-dev] [PATCH 2/3] event/dpaa2: prefetch the " Nipun Gupta
@ 2018-01-23 14:17 ` Nipun Gupta
2018-01-24 5:20 ` [dpdk-dev] [PATCH 1/3] bus/fslmc: create function to prefetch next DQRR entry Hemant Agrawal
2 siblings, 0 replies; 5+ messages in thread
From: Nipun Gupta @ 2018-01-23 14:17 UTC (permalink / raw)
To: jerin.jacob; +Cc: dev, hemant.agrawal, Nipun Gupta
This patch adds software prefetching of the annotation which is
accessed by the driver to fetch the parsing results. The changes
also include as many instructions in between prefetching memory
and using it.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
drivers/net/dpaa2/dpaa2_rxtx.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 3d45669..fee7e4c 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -676,7 +676,8 @@ void __attribute__((hot))
struct dpaa2_queue *rxq,
struct rte_event *ev)
{
- ev->mbuf = eth_fd_to_mbuf(fd);
+ rte_prefetch0((void *)(DPAA2_GET_FD_ADDR(fd) +
+ DPAA2_FD_PTA_SIZE + 16));
ev->flow_id = rxq->ev.flow_id;
ev->sub_event_type = rxq->ev.sub_event_type;
@@ -686,18 +687,22 @@ void __attribute__((hot))
ev->queue_id = rxq->ev.queue_id;
ev->priority = rxq->ev.priority;
+ ev->mbuf = eth_fd_to_mbuf(fd);
+
qbman_swp_dqrr_consume(swp, dq);
}
-void dpaa2_dev_process_atomic_event(struct qbman_swp *swp __attribute__((unused)),
- const struct qbman_fd *fd,
- const struct qbman_result *dq,
- struct dpaa2_queue *rxq,
- struct rte_event *ev)
+void __attribute__((hot))
+dpaa2_dev_process_atomic_event(struct qbman_swp *swp __attribute__((unused)),
+ const struct qbman_fd *fd,
+ const struct qbman_result *dq,
+ struct dpaa2_queue *rxq,
+ struct rte_event *ev)
{
- uint8_t dqrr_index = qbman_get_dqrr_idx(dq);
+ uint8_t dqrr_index;
- ev->mbuf = eth_fd_to_mbuf(fd);
+ rte_prefetch0((void *)(DPAA2_GET_FD_ADDR(fd) +
+ DPAA2_FD_PTA_SIZE + 16));
ev->flow_id = rxq->ev.flow_id;
ev->sub_event_type = rxq->ev.sub_event_type;
@@ -707,6 +712,9 @@ void dpaa2_dev_process_atomic_event(struct qbman_swp *swp __attribute__((unused)
ev->queue_id = rxq->ev.queue_id;
ev->priority = rxq->ev.priority;
+ ev->mbuf = eth_fd_to_mbuf(fd);
+
+ dqrr_index = qbman_get_dqrr_idx(dq);
ev->mbuf->seqn = dqrr_index + 1;
DPAA2_PER_LCORE_DQRR_SIZE++;
DPAA2_PER_LCORE_DQRR_HELD |= 1 << dqrr_index;
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 1/3] bus/fslmc: create function to prefetch next DQRR entry
2018-01-23 14:17 [dpdk-dev] [PATCH 1/3] bus/fslmc: create function to prefetch next DQRR entry Nipun Gupta
2018-01-23 14:17 ` [dpdk-dev] [PATCH 2/3] event/dpaa2: prefetch the " Nipun Gupta
2018-01-23 14:17 ` [dpdk-dev] [PATCH 3/3] net/dpaa2: prefetch the annotation in event processing Nipun Gupta
@ 2018-01-24 5:20 ` Hemant Agrawal
2018-01-31 6:32 ` Jerin Jacob
2 siblings, 1 reply; 5+ messages in thread
From: Hemant Agrawal @ 2018-01-24 5:20 UTC (permalink / raw)
To: Nipun Gupta, jerin.jacob; +Cc: dev
> -----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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 1/3] bus/fslmc: create function to prefetch next DQRR entry
2018-01-24 5:20 ` [dpdk-dev] [PATCH 1/3] bus/fslmc: create function to prefetch next DQRR entry Hemant Agrawal
@ 2018-01-31 6:32 ` Jerin Jacob
0 siblings, 0 replies; 5+ messages in thread
From: Jerin Jacob @ 2018-01-31 6:32 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: Nipun Gupta, dev
-----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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-01-31 6:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-23 14:17 [dpdk-dev] [PATCH 1/3] bus/fslmc: create function to prefetch next DQRR entry Nipun Gupta
2018-01-23 14:17 ` [dpdk-dev] [PATCH 2/3] event/dpaa2: prefetch the " Nipun Gupta
2018-01-23 14:17 ` [dpdk-dev] [PATCH 3/3] net/dpaa2: prefetch the annotation in event processing Nipun Gupta
2018-01-24 5:20 ` [dpdk-dev] [PATCH 1/3] bus/fslmc: create function to prefetch next DQRR entry Hemant Agrawal
2018-01-31 6:32 ` Jerin Jacob
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).