| To: | netdev@xxxxxxxxxxx |
|---|---|
| Subject: | BUG: HTB? |
| From: | Asim Shankar <asimshankar@xxxxxxxxx> |
| Date: | Thu, 21 Apr 2005 14:21:07 -0500 |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=DCovcoWISgmTCBrZWiABUOF8qaRgwIMT16y61yz5p29vUOCFeBnmJCUefbgPjBxvKVFrACp+J8FKgfAbi9mrH+rHxpSXw2xrLThREzU+t594/18z3/r3NYjTOaj+WUwQXAU4yINE0lb8IDfPJFEv5CR2tkXrxqHjNWUW2P7FV18= |
| Reply-to: | Asim Shankar <asimshankar@xxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
Hi,
I think there is a bug in htb_enqueue() (net/sched/sch_htb.c)
Specifically, in the lines:
if (cl == HTB_DIRECT) {
/* enqueue to helper queue */
if (q->direct_queue.qlen < q->direct_qlen) {
__skb_queue_tail(&q->direct_queue, skb);
q->direct_pkts++;
}
}
If a packet is classified as HTB_DIRECT but the direct_queue is
already full, then the packet doesn't get enqueued but sch->q.qlen++
will happen a few lines later. Overflowing of the direct_queue
probably rarely happens in practice, but I was playing around and
noticed it happen in some corner cases of my testing.
Should the packet be dropped instead? Like:
if (cl == HTB_DIRECT) {
/* enqueue to helper queue */
if (q->direct_queue.qlen < q->direct_qlen) {
__skb_queue_tail(&q->direct_queue, skb);
q->direct_pkts++;
} else {
sch->qstats.drops++;
kfree_skb(skb);
return NET_XMIT_DROP;
}
}
Thanks,
-- Asim
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH net-drivers-2.6 5/6] e100: Performance optimizations to e100 Tx Path, Scott Feldman |
|---|---|
| Next by Date: | Re: BUG: HTB?, Thomas Graf |
| Previous by Thread: | [PATCH][RESENT] Generic HDLC update, Krzysztof Halasa |
| Next by Thread: | Re: BUG: HTB?, Thomas Graf |
| Indexes: | [Date] [Thread] [Top] [All Lists] |