From: Yang Yingliang <yangyingliang@huawei.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: <netdev@vger.kernel.org>, <vtlam@google.com>,
<nanditad@google.com>, <davem@davemloft.net>
Subject: Re: [PATCH net-next] net_sched: increase drops and decrease backlog when packets are dropped
Date: Thu, 8 May 2014 10:08:15 +0800 [thread overview]
Message-ID: <536AE70F.7060307@huawei.com> (raw)
In-Reply-To: <1399384701.15399.4.camel@edumazet-glaptop2.roam.corp.google.com>
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@huawei.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);
>
>
>
>
next prev parent reply other threads:[~2014-05-08 2:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-06 9:37 [PATCH net-next] net_sched: increase drops and decrease backlog when packets are dropped Yang Yingliang
2014-05-06 13:58 ` Eric Dumazet
2014-05-08 2:08 ` Yang Yingliang [this message]
2014-05-08 2:55 ` 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=536AE70F.7060307@huawei.com \
--to=yangyingliang@huawei.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=nanditad@google.com \
--cc=netdev@vger.kernel.org \
--cc=vtlam@google.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