netdev
[Top] [All Lists]

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

To: Patrick McHardy <kaber@xxxxxxxxx>
Subject: Re: [PATCH] netem: account for packets in delayed queue in qlen
From: Stephen Hemminger <shemminger@xxxxxxxx>
Date: Fri, 22 Apr 2005 09:22:21 +1000
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <426832E1.7020003@xxxxxxxxx>
References: <20050329152110.38d50653@xxxxxxxxxxxxxxxxx> <4252EB9D.9070305@xxxxxxxxx> <20050407120417.4297cd14@xxxxxxxxxxxxxxxxx> <42628300.9010007@xxxxxxxxx> <20050419110639.47767113@xxxxxxxxxxxxxxxxxxxxx> <42666098.5060409@xxxxxxxxx> <20050421132020.41858bc4@xxxxxxxxxxxxxxxxxxxxx> <426832E1.7020003@xxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Fri, 22 Apr 2005 01:10:25 +0200
Patrick McHardy <kaber@xxxxxxxxx> wrote:

> Stephen Hemminger wrote:
> > So duplication is a no go...
> > Unless there is a different way of accounting for qlen (like a callback).
> 
> Instead of a callback you could store parent pointers in struct Qdisc
> and walk up the tree. One place that would need additional changes to
> cope with qlen changes of more than 1 is HFSC. It uses q.qlen == 1 as
> indication that a leaf qdisc was activated by the last enqueue
> operation. An increment of 2 when q.qlen was 0 before would cause HFSC
> to forget to activate a class.

I'm thinking of changing enqueue (and maybe later dequeue) API to decouple
the qlen assumption.

Either:
        rc = qdisc->enqueue(skb, qdisc, &my->qlen)
or add NET_XMIT_DUPPED
        rc = qdisc->enqueue(skb, qdisc);
        if (rc < NET_XMIT_SUCCESS) {
                ++my->dropped;
        } else {
                my->qlen++;
                if (rc == NET_XMIT_DUPPED)
                        my->qlen++;
}

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