[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1510180826.2849.117.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Wed, 08 Nov 2017 14:40:26 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Dave Taht <dave.taht@...il.com>
Cc: netdev@...r.kernel.org, stephen@...workplumber.org
Subject: Re: [PATCH v2 net-next 3/3] netem: support delivering packets in
delayed time slots
On Wed, 2017-11-08 at 13:09 -0800, Dave Taht wrote:
> Slotting is a crude approximation of the behaviors of shared media such
> as cable, wifi, and LTE, which gather up a bunch of packets within a
> varying delay window and deliver them, relative to that, nearly all at
> once.
> - qdisc_watchdog_schedule_ns(&q->watchdog, time_to_send);
> +
> + if (q->slot.slot_next > now)
> + qdisc_watchdog_schedule_ns(&q->watchdog,
> + q->slot.slot_next);
> + else
> + qdisc_watchdog_schedule_ns(&q->watchdog, time_to_send);
This looks weird.
You might incur an extra timer event in the following case :
now < q->slot.slot_next < time_to_send
I would rather do
qdisc_watchdog_schedule_ns(&q->watchdog,
max(time_to_send, q->slot.slot_next));
So that a single timer expiration is needed.
Powered by blists - more mailing lists