From: Asim Shankar <asimshankar@gmail.com>
To: netdev@oss.sgi.com
Subject: BUG: HTB?
Date: Thu, 21 Apr 2005 14:21:07 -0500 [thread overview]
Message-ID: <7bca1cb50504211221655fd54c@mail.gmail.com> (raw)
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
next reply other threads:[~2005-04-21 19:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-21 19:21 Asim Shankar [this message]
2005-04-21 19:56 ` BUG: HTB? Thomas Graf
2005-04-21 20:41 ` [PATCH] - sch_htb: Drop packet when direct queue overflows Asim Shankar
2005-04-21 21:54 ` Thomas Graf
2005-04-21 23:02 ` [PATCH 2.6.11.7] sch_htb: Drop packet when direct queue is full Asim Shankar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7bca1cb50504211221655fd54c@mail.gmail.com \
--to=asimshankar@gmail.com \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.