From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Xin Long <lucien.xin@gmail.com>
Cc: network dev <netdev@vger.kernel.org>,
linux-sctp@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Neil Horman <nhorman@tuxdriver.com>
Subject: Re: [PATCH net-next 1/2] sctp: add fair capacity stream scheduler
Date: Tue, 7 Mar 2023 18:48:48 -0300 [thread overview]
Message-ID: <ZAexQCrc/5rmE1iw@t14s.localdomain> (raw)
In-Reply-To: <3e977ca635d6b8ef8440d5eed2617a4f3a04b15b.1678224012.git.lucien.xin@gmail.com>
On Tue, Mar 07, 2023 at 04:23:26PM -0500, Xin Long wrote:
> As it says in rfc8260#section-3.5 about the fair capacity scheduler:
>
> A fair capacity distribution between the streams is used. This
> scheduler considers the lengths of the messages of each stream and
> schedules them in a specific way to maintain an equal capacity for
> all streams. The details are implementation dependent. interleaving
> user messages allows for a better realization of the fair capacity
> usage.
>
> This patch adds Fair Capacity Scheduler based on the foundations added
> by commit 5bbbbe32a431 ("sctp: introduce stream scheduler foundations"):
>
> A fc_list and a fc_length are added into struct sctp_stream_out_ext and
> a fc_list is added into struct sctp_stream. In .enqueue, when there are
> chunks enqueued into a stream, this stream will be linked into stream->
> fc_list by its fc_list ordered by its fc_length. In .dequeue, it always
> picks up the 1st skb from stream->fc_list. In .dequeue_done, fc_length
> is increased by chunk's len and update its location in stream->fc_list
> according to the its new fc_length.
>
> Note that when the new fc_length overflows in .dequeue_done, instead of
> resetting all fc_lengths to 0, we only reduced them by U32_MAX / 4 to
> avoid a moment of imbalance in the scheduling, as Marcelo suggested.
>
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
next prev parent reply other threads:[~2023-03-07 21:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-07 21:23 [PATCH net-next 0/2] sctp: add another two stream schedulers Xin Long
2023-03-07 21:23 ` [PATCH net-next 1/2] sctp: add fair capacity stream scheduler Xin Long
2023-03-07 21:48 ` Marcelo Ricardo Leitner [this message]
2023-03-09 10:31 ` Paolo Abeni
2023-03-10 0:38 ` Xin Long
2023-03-07 21:23 ` [PATCH net-next 2/2] sctp: add weighted fair queueing " Xin Long
2023-03-07 21:49 ` Marcelo Ricardo Leitner
2023-03-09 10:40 ` [PATCH net-next 0/2] sctp: add another two stream schedulers patchwork-bot+netdevbpf
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=ZAexQCrc/5rmE1iw@t14s.localdomain \
--to=marcelo.leitner@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=pabeni@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox