summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>2017-10-03 19:20:17 -0300
committerDavid S. Miller <davem@davemloft.net>2017-10-03 16:27:29 -0700
commitac1ed8b82cd60ba8e7d84103ac1414b8c577c485 (patch)
tree23144fff13a5bb0ac5a84f429fd8ac768b49a214 /include
parent637784ade221a3c8a7ecd0f583eddd95d6276b9a (diff)
sctp: introduce round robin stream scheduler
This patch introduces RFC Draft ndata section 3.2 Priority Based Scheduler (SCTP_SS_RR). Works by maintaining a list of enqueued streams and tracking the last one used to send data. When the datamsg is done, it switches to the next stream. 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>
Diffstat (limited to 'include')
-rw-r--r--include/net/sctp/structs.h11
-rw-r--r--include/uapi/linux/sctp.h3
2 files changed, 13 insertions, 1 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 40eb8d66a37c..16f949eef52f 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1348,6 +1348,10 @@ struct sctp_stream_out_ext {
struct list_head prio_list;
struct sctp_stream_priorities *prio_head;
};
+ /* Fields used by RR scheduler */
+ struct {
+ struct list_head rr_list;
+ };
};
};
@@ -1374,6 +1378,13 @@ struct sctp_stream {
/* List of priorities scheduled */
struct list_head prio_list;
};
+ /* Fields used by RR scheduler */
+ struct {
+ /* List of streams scheduled */
+ struct list_head rr_list;
+ /* The next stream stream in line */
+ struct sctp_stream_out_ext *rr_next;
+ };
};
};
diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
index 850fa8b29d7e..6cd7d416ca40 100644
--- a/include/uapi/linux/sctp.h
+++ b/include/uapi/linux/sctp.h
@@ -1100,7 +1100,8 @@ struct sctp_add_streams {
enum sctp_sched_type {
SCTP_SS_FCFS,
SCTP_SS_PRIO,
- SCTP_SS_MAX = SCTP_SS_PRIO
+ SCTP_SS_RR,
+ SCTP_SS_MAX = SCTP_SS_RR
};
#endif /* _UAPI_SCTP_H */