From: Eric Dumazet <eric.dumazet@gmail.com>
To: Vijay Subramanian <subramanian.vijay@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH net] net: fq_codel: Fix off-by-one error
Date: Fri, 29 Mar 2013 08:01:20 -0700 [thread overview]
Message-ID: <1364569280.5113.21.camel@edumazet-glaptop> (raw)
In-Reply-To: <1364514720-20780-1-git-send-email-subramanian.vijay@gmail.com>
On Thu, 2013-03-28 at 16:52 -0700, Vijay Subramanian wrote:
> Currently, we hold a max of sch->limit -1 number of packets instead of
> sch->limit packets. Fix this off-by-one error.
>
> Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
> ---
> net/sched/sch_fq_codel.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
> index 4e606fc..5578628 100644
> --- a/net/sched/sch_fq_codel.c
> +++ b/net/sched/sch_fq_codel.c
> @@ -195,7 +195,7 @@ static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch)
> flow->deficit = q->quantum;
> flow->dropped = 0;
> }
> - if (++sch->q.qlen < sch->limit)
> + if (++sch->q.qlen <= sch->limit)
> return NET_XMIT_SUCCESS;
>
> q->drop_overlimit++;
Just curious, did you play changing the default limit (10240 packets) ?
Acked-by: Eric Dumazet <edumazet@google.com>
Thanks !
next prev parent reply other threads:[~2013-03-29 15:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-28 23:52 [PATCH net] net: fq_codel: Fix off-by-one error Vijay Subramanian
2013-03-29 15:01 ` Eric Dumazet [this message]
2013-03-29 19:33 ` David Miller
2013-03-29 21:49 ` Vijay Subramanian
2013-03-30 6:53 ` Markus Trippelsdorf
2013-03-30 14:42 ` Eric Dumazet
2013-03-30 15:08 ` Markus Trippelsdorf
2013-03-30 15:28 ` Eric Dumazet
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=1364569280.5113.21.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=subramanian.vijay@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox