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 drop count when packets are dropped
Date: Fri, 16 May 2014 17:07:24 +0800 [thread overview]
Message-ID: <5375D54C.4040108@huawei.com> (raw)
In-Reply-To: <1399988959.7973.46.camel@edumazet-glaptop2.roam.corp.google.com>
On 2014/5/13 21:49, Eric Dumazet wrote:
> On Tue, 2014-05-13 at 17:42 +0800, Yang Yingliang wrote:
>> When packets are dropped because of overlimit, the drop count
>> should be increased. Replace kfree_skb() with qdisc_drop() for
>> increasing drop count.
>>
>> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
>> ---
>> net/sched/sch_fq.c | 2 +-
>> net/sched/sch_fq_codel.c | 3 ++-
>> net/sched/sch_hhf.c | 3 ++-
>> 3 files changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c
>> index 23c682b42f99..958ef7d4b825 100644
>> --- a/net/sched/sch_fq.c
>> +++ b/net/sched/sch_fq.c
>> @@ -714,7 +714,7 @@ static int fq_change(struct Qdisc *sch, struct nlattr *opt)
>>
>> if (!skb)
>> break;
>> - kfree_skb(skb);
>> + qdisc_drop(skb, sch);
>> drop_count++;
>> }
>> qdisc_tree_decrease_qlen(sch, drop_count);
>> diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
>> index 0bf432c782c1..bcfe4594470f 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);
>> + qdisc_drop(skb, sch);
>> + q->drop_overlimit++;
>> q->cstats.drop_count++;
>> }
>
> Could you please refrain from adding random stuff in packet schedulers ?
OK :)
>
> overlimit has a special meaning for HTB like qdisc, having a shapers.
I don't really catch up with you here. What's special meaning ?
>
> fq_codel or hhf do not shape, there is no reason to increment
> 'overlimit' when they _drop_ a packet.
Do you mean 'drop_overlimit' or 'overlimit' ?
fq_codel has both 'overlimits' and 'drop_overlimit' :
qdisc fq_codel 1: dev eth4 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn
Sent 834 bytes 5 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
maxpacket 256 drop_overlimit 0 new_flow_count 0 ecn_mark 0
new_flows_len 0 old_flows_len 0
Could you please explain more explicitly ?
Thanks very much!
next prev parent reply other threads:[~2014-05-16 9:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-13 9:42 [PATCH net-next] net_sched: increase drop count when packets are dropped Yang Yingliang
2014-05-13 13:49 ` Eric Dumazet
2014-05-16 9:07 ` Yang Yingliang [this message]
2014-05-16 13:22 ` Eric Dumazet
2014-05-19 8:25 ` Yang Yingliang
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=5375D54C.4040108@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;
as well as URLs for NNTP newsgroup(s).