From: Alan Dewar <alangordondewar@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: cristian.dumitrescu@intel.com, tomasz.kantecki@intel.com,
jasvinder.singh@intel.com, dev@dpdk.org,
Alan Dewar <alan.dewar@att.com>
Subject: Re: [dpdk-dev] [PATCH v6] sched: make RED scaling configurable
Date: Tue, 16 Jan 2018 15:57:38 +0000 [thread overview]
Message-ID: <CAOEQf6gZA7B6+w1mQu-m3W_qpSdNnkMD5aUei=m1_uH8zLLk8w@mail.gmail.com> (raw)
In-Reply-To: <CAOEQf6h_jpLzpzX3nU_znw0iT4z1GsUToHs6UYk3dnYeuWrT5w@mail.gmail.com>
On Tue, Jan 16, 2018 at 3:50 PM, Alan Dewar <alangordondewar@gmail.com> wrote:
> On Mon, Jan 15, 2018 at 4:52 PM, Stephen Hemminger
> <stephen@networkplumber.org> wrote:
>>
>> On Mon, 15 Jan 2018 16:16:09 +0000
>> alangordondewar@gmail.com wrote:
>>
>> Looks like a good idea, minor editing feedback.
>>
>>
>> > - red_cfg->min_th = ((uint32_t) min_th) << (wq_log2 + RTE_RED_SCALING);
>> > - red_cfg->max_th = ((uint32_t) max_th) << (wq_log2 + RTE_RED_SCALING);
>> > - red_cfg->pa_const = (2 * (max_th - min_th) * maxp_inv) << RTE_RED_SCALING;
>> > + red_cfg->min_th = ((uint32_t) min_th) << (wq_log2 + rte_red_scaling);
>> > + red_cfg->max_th = ((uint32_t) max_th) << (wq_log2 + rte_red_scaling);
>>
>> While you are at it remove unnecessary parenthesis here.
>>
>
> Okay will do.
Ah - the compiler doesn't like it if I remove all the unnecessary
parenthesis. it gives the following error:
/home/adewar/git-repos/dpdk/lib/librte_sched/rte_red.c:153:49: error:
suggest parentheses around ‘+’ inside ‘<<’ [-Werror=parentheses]
red_cfg->min_th = (uint32_t) min_th << wq_log2 + rte_red_scaling;
I'll reinstate the ones around the addition.
>
>> > + red_cfg->pa_const = (2 * (max_th - min_th) * maxp_inv) <<
>> > + rte_red_scaling;
>>
>> It reads easier if the the shift operator on the next line
>>
>> red_cfg->pa_const = (2 * (max_th - min_th) * maxp_inv)
>> << rte_red_scaling;
>>
>
> Okay will do.
>
>> Why do functional tests have to be in same file and clutter the code?
>
> Do you mean the same patch file or the same unit-test file?
>
> I received feedback previously (might not have been this patch) where
> I had split the functional changes and the new unit-tests into
> separate patches and was asked to combine them into a single patch. I
> like the idea of if you have the fix you also have the new unit-tests.
>
> As for having the new tests in the same file as existing tests, the
> red tests are table driven so most of the changes to the unit-test
> code are just adding new table entries to exercise the RED code with a
> different scaling factor.
next prev parent reply other threads:[~2018-01-16 15:57 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1507022514-21831-1>
2018-01-08 15:27 ` [dpdk-dev] [PATCH v5] " alangordondewar
2018-01-11 13:11 ` Dumitrescu, Cristian
2018-01-12 9:38 ` Dewar, Alan
2018-01-12 11:09 ` Dumitrescu, Cristian
2018-01-12 11:52 ` Dumitrescu, Cristian
2018-01-15 15:36 ` Dewar, Alan
2018-01-16 11:56 ` Dumitrescu, Cristian
2018-01-12 10:44 ` Dewar, Alan
2018-01-12 11:43 ` Dumitrescu, Cristian
2018-01-15 16:16 ` [dpdk-dev] [PATCH v6] " alangordondewar
2018-01-15 16:52 ` Stephen Hemminger
2018-01-16 15:50 ` Alan Dewar
2018-01-16 15:57 ` Alan Dewar [this message]
2018-01-16 16:44 ` Dumitrescu, Cristian
2018-01-16 16:07 ` [dpdk-dev] [PATCH v7] " alangordondewar
2019-04-05 15:36 ` Ferruh Yigit
2019-04-05 15:36 ` Ferruh Yigit
2019-04-08 8:24 ` Alan Dewar
2019-04-08 8:24 ` Alan Dewar
2019-04-08 8:53 ` Thomas Monjalon
2019-04-08 8:53 ` Thomas Monjalon
2019-04-08 13:29 ` Dumitrescu, Cristian
2019-04-08 13:29 ` Dumitrescu, Cristian
2020-07-06 23:09 ` Thomas Monjalon
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='CAOEQf6gZA7B6+w1mQu-m3W_qpSdNnkMD5aUei=m1_uH8zLLk8w@mail.gmail.com' \
--to=alangordondewar@gmail.com \
--cc=alan.dewar@att.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=jasvinder.singh@intel.com \
--cc=stephen@networkplumber.org \
--cc=tomasz.kantecki@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).