From: Omer Yamac <omer.yamac@ceng.metu.edu.tr>
To: "Hunt, David" <david.hunt@intel.com>
Cc: dev@dpdk.org, stable@dpdk.org
Subject: Re: [PATCH] examples/distributor: update dynamic configuration
Date: Tue, 28 Jun 2022 14:06:26 +0300 [thread overview]
Message-ID: <1316cb8ca17a15f61db96dae18e99856@ceng.metu.edu.tr> (raw)
In-Reply-To: <fe6c2233-5f43-be10-e684-296e4929870c@intel.com>
Hi David,
I have one more question. When I was working on new patch, I just want
to make sure what we are doing.
On 27.06.2022 18:51, Hunt, David wrote:
> Hi Ömer,
>
> I've a few comments:
>
> On 21/06/2022 21:15, Abdullah Ömer Yamaç wrote:
--clipped--
>> @@ -39,6 +39,7 @@ volatile uint8_t quit_signal_rx;
>> volatile uint8_t quit_signal_dist;
>> volatile uint8_t quit_signal_work;
>> unsigned int power_lib_initialised;
>> +bool enable_lcore_rx_distributor;
>> static volatile struct app_stats {
>> struct {
--clipped--
>> @@ -724,7 +794,12 @@ main(int argc, char *argv[])
>> if (ret < 0)
>> rte_exit(EXIT_FAILURE, "Invalid distributor parameters\n");
>> - if (rte_lcore_count() < 5)
>> + if (enable_lcore_rx_distributor)
>> + num_workers = rte_lcore_count() - 3;
>> + else
>> + num_workers = rte_lcore_count() - 4;
>> +
>
> This could be "num_workers = rte_lcore_count() - (4 -
> enable_lcore_rx_distributor)".
>
For the "if-else" case of enable_lcore_rx_distributor, we will reduce
the line of codes; but I am not sure about that change. Because the type
of the variable is bool and we are using arithmetic operation on that
variable. I think it is a little bit harder for people to understand
operation. Am I right? I can suggest one more solution. We may change
the data type to "unsigned int" or Is it okay to leave as before?
--clipped--
next prev parent reply other threads:[~2022-06-28 11:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 20:15 Abdullah Ömer Yamaç
2022-06-27 15:51 ` Hunt, David
2022-06-27 16:28 ` Omer Yamac
2022-06-28 8:12 ` Hunt, David
2022-06-28 11:06 ` Omer Yamac [this message]
2022-06-28 11:25 ` Hunt, David
2022-06-28 12:06 ` Omer Yamac
2022-06-28 12:34 ` Hunt, David
2022-06-21 21:13 Abdullah Ömer Yamaç
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=1316cb8ca17a15f61db96dae18e99856@ceng.metu.edu.tr \
--to=omer.yamac@ceng.metu.edu.tr \
--cc=david.hunt@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/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).