From: Stephen Hemminger <stephen@networkplumber.org>
To: Wisam Monther <wisamm@nvidia.com>
Cc: Harold Huang <baymaxhuang@gmail.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [PATCH] app/flow-perf: replace RTE_BE32/16 with rte_cpu_to_be_32/16 for variables
Date: Mon, 7 Oct 2024 12:36:19 -0700 [thread overview]
Message-ID: <20241007123619.22413012@hermes.local> (raw)
In-Reply-To: <DM4PR12MB50399CFF1F44AD7390F5CC39A49D9@DM4PR12MB5039.namprd12.prod.outlook.com>
On Tue, 18 Apr 2023 11:32:50 +0000
Wisam Monther <wisamm@nvidia.com> wrote:
> Hi,
>
> > >
> > > > -----Original Message-----
> > > > From: Harold Huang <baymaxhuang@gmail.com>
> > > > Sent: Sunday, March 12, 2023 4:00 AM
> > > > To: dev@dpdk.org
> > > > Cc: Harold Huang <baymaxhuang@gmail.com>; Wisam Monther
> > > > <wisamm@nvidia.com>
> > > > Subject: [PATCH] app/flow-perf: replace RTE_BE32/16 with
> > > > rte_cpu_to_be_32/16 for variables
> > > >
> > > > In DPDK, the macros RTE_BE32 or RTE_BE16 are usually used for
> > > > constant values. And functions such as rte_cpu_to_be_32 or
> > > > rte_cpu_to_be_16 are optimized for variables.
> > > >
> > > > Signed-off-by: Harold Huang <baymaxhuang@gmail.com>
>
> Acked-by: Wisam Jaddo <wisamm@nvidia.com>
Make sense.
Really doesn't make much difference and I wounder why the macro version
is necessary at all. Since the function already compiles to:
#define rte_bswap32(x) ((uint32_t)(__builtin_constant_p(x) ? \
rte_constant_bswap32(x) : \
rte_arch_bswap32(x)))
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
prev parent reply other threads:[~2024-10-07 19:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-12 2:00 Harold Huang
2023-03-27 10:29 ` Wisam Monther
2023-03-27 12:32 ` Harold Huang
2023-04-18 11:32 ` Wisam Monther
2024-10-07 19:36 ` Stephen Hemminger [this message]
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=20241007123619.22413012@hermes.local \
--to=stephen@networkplumber.org \
--cc=baymaxhuang@gmail.com \
--cc=dev@dpdk.org \
--cc=wisamm@nvidia.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).