Re: qdisc tbf dropping many packets

Previous thread: Can we create VLAN interface over GRE tunnel interface by Madhukar.Mythri on Tuesday, October 7, 2008 - 6:44 am. (1 message)

Next thread: Re: recv() hangs until SIGCHLD ? by Stephen Hemminger on Friday, October 10, 2008 - 12:17 pm. (6 messages)
From: "G"
Date: Thursday, October 9, 2008 - 6:44 am

Hi

Whats the best virtualization method to play and hack the linux
kernel. I have installed VMWare but its very slow when i build the
kernel in it and morever occupies quite some space coz i ve to install
a distribution. I want to play around with the linux kernel by
hacking into it so whats the best way to do it using virutalization. i
would also want virtual networking with it.

Your suggestions would be highly valuable

Thanks,
Regards,
Balaji
--

From: Tharindu Rukshan Bamunuarachchi
Date: Thursday, October 9, 2008 - 7:03 am

Hi

Go for our very own - KVM.

cheers
tharindu




--
Tharindu Rukshan Bamunuarachchi
In the end, It is the life in my years.
--

From: Abdul Basit
Date: Tuesday, October 14, 2008 - 6:37 pm

Hi,

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

--

From: David Miller
Date: Tuesday, October 14, 2008 - 9:48 pm

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

--

From: Patrick McHardy
Date: Wednesday, October 15, 2008 - 2:47 am

This appears to caused by TSO. Try disabling TSO using ethtool or
configure TBF to handle larger packet sizes.
--

From: Abdul Basit
Date: Wednesday, October 15, 2008 - 4:14 pm

Thanks Patrick, disabling the ETH TSO helped, TBF is working okay now.

Thanks again,
~Basit



--

From: Madhukar.Mythri
Date: Wednesday, October 15, 2008 - 1:18 am

Check whether Jumbo frames was set on network-interface (i.e, May be MTU
size was increased more than 1500).

Regards,
Madhukar.
-----Original Message-----
From: linux-net-owner@vger.kernel.org
[mailto:linux-net-owner@vger.kernel.org] On Behalf Of Abdul Basit
Sent: Wednesday, October 15, 2008 7:07 AM
To: linux-net@vger.kernel.org
Cc: abasit@bnet6.net
Subject: qdisc tbf dropping many packets 

Hi,

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

--

--

Previous thread: Can we create VLAN interface over GRE tunnel interface by Madhukar.Mythri on Tuesday, October 7, 2008 - 6:44 am. (1 message)

Next thread: Re: recv() hangs until SIGCHLD ? by Stephen Hemminger on Friday, October 10, 2008 - 12:17 pm. (6 messages)