netdev
[Top] [All Lists]

Re: [PATCH] netem: account for packets in delayed queue in qlen

To: Stephen Hemminger <shemminger@xxxxxxxx>
Subject: Re: [PATCH] netem: account for packets in delayed queue in qlen
From: Patrick McHardy <kaber@xxxxxxxxx>
Date: Tue, 05 Apr 2005 21:48:45 +0200
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <20050329152110.38d50653@xxxxxxxxxxxxxxxxx>
References: <20050329152110.38d50653@xxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.6) Gecko/20050324 Debian/1.7.6-1
Stephen Hemminger wrote:
Netem has a private queue for delayed packets, and currently, packets
in this queue are not accounted for in the qdisc qlen statistics.
This is a problem if netem is used inside another qdisc doing rate
control that peeks at the qlen.

This patch changes the statistics to include the packets held but
not ready to send.

There is one troublesome spot left, netem_watchdog() decreases q.qlen
when the packet couldn't be enqueued. I don't think it is possible
to make netem useable as leaf-qdisc, it will always have to touch
q.qlen from timer context and classful qdiscs can't deal with this
since they all maintain their own q.qlen counters and expect changes
only in the +-1 range in enqueue/dequeue/requeue/drop. Best thing IMO
would be to refuse to work as anything but root qdisc.

Regards
Patrick

<Prev in Thread] Current Thread [Next in Thread>