sctp: introduce stream scheduler foundations
This patch introduces the hooks necessary to do stream scheduling, as per RFC Draft ndata. It also introduces the first scheduler, which is what we do today but now factored out: first come first served (FCFS). With stream scheduling now we have to track which chunk was enqueued on which stream and be able to select another other than the in front of the main outqueue. So we introduce a list on sctp_stream_out_ext structure for this purpose. We reuse sctp_chunk->transmitted_list space for the list above, as the chunk cannot belong to the two lists at the same time. By using the union in there, we can have distinct names for these moments. sctp_sched_ops are the operations expected to be implemented by each scheduler. The dequeueing is a bit particular to this implementation but it is to match how we dequeue packets today. We first dequeue and then check if it fits the packet and if not, we requeue it at head. Thus why we don't have a peek operation but have dequeue_done instead, which is called once the chunk can be safely considered as transmitted. The check removed from sctp_outq_flush is now performed by sctp_stream_outq_migrate, which is only called during assoc setup. (sctp_sendmsg() also checks for it) The only operation that is foreseen but not yet added here is a way to signalize that a new packet is starting or that the packet is done, for round robin scheduler per packet, but is intentionally left to the patch that actually implements it. Support for I-DATA chunks, also described in this RFC, with user message interleaving is straightforward as it just requires the schedulers to probe for the feature and ignore datamsg boundaries when dequeueing. See-also: https://tools.ietf.org/html/draft-ietf-tsvwg-sctp-ndata-13 Tested-by:Xin Long <lucien.xin@gmail.com> Signed-off-by:
Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
parent
2fc019f7
-
mentioned in commit eb93e070
-
mentioned in commit d9ee5afd
-
mentioned in commit 2a8e1d0c
-
mentioned in commit 5d6c0efd
-
mentioned in commit b89fc26f
-
mentioned in commit 181d8d20
-
mentioned in commit 6f350558
-
mentioned in commit aeb2ff9f
-
mentioned in commit 3688939c
-
mentioned in commit e796e1fe
-
mentioned in commit 68b0a38e
-
mentioned in commit d99f144a
-
mentioned in commit 8e0ed463
-
mentioned in commit 8d6dab81
-
mentioned in commit 5bf4a38d
-
mentioned in commit 9f0b7732
-
mentioned in commit 2f201ae1
-
mentioned in commit 667eb99c
-
mentioned in commit 9346a1a2
-
mentioned in commit 0443fff4
Please register or sign in to comment