Commit db47fa2e authored by Paolo Abeni's avatar Paolo Abeni
Browse files

Merge branch 'sctp-add-another-two-stream-schedulers'

Xin Long says:

====================
sctp: add another two stream schedulers

All SCTP stream schedulers are defined in rfc8260#section-3,
First-Come First-Served, Round-Robin and Priority-Based
Schedulers are already added in kernel.

This patchset adds another two schedulers: Fair Capacity
Scheduler and Weighted Fair Queueing Scheduler.

Note that the left one "Round-Robin Scheduler per Packet"
Scheduler is not implemented by this patch, as it's still
intrusive to be added in the current SCTP kernel code.
====================

Link: https://lore.kernel.org/r/cover.1678224012.git.lucien.xin@gmail.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parents 46ca833c 42d452e7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -58,5 +58,7 @@ void sctp_sched_ops_register(enum sctp_sched_type sched,
			     struct sctp_sched_ops *sched_ops);
void sctp_sched_ops_prio_init(void);
void sctp_sched_ops_rr_init(void);
void sctp_sched_ops_fc_init(void);
void sctp_sched_ops_wfq_init(void);

#endif /* __sctp_stream_sched_h__ */
+8 −0
Original line number Diff line number Diff line
@@ -1429,6 +1429,11 @@ struct sctp_stream_out_ext {
		struct {
			struct list_head rr_list;
		};
		struct {
			struct list_head fc_list;
			__u32 fc_length;
			__u16 fc_weight;
		};
	};
};

@@ -1475,6 +1480,9 @@ struct sctp_stream {
			/* The next stream in line */
			struct sctp_stream_out_ext *rr_next;
		};
		struct {
			struct list_head fc_list;
		};
	};
	struct sctp_stream_interleave *si;
};
+3 −1
Original line number Diff line number Diff line
@@ -1211,7 +1211,9 @@ enum sctp_sched_type {
	SCTP_SS_DEFAULT = SCTP_SS_FCFS,
	SCTP_SS_PRIO,
	SCTP_SS_RR,
	SCTP_SS_MAX = SCTP_SS_RR
	SCTP_SS_FC,
	SCTP_SS_WFQ,
	SCTP_SS_MAX = SCTP_SS_WFQ
};

/* Probe Interval socket option */
+2 −1
Original line number Diff line number Diff line
@@ -13,7 +13,8 @@ sctp-y := sm_statetable.o sm_statefuns.o sm_sideeffect.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_interleave.o
	  stream_sched_rr.o stream_sched_fc.o \
	  stream_interleave.o

sctp_diag-y := diag.o

+2 −0
Original line number Diff line number Diff line
@@ -124,6 +124,8 @@ void sctp_sched_ops_init(void)
	sctp_sched_ops_fcfs_init();
	sctp_sched_ops_prio_init();
	sctp_sched_ops_rr_init();
	sctp_sched_ops_fc_init();
	sctp_sched_ops_wfq_init();
}

static void sctp_sched_free_sched(struct sctp_stream *stream)
Loading