[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b83b43b0-c265-745d-0d52-25cfd8cb2d35@gmail.com>
Date: Sun, 12 Aug 2018 16:18:05 -0600
From: David Ahern <dsahern@...il.com>
To: Yousuk Seung <ysseung@...gle.com>, netdev@...r.kernel.org
Cc: Stephen Hemminger <stephen@...workplumber.org>,
Michael McLennan <nefario@...gle.com>,
Priyaranjan Jha <priyarjha@...gle.com>,
Neal Cardwell <ncardwell@...gle.com>,
Dave Taht <dave.taht@...il.com>
Subject: Re: [PATCH iproute2-next 3/3] q_netem: slotting with non-uniform
distribution
On 8/6/18 11:09 AM, Yousuk Seung wrote:
> @@ -417,21 +421,53 @@ static int netem_parse_opt(struct qdisc_util *qu, int argc, char **argv,
> }
> }
> } else if (matches(*argv, "slot") == 0) {
> - NEXT_ARG();
> - present[TCA_NETEM_SLOT] = 1;
> - if (get_time64(&slot.min_delay, *argv)) {
> - explain1("slot min_delay");
> - return -1;
> - }
> if (NEXT_IS_NUMBER()) {
> NEXT_ARG();
> - if (get_time64(&slot.max_delay, *argv)) {
> - explain1("slot min_delay max_delay");
> + present[TCA_NETEM_SLOT] = 1;
> + if (get_time64(&slot.min_delay, *argv)) {
> + explain1("slot min_delay");
> + return -1;
> + }
> + if (NEXT_IS_NUMBER()) {
> + NEXT_ARG();
> + if (get_time64(&slot.max_delay, *argv)) {
> + explain1("slot min_delay max_delay");
> + return -1;
> + }
> + }
> + if (slot.max_delay < slot.min_delay)
> + slot.max_delay = slot.min_delay;
> + } else {
> + NEXT_ARG();
> + if (strcmp(*argv, "distribution") == 0) {
> + present[TCA_NETEM_SLOT] = 1;
> + NEXT_ARG();
> + slot_dist_data = calloc(sizeof(slot_dist_data[0]), MAX_DIST);
if (!slot_dist_data) ...
Powered by blists - more mailing lists