From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: Ranjit Menon <ranjit.menon@intel.com>
Cc: dev@dpdk.org, thomas@monjalon.net
Subject: Re: [dpdk-dev] [PATCH] eal: avoid side effects in RTE_ALIGN_MUL_NEAR(v, mul) for v and mul
Date: Thu, 11 Mar 2021 22:28:17 -0800 [thread overview]
Message-ID: <20210312062817.GB6784@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> (raw)
In-Reply-To: <7e84d8a3-45cc-4477-14cd-b595e1fdf1e9@intel.com>
On Thu, Mar 11, 2021 at 08:41:58PM -0800, Ranjit Menon wrote:
>
> On 3/11/2021 5:34 PM, Tyler Retzlaff wrote:
> >On Thu, Mar 11, 2021 at 04:40:58PM -0800, Ranjit Menon wrote:
> >>On 3/11/2021 1:08 PM, Tyler Retzlaff wrote:
> >>>diff --git a/lib/librte_eal/include/rte_common.h b/lib/librte_eal/include/rte_common.h
> >>>index 1b630baf1..640befee2 100644
> >>>--- a/lib/librte_eal/include/rte_common.h
> >>>+++ b/lib/librte_eal/include/rte_common.h
> >>>@@ -345,9 +345,11 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
> >>> */
> >>> #define RTE_ALIGN_MUL_NEAR(v, mul) \
> >>> ({ \
> >>>- typeof(v) ceil = RTE_ALIGN_MUL_CEIL(v, mul); \
> >>>- typeof(v) floor = RTE_ALIGN_MUL_FLOOR(v, mul); \
> >>>- (ceil - (v)) > ((v) - floor) ? floor : ceil; \
> >>>+ typeof(v) _v = (v); \
> >>>+ typeof(v) _m = (mul); \
> >>For consistency sake, can this variable be changed to '_mul'?
> >sure, i can do that. it will hit another tab stop below though.
> >i'll submit a v2 with the requested change.
>
> Ugh! In that case, let it be. If others insist on the change, we can do it.
heh, yeah painful. okay i will leave the patch as it is and wait a bit
for someone with a strong opinion.
>
> ranjit m.
>
> >
> >>>+ typeof(v) ceil = RTE_ALIGN_MUL_CEIL(_v, _m); \
next prev parent reply other threads:[~2021-03-12 6:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-11 21:08 Tyler Retzlaff
2021-03-12 0:40 ` Ranjit Menon
2021-03-12 1:34 ` Tyler Retzlaff
2021-03-12 4:41 ` Ranjit Menon
2021-03-12 6:28 ` Tyler Retzlaff [this message]
2021-03-12 8:07 ` David Marchand
2021-03-12 18:49 ` Tyler Retzlaff
2021-05-05 16:30 ` Tyler Retzlaff
2021-05-05 20:28 ` David Marchand
2021-05-06 12:24 ` [dpdk-dev] [EXT] " Pavan Nikhilesh Bhagavatula
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=20210312062817.GB6784@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net \
--to=roretzla@linux.microsoft.com \
--cc=dev@dpdk.org \
--cc=ranjit.menon@intel.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).