From: Nipun Gupta <nipun.gupta@nxp.com>
To: <jerin.jacob@caviumnetworks.com>
Cc: <dev@dpdk.org>, <hemant.agrawal@nxp.com>,
Nipun Gupta <nipun.gupta@nxp.com>
Subject: [dpdk-dev] [PATCH 3/3] net/dpaa2: prefetch the annotation in event processing
Date: Tue, 23 Jan 2018 19:47:53 +0530 [thread overview]
Message-ID: <1516717073-6020-3-git-send-email-nipun.gupta@nxp.com> (raw)
In-Reply-To: <1516717073-6020-1-git-send-email-nipun.gupta@nxp.com>
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
next prev parent reply other threads:[~2018-01-23 15:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2018-01-24 5:20 ` [dpdk-dev] [PATCH 1/3] bus/fslmc: create function to prefetch " Hemant Agrawal
2018-01-31 6:32 ` Jerin Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1516717073-6020-3-git-send-email-nipun.gupta@nxp.com \
--to=nipun.gupta@nxp.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=jerin.jacob@caviumnetworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).