From: Ruifeng Wang <ruifeng.wang@arm.com>
To: jerinj@marvell.com, hemant.agrawal@nxp.com,
ferruh.yigit@intel.com, thomas@monjalon.net,
david.marchand@redhat.com
Cc: dev@dpdk.org, nd@arm.com, honnappa.nagarahalli@arm.com,
Ruifeng Wang <ruifeng.wang@arm.com>
Subject: [dpdk-dev] [PATCH v2 1/3] examples/l3fwd: reorganize code for better performance
Date: Tue, 1 Jun 2021 07:56:51 +0000 [thread overview]
Message-ID: <20210601075653.84927-2-ruifeng.wang@arm.com> (raw)
In-Reply-To: <20210601075653.84927-1-ruifeng.wang@arm.com>
Moved rfc1812 process prior to NEON registers store.
On N1SDP, this reorganization mitigates CPU frontend stall and backend
stall when forwarding.
On N1SDP with MLX5 40G NIC, this change showed 10.2% performance gain
in single port single core MRR test.
On ThunderX2, this changed showed no performance degradation.
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
examples/l3fwd/l3fwd_neon.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/examples/l3fwd/l3fwd_neon.h b/examples/l3fwd/l3fwd_neon.h
index 86ac5971d7..ea7fe22d00 100644
--- a/examples/l3fwd/l3fwd_neon.h
+++ b/examples/l3fwd/l3fwd_neon.h
@@ -43,11 +43,6 @@ processx4_step3(struct rte_mbuf *pkt[FWDSTEP], uint16_t dst_port[FWDSTEP])
ve[2] = vsetq_lane_u32(vgetq_lane_u32(te[2], 3), ve[2], 3);
ve[3] = vsetq_lane_u32(vgetq_lane_u32(te[3], 3), ve[3], 3);
- vst1q_u32(p[0], ve[0]);
- vst1q_u32(p[1], ve[1]);
- vst1q_u32(p[2], ve[2]);
- vst1q_u32(p[3], ve[3]);
-
rfc1812_process((struct rte_ipv4_hdr *)
((struct rte_ether_hdr *)p[0] + 1),
&dst_port[0], pkt[0]->packet_type);
@@ -60,6 +55,11 @@ processx4_step3(struct rte_mbuf *pkt[FWDSTEP], uint16_t dst_port[FWDSTEP])
rfc1812_process((struct rte_ipv4_hdr *)
((struct rte_ether_hdr *)p[3] + 1),
&dst_port[3], pkt[3]->packet_type);
+
+ vst1q_u32(p[0], ve[0]);
+ vst1q_u32(p[1], ve[1]);
+ vst1q_u32(p[2], ve[2]);
+ vst1q_u32(p[3], ve[3]);
}
/*
--
2.25.1
next prev parent reply other threads:[~2021-06-01 7:57 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-18 10:25 [dpdk-dev] [PATCH 0/4] l3fwd improvements Ruifeng Wang
2021-03-18 10:25 ` [dpdk-dev] [PATCH 1/4] examples/l3fwd: tune prefetch for better performance Ruifeng Wang
2021-04-13 18:50 ` Jerin Jacob
2021-04-13 20:00 ` Honnappa Nagarahalli
2021-05-19 7:52 ` Ruifeng Wang
2021-03-18 10:25 ` [dpdk-dev] [PATCH 2/4] examples/l3fwd: eliminate unnecessary calculations Ruifeng Wang
2021-04-13 18:40 ` Jerin Jacob
2021-03-18 10:25 ` [dpdk-dev] [PATCH 3/4] examples/l3fwd: eliminate unnecessary reloads in loop Ruifeng Wang
2021-04-13 17:43 ` Jerin Jacob
2021-04-14 6:02 ` Ruifeng Wang
2021-03-18 10:25 ` [dpdk-dev] [PATCH 4/4] examples/l3fwd: make data struct to be memory efficient Ruifeng Wang
2021-04-13 19:06 ` Jerin Jacob
2021-04-21 5:22 ` Hemant Agrawal
2021-04-26 10:55 ` Walsh, Conor
2021-04-27 1:19 ` Ruifeng Wang
2021-04-13 8:24 ` [dpdk-dev] [PATCH 0/4] l3fwd improvements Ruifeng Wang
2021-04-13 17:33 ` Jerin Jacob
2021-04-16 9:39 ` Ling, WeiX
2021-06-01 7:56 ` [dpdk-dev] [PATCH v2 0/3] " Ruifeng Wang
2021-06-01 7:56 ` Ruifeng Wang [this message]
2021-06-06 18:34 ` [dpdk-dev] [PATCH v2 1/3] examples/l3fwd: reorganize code for better performance Jerin Jacob
2021-06-01 7:56 ` [dpdk-dev] [PATCH v2 2/3] examples/l3fwd: eliminate unnecessary calculations Ruifeng Wang
2021-06-01 7:56 ` [dpdk-dev] [PATCH v2 3/3] examples/l3fwd: eliminate unnecessary reloads in loop Ruifeng Wang
2021-06-06 18:39 ` Jerin Jacob
2021-06-10 6:57 ` [dpdk-dev] [PATCH v3 0/2] l3fwd improvements Ruifeng Wang
2021-06-10 6:57 ` [dpdk-dev] [PATCH v3 1/2] examples/l3fwd: eliminate unnecessary calculations Ruifeng Wang
2021-06-10 6:57 ` [dpdk-dev] [PATCH v3 2/2] examples/l3fwd: eliminate unnecessary reloads in loop Ruifeng Wang
2021-07-05 8:36 ` [dpdk-dev] [PATCH v3 0/2] l3fwd improvements David Marchand
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=20210601075653.84927-2-ruifeng.wang@arm.com \
--to=ruifeng.wang@arm.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=hemant.agrawal@nxp.com \
--cc=honnappa.nagarahalli@arm.com \
--cc=jerinj@marvell.com \
--cc=nd@arm.com \
--cc=thomas@monjalon.net \
/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).