From: Jonathan Morton <chromatix99@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>,
cake@lists.bufferbloat.net
Subject: Re: [Cake] Possible BUG - parent backlog incorrectly updated in case of NET_XMIT_CN
Date: Sun, 12 Jun 2016 20:59:48 +0300 [thread overview]
Message-ID: <E65E69C1-9377-46F8-847A-7C7F92EC655D@gmail.com> (raw)
In-Reply-To: <1465749085.7945.81.camel@edumazet-glaptop3.roam.corp.google.com>
>> And there’s also the problem that we might not need to drop packets as
>> large as the incoming packet in order to fit the latter into the queue
>> - so this corrected correction may be *negative* (the queue is longer
>> than before) - but qdisc_tree_reduce_backlog() only takes an unsigned
>> parameter here.
>
> That's a very minor detail.
>
> If the code does :
>
> reduce_backlog(unsigned quantity)
> {
> q->backlog -= quantity;
> }
>
> Then the fact that @quantity is signed or unsigned is irrelevant.
Not so - unless you are very sure that q->backlog is the same size as quantity. In an increasingly 64-bit world, that is by no means assured in the future. I don’t like relying on wraparound behaviour without making that assumption explicit, which is precisely what the signed types in C are for.
>> IMHO the NET_XMIT_CN semantics are broken. It might be better to drop
>> support for it, since it should rarely be triggered.
>
> What exact part is broken ?
> Semantic looks good to me.
It’s broken in that a negative correction may be required in the first place. It places additional burden on every producer of the CN signal who isn’t a tail-dropper. I can only assume that the behaviour was designed with only tail-drop in mind - and as we both know, that is not the only option any more.
It appears to me that there are four things than enqueue() may want to tell its caller:
1: That the packet was enqueued successfully (NET_XMIT_SUCCESS).
2: That the packet was enqueued successfully, but some other relevant packet had to be dropped due to link congestion.
3: That the packet was *not* enqueued, and this was due to link congestion. This is potentially useful for tail-dropping queues, including AQMs.
4: That the packet was *not* enqueued, for some reason other than link congestion; the “error case".
Currently NET_XMIT_CN appears to cover case 3, whereas Cake normally wants cases 1 & 2 (and will only signal case 4 if a GSO aggregate couldn’t be segmented).
For the time being, I have changed my development branch of Cake to always signal case 1 except for the error case.
- Jonathan Morton
next prev parent reply other threads:[~2016-06-12 18:00 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
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 [this message]
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=E65E69C1-9377-46F8-847A-7C7F92EC655D@gmail.com \
--to=chromatix99@gmail.com \
--cc=cake@lists.bufferbloat.net \
--cc=eric.dumazet@gmail.com \
--cc=kevin@darbyshire-bryant.me.uk \
/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