netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: abasit@bnet6.net
Cc: linux-net@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: qdisc tbf dropping many packets
Date: Tue, 14 Oct 2008 21:48:49 -0700 (PDT)	[thread overview]
Message-ID: <20081014.214849.20773661.davem@davemloft.net> (raw)
In-Reply-To: <48F54940.6050105@bnet6.net>

From: Abdul Basit <abasit@bnet6.net>
Date: Tue, 14 Oct 2008 21:37:04 -0400

[ netdev CC:'d, you'll reach more knowledgable people there ]

> I am running linux kernel 2.6.23.1 on PowerPC and trying to set qdisc tbf  to limit the rate:-
> *
> *==> tc qdisc add dev eth0 root tbf rate 2048kbit buffer 10kb latency 50ms
> 
> The problem is no matter what rate i specify, if I download a file it always get down to ~16-18Kbps download speed,
> after investigating a bit more, i found by tc -s qdisc show that many dropped packets show up in statistic s,
> looking further in kernel code, I found that in linux/net/sched/sch_tbf.c:126
> 
> static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch)
> {
>        struct tbf_sched_data *q = qdisc_priv(sch);
>        int ret;
>  if (skb->len > q->max_size) {
>                 printk (KERN_INFO "tbf_enqueue, drop skb->len = %d, q->max_size = %d\n", skb->len, q->max_size);
>                 sch->qstats.drops++;
> 
>         ....
> }
> 
> whenever it try to enqueue the packet, the skb->len ( range from 2980 - 2977 ) is usually greator than q->max_size ( 2907 )
> hence it drops the packet.
> 
> On a different machine with same source code, skb->len never become > 1500 and there the tbf works fine.
> 
> Could someone please provide more insight or help where should i look more?
> 
> Thanks,
> ~Basit
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

       reply	other threads:[~2008-10-15  4:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6dd1343e0810090644r5b586fa4gd63ee6659b3a07c4@mail.gmail.com>
     [not found] ` <48F54940.6050105@bnet6.net>
2008-10-15  4:48   ` David Miller [this message]
2008-10-15  9:47     ` qdisc tbf dropping many packets Patrick McHardy
2008-10-15 23:14       ` Abdul Basit

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=20081014.214849.20773661.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=abasit@bnet6.net \
    --cc=linux-net@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).