| To: | Jamal Hadi Salim <hadi@xxxxxxxx>, Patrick McHardy <kaber@xxxxxxxxx> |
|---|---|
| Subject: | Qdisc requeue should be void? |
| From: | Stephen Hemminger <shemminger@xxxxxxxx> |
| Date: | Fri, 13 May 2005 10:57:54 -0700 |
| Cc: | netdev@xxxxxxxxxxx, lartc <lartc@xxxxxxxxxxxxxxx> |
| Organization: | Open Source Development Lab |
| Sender: | netdev-bounce@xxxxxxxxxxx |
There is an design problem with the qdisc interface that causes qlen related
bugs
in netem, tbf, and other qdisc's that peek at the top of the queue. The problem
is
that requeue needs to be called from the dequeue function but requeue can fail.
If requeue fails, then the calling qdisc can not properly handle the error. If
it
returns NULL, then the parent's expectation about qlen gets messed up.
Example:
prio (qlen = 1)
skb = netem dequeue
skb = htb dequeue
... decides not to send this skb now
htp requeue(skb) fails
?? what now
--netem.qlen // := 0
return NULL
skb is NULL
at this point prio qlen is 1 but underlying queue's are empty.
My proposal is to require requeue to always succeed and change it to be
void instead of returning int.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [RFC: 2.6 patch] make MII no longer user visible, Jeff Garzik |
|---|---|
| Next by Date: | Re: Status of net/ipv4/ipvs/ip_vs_proto_icmp.c?, Andres Salomon |
| Previous by Thread: | SCTP: use lib/libcrc32c.c instead of net/sctp/crc32c.c?, Adrian Bunk |
| Next by Thread: | Re: Qdisc requeue should be void?, Patrick McHardy |
| Indexes: | [Date] [Thread] [Top] [All Lists] |