From: Stephen Hemminger <stephen@networkplumber.org>
To: alangordondewar@gmail.com
Cc: cristian.dumitrescu@intel.com, dev@dpdk.org,
Alan Dewar <alan.dewar@att.com>
Subject: Re: [RFC v2] sched: parameterize QoS traffic-classes and queues
Date: Fri, 16 Feb 2018 12:10:56 -0800 [thread overview]
Message-ID: <20180216121056.76d34cc7@xeon-e3> (raw)
In-Reply-To: <1518795853-7726-1-git-send-email-alan.dewar@att.com>
On Fri, 16 Feb 2018 15:44:13 +0000
alangordondewar@gmail.com wrote:
> - qindex = tc_index * 4;
> -
> - pipe->wrr_tokens[qindex] = (grinder->wrr_tokens[0] & grinder->wrr_mask[0])
> - >> RTE_SCHED_WRR_SHIFT;
> - pipe->wrr_tokens[qindex + 1] = (grinder->wrr_tokens[1] & grinder->wrr_mask[1])
> - >> RTE_SCHED_WRR_SHIFT;
> - pipe->wrr_tokens[qindex + 2] = (grinder->wrr_tokens[2] & grinder->wrr_mask[2])
> - >> RTE_SCHED_WRR_SHIFT;
> - pipe->wrr_tokens[qindex + 3] = (grinder->wrr_tokens[3] & grinder->wrr_mask[3])
> - >> RTE_SCHED_WRR_SHIFT;
> + uint32_t q;
> + uint8_t tokens;
> +
> + qindex = tc_index * RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS;
> + for (q = 0; q < RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS; q++) {
> + tokens = (grinder->wrr_tokens[q] & grinder->wrr_mask[q]) >>
> + RTE_SCHED_WRR_SHIFT;
> + pipe->wrr_tokens[qindex + q] = tokens;
You could use #pragma to tell compiler to unroll the loop which would make it
as fast as the original.
prev parent reply other threads:[~2018-02-16 20:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-05 9:20 [RFC] sched: parameterize QoS traffic-classes and queues alangordondewar
2017-10-05 10:19 ` Robertson, Alan
2017-10-06 9:12 ` Alan Dewar
2018-02-16 15:44 ` [RFC v2] " alangordondewar
2018-02-16 20:09 ` Stephen Hemminger
2018-02-16 20:10 ` 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=20180216121056.76d34cc7@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=alan.dewar@att.com \
--cc=alangordondewar@gmail.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.