lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 15 Oct 2008 11:47:28 +0200
From:	Patrick McHardy <kaber@...sh.net>
To:	abasit@...t6.net
CC:	David Miller <davem@...emloft.net>, linux-net@...r.kernel.org,
	netdev@...r.kernel.org
Subject: Re: qdisc tbf dropping many packets

David Miller wrote:
> From: Abdul Basit <abasit@...t6.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?

This appears to caused by TSO. Try disabling TSO using ethtool or
configure TBF to handle larger packet sizes.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists