From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Eric Dumazet <eric.dumazet@gmail.com>, netdev@vger.kernel.org
Cc: cake@lists.bufferbloat.net, "Toke Høiland-Jørgensen" <toke@redhat.com>
Subject: Re: [PATCH 3/4] sch_api: Allow reducing queue backlog by a negative value
Date: Tue, 08 Jan 2019 10:55:51 +0100 [thread overview]
Message-ID: <87zhsbv5g8.fsf@toke.dk> (raw)
In-Reply-To: <69d53b63-f7ed-3c6e-f191-43ec7fbd1735@gmail.com>
Eric Dumazet <eric.dumazet@gmail.com> writes:
> On 01/07/2019 11:47 AM, Toke Høiland-Jørgensen wrote:
>> From: Toke Høiland-Jørgensen <toke@redhat.com>
>>
>> With GSO splitting in sch_cake, we can decrease as well as increase the
>> qlen. To make it possible to signal this up the qdisc tree, change
>> qdisc_tree_reduce_backlog() to accept signed integer values as the number
>> of packets and bytes to reduce the backlog by.
>
>
> Not sure why this patch is needed, given we use u32 integers
> for q.qlen & qstats.backlog
>
> 0xFFFFFFFF for n is really -1 once folded...
>
> sch->q.qlen -= n;
> sch->qstats.backlog -= len;
Sure, it works without the patch, but changing to int properly
communicates the intent (that negative values are allowed) rather than
rely on overflow behaviour...
-Toke
next prev parent reply other threads:[~2019-01-08 9:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-07 19:47 [PATCH 0/4] sched: Fix qdisc interactions exposed by using sch_cake as a leaf qdisc Toke Høiland-Jørgensen
2019-01-07 19:47 ` [PATCH 1/4] sched: Avoid dereferencing skb pointer after child enqueue Toke Høiland-Jørgensen
2019-01-09 1:38 ` Cong Wang
2019-01-09 8:14 ` Toke Høiland-Jørgensen
2019-01-10 18:16 ` Cong Wang
2019-01-07 19:47 ` [PATCH 2/4] sched: Fix detection of empty queues in child qdiscs Toke Høiland-Jørgensen
2019-01-07 19:47 ` [PATCH 3/4] sch_api: Allow reducing queue backlog by a negative value Toke Høiland-Jørgensen
2019-01-07 20:54 ` Eric Dumazet
2019-01-08 9:55 ` Toke Høiland-Jørgensen [this message]
2019-01-07 19:47 ` [PATCH 4/4] sch_cake: Correctly update parent qlen when splitting GSO packets Toke Høiland-Jørgensen
2019-01-08 21:30 ` [PATCH 0/4] sched: Fix qdisc interactions exposed by using sch_cake as a leaf qdisc David Miller
2019-01-09 8:37 ` Toke Høiland-Jørgensen
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=87zhsbv5g8.fsf@toke.dk \
--to=toke@toke.dk \
--cc=cake@lists.bufferbloat.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=toke@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.