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  linux-hardening  linux-cve-announce  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]
Message-ID: <536AE70F.7060307@huawei.com>
Date:	Thu, 8 May 2014 10:08:15 +0800
From:	Yang Yingliang <yangyingliang@...wei.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	<netdev@...r.kernel.org>, <vtlam@...gle.com>,
	<nanditad@...gle.com>, <davem@...emloft.net>
Subject: Re: [PATCH net-next] net_sched: increase drops and decrease backlog
 when packets are dropped

On 2014/5/6 21:58, Eric Dumazet wrote:
> On Tue, 2014-05-06 at 17:37 +0800, Yang Yingliang wrote:
>> When packets are dropped, backlog and drops statistic of qdisc
>> need be changed. Replace kfree_skb() with qdisc_drop() for
>> increasing drops.
>>
>> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
>> ---
> 
> 
>> diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
>> index 0bf432c782c1..83abd4cd10cd 100644
>> --- a/net/sched/sch_fq_codel.c
>> +++ b/net/sched/sch_fq_codel.c
>> @@ -344,7 +344,8 @@ static int fq_codel_change(struct Qdisc *sch, struct nlattr *opt)
>>  	while (sch->q.qlen > sch->limit) {
>>  		struct sk_buff *skb = fq_codel_dequeue(sch);
>>  
>> -		kfree_skb(skb);
>> +		sch->qstats.backlog -= qdisc_pkt_len(skb);
> 
> Hmmm... please describe how you tested this change ?

Compiled only. The packet is dropped, so I think the backlog should be decreased.

Regards,
Yang

> 
>> +		qdisc_drop(skb, sch);
>>  		q->cstats.drop_count++;
>>  	}
>>  	qdisc_tree_decrease_qlen(sch, q->cstats.drop_count);
> 
> 
> 
> 


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ