mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 21:51:40 +00:00
4821a076eb
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 5bbbbe32a4
("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>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
26 lines
726 B
Makefile
26 lines
726 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for SCTP support code.
|
|
#
|
|
|
|
obj-$(CONFIG_IP_SCTP) += sctp.o
|
|
obj-$(CONFIG_INET_SCTP_DIAG) += sctp_diag.o
|
|
|
|
sctp-y := sm_statetable.o sm_statefuns.o sm_sideeffect.o \
|
|
protocol.o endpointola.o associola.o \
|
|
transport.o chunk.o sm_make_chunk.o ulpevent.o \
|
|
inqueue.o outqueue.o ulpqueue.o \
|
|
tsnmap.o bind_addr.o socket.o primitive.o \
|
|
output.o input.o debug.o stream.o auth.o \
|
|
offload.o stream_sched.o stream_sched_prio.o \
|
|
stream_sched_rr.o stream_sched_fc.o \
|
|
stream_interleave.o
|
|
|
|
sctp_diag-y := diag.o
|
|
|
|
sctp-$(CONFIG_SCTP_DBG_OBJCNT) += objcnt.o
|
|
sctp-$(CONFIG_PROC_FS) += proc.o
|
|
sctp-$(CONFIG_SYSCTL) += sysctl.o
|
|
|
|
sctp-$(subst m,y,$(CONFIG_IPV6)) += ipv6.o
|