All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: Chuck Ebbert <cebbert@redhat.com>, Netdev <netdev@vger.kernel.org>
Subject: Re: SFQ qdisc crashes with limit of 2 packets
Date: Wed, 19 Sep 2007 15:08:22 +0200	[thread overview]
Message-ID: <46F11F46.8060108@trash.net> (raw)
In-Reply-To: <20070919094803.GA17740@ms2.inr.ac.ru>

Alexey Kuznetsov wrote:
> Hello!
> 
>>CCed Alexey just to be safe, but I think the patch should be fine.
> 
> 
> Yes. But what'a about limit == 1? tc prohibits this case, but it is still
> not nice to have the bug in kernel. Plus, code remains creepy, the check
> 
> +	if (++sch->q.qlen < q->limit) {
> 
> still looks as a scary off-by-one. I would go all the way: replace this
> with natural:
> 
> 	if (++sch->q.qlen <= q->limit) {
> 
> and maxed q->limit at SFQ_DEPTH-2. Patch enclosed.


Thats even better, thanks :)

  reply	other threads:[~2007-09-19 13:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-18 17:18 SFQ qdisc crashes with limit of 2 packets Chuck Ebbert
2007-09-18 17:31 ` Patrick McHardy
2007-09-18 17:57   ` Patrick McHardy
2007-09-18 19:15     ` Patrick McHardy
2007-09-18 20:09       ` David Miller
2007-09-19  9:48       ` Alexey Kuznetsov
2007-09-19 13:08         ` Patrick McHardy [this message]
2007-09-19 17:43           ` David Miller
2007-09-21 15:55           ` Alexey Kuznetsov
2007-10-01  0:51             ` David Miller

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=46F11F46.8060108@trash.net \
    --to=kaber@trash.net \
    --cc=cebbert@redhat.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    /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.