From: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
To: Jonathan Morton <chromatix99@gmail.com>
Cc: <cake@lists.bufferbloat.net>
Subject: Re: [Cake] Possible BUG - parent backlog incorrectly updated in case of NET_XMIT_CN
Date: Tue, 7 Jun 2016 16:05:46 +0100 [thread overview]
Message-ID: <5756E2CA.2020700@darbyshire-bryant.me.uk> (raw)
In-Reply-To: <8EE35B4F-5C28-41C7-8795-93A6F606B3A8@gmail.com>
On 07/06/16 15:50, Jonathan Morton wrote:
>> On 7 Jun, 2016, at 14:20, Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk> wrote:
>>
>> I had a nose at CAKE but couldn't quit work out if a similar issue is present but I suspect it is. Certainly if Eric can't get it right "My prior attempt to fix the backlogs of parents failed." then it's not an 'obvious to solve' problem :-)
> It appears my code already handles it correctly. This is most likely because it inherited the analogous handling from the old function called here.
I was intrigued by how in the case of XMIT_CN he reports the backlog
without the packet just dropped 'cos the parent qdisc won't include that
length in its calculations because we reported we dropped the packet.
Preventing double accounting.
+ /* As we dropped packet(s), better let upper stack know this.
+ * If we dropped a packet for this flow, return NET_XMIT_CN,
+ * but in this case, our parents wont increase their backlogs.
+ */
+ prev_qlen -= sch->q.qlen;
+ prev_backlog -= sch->qstats.backlog;
+ if (ret == idx) {
+ qdisc_tree_reduce_backlog(sch, prev_qlen - 1,
+ prev_backlog - qdisc_pkt_len(skb)); <<<<here
+ return NET_XMIT_CN;
+ }
+ qdisc_tree_reduce_backlog(sch, prev_qlen, prev_backlog);
+ return NET_XMIT_SUCCESS;
I'm not sure that cake behaves the same way:
u32 old_backlog = q->buffer_used;
while (q->buffer_used > q->buffer_limit) {
dropped++;
if (cake_drop(sch) == idx + (tin << 16))
same_flow = 1;
}
b->drop_overlimit += dropped;
qdisc_tree_reduce_backlog(sch, dropped - same_flow, old_backlog - q->buffer_used);
return same_flow ? NET_XMIT_CN : NET_XMIT_SUCCESS;
It looks to me that we always report what was dropped in terms of length irrespective of whether it was from the same flow. The number of packets *does* change, correctly.
>
> - Jonathan Morton
>
next prev parent reply other threads:[~2016-06-07 15:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-07 11:20 Kevin Darbyshire-Bryant
2016-06-07 14:50 ` Jonathan Morton
2016-06-07 15:05 ` Kevin Darbyshire-Bryant [this message]
2016-06-11 9:11 ` Kevin Darbyshire-Bryant
2016-06-11 16:41 ` Jonathan Morton
2016-06-12 16:31 ` Eric Dumazet
2016-06-12 16:40 ` Dave Taht
2016-06-12 17:48 ` Eric Dumazet
2016-06-12 17:51 ` Jonathan Morton
2016-06-12 18:19 ` Eric Dumazet
2016-06-12 17:59 ` Jonathan Morton
2016-06-12 19:04 ` Eric Dumazet
2016-06-12 20:40 ` Benjamin Cronce
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
List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5756E2CA.2020700@darbyshire-bryant.me.uk \
--to=kevin@darbyshire-bryant.me.uk \
--cc=cake@lists.bufferbloat.net \
--cc=chromatix99@gmail.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