From: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
To: "ruifeng.wang@arm.com" <ruifeng.wang@arm.com>,
"jingjing.wu@intel.com" <jingjing.wu@intel.com>,
"bernard.iremonger@intel.com" <bernard.iremonger@intel.com>,
"wenzhuo.lu@intel.com" <wenzhuo.lu@intel.com>
Cc: "Honnappa.Nagarahalli@arm.com" <Honnappa.Nagarahalli@arm.com>,
"nd@arm.com" <nd@arm.com>,
"hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v1] app/testpmd: optimized MAC swap by using neon intrinsics
Date: Mon, 11 Mar 2019 14:16:34 +0000 [thread overview]
Message-ID: <4b57fab5ba9dda2e439b376c9ed571f5659e8821.camel@marvell.com> (raw)
In-Reply-To: <1552292065-15239-1-git-send-email-ruifeng.wang@arm.com>
On Mon, 2019-03-11 at 16:14 +0800, Ruifeng Wang wrote:
> -------------------------------------------------------------------
> ---
> Improved MAC swap performance for ARM platform.
> The improvement was achieved by using neon intrinsics
> to save CPU cycles and doing swap for four packets
> at a time.
> The optimization had 15% - 20% throughput boost
> in testpmd MAC swap mode.
>
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> Reviewed-by: Phil Yang <phil.yang@arm.com>
> ---
> app/test-pmd/macswap.c | 4 +-
> app/test-pmd/macswap_neon.h | 93
> +++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 96 insertions(+), 1 deletion(-)
> create mode 100644 app/test-pmd/macswap_neon.h
>
> diff --git a/app/test-pmd/macswap.c b/app/test-pmd/macswap.c
>
> +static inline void
> +do_macswap(struct rte_mbuf *pkts[], uint16_t nb,
> + struct rte_port *txp)
> +{
> + struct ether_hdr *eth_hdr[4];
> + struct rte_mbuf *mb[4];
> + uint64_t ol_flags;
> + int i;
> + int r;
> + uint8x16_t v0, v1, v2, v3;
> + /**
> + * Index map be used to shuffle the 16 bytes.
> + * byte 0-5 will be swapped with byte 6-11.
> + * byte 12-15 will keep unchanged.
> + */
> + uint8x16_t idx_map = {6, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5,
> + 12, 13, 14, 15};
Nit: I think, we can make it as "const uint8x16_t idx_map".
Other than that it looks good to me.
Regarding the performance, I have tested with two SoCs.
octeontx: +13% improvement
octeontx2: +46% improvement
Acked-by: Jerin Jacob <jerinj@marvell.com>
next prev parent reply other threads:[~2019-03-11 14:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-11 8:14 Ruifeng Wang
2019-03-11 14:16 ` Jerin Jacob Kollanukkaran [this message]
2019-03-12 1:34 ` Ruifeng Wang (Arm Technology China)
2019-03-11 15:33 ` Honnappa Nagarahalli
2019-03-12 1:37 ` Ruifeng Wang (Arm Technology China)
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=4b57fab5ba9dda2e439b376c9ed571f5659e8821.camel@marvell.com \
--to=jerinj@marvell.com \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=jingjing.wu@intel.com \
--cc=nd@arm.com \
--cc=ruifeng.wang@arm.com \
--cc=wenzhuo.lu@intel.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).