Lines Matching refs:stream

25 static void sctp_sched_rr_unsched_all(struct sctp_stream *stream);
27 static void sctp_sched_rr_next_stream(struct sctp_stream *stream) in sctp_sched_rr_next_stream() argument
31 pos = stream->rr_next->rr_list.next; in sctp_sched_rr_next_stream()
32 if (pos == &stream->rr_list) in sctp_sched_rr_next_stream()
34 stream->rr_next = list_entry(pos, struct sctp_stream_out_ext, rr_list); in sctp_sched_rr_next_stream()
37 static void sctp_sched_rr_unsched(struct sctp_stream *stream, in sctp_sched_rr_unsched() argument
40 if (stream->rr_next == soute) in sctp_sched_rr_unsched()
42 sctp_sched_rr_next_stream(stream); in sctp_sched_rr_unsched()
47 if (list_empty(&stream->rr_list)) in sctp_sched_rr_unsched()
48 stream->rr_next = NULL; in sctp_sched_rr_unsched()
51 static void sctp_sched_rr_sched(struct sctp_stream *stream, in sctp_sched_rr_sched() argument
59 list_add_tail(&soute->rr_list, &stream->rr_list); in sctp_sched_rr_sched()
61 if (!stream->rr_next) in sctp_sched_rr_sched()
62 stream->rr_next = soute; in sctp_sched_rr_sched()
65 static int sctp_sched_rr_set(struct sctp_stream *stream, __u16 sid, in sctp_sched_rr_set() argument
71 static int sctp_sched_rr_get(struct sctp_stream *stream, __u16 sid, in sctp_sched_rr_get() argument
77 static int sctp_sched_rr_init(struct sctp_stream *stream) in sctp_sched_rr_init() argument
79 INIT_LIST_HEAD(&stream->rr_list); in sctp_sched_rr_init()
80 stream->rr_next = NULL; in sctp_sched_rr_init()
85 static int sctp_sched_rr_init_sid(struct sctp_stream *stream, __u16 sid, in sctp_sched_rr_init_sid() argument
88 INIT_LIST_HEAD(&SCTP_SO(stream, sid)->ext->rr_list); in sctp_sched_rr_init_sid()
93 static void sctp_sched_rr_free_sid(struct sctp_stream *stream, __u16 sid) in sctp_sched_rr_free_sid() argument
100 struct sctp_stream *stream; in sctp_sched_rr_enqueue() local
106 stream = &q->asoc->stream; in sctp_sched_rr_enqueue()
107 sctp_sched_rr_sched(stream, SCTP_SO(stream, sid)->ext); in sctp_sched_rr_enqueue()
112 struct sctp_stream *stream = &q->asoc->stream; in sctp_sched_rr_dequeue() local
121 if (stream->out_curr) in sctp_sched_rr_dequeue()
122 soute = stream->out_curr->ext; in sctp_sched_rr_dequeue()
124 soute = stream->rr_next; in sctp_sched_rr_dequeue()
141 soute = SCTP_SO(&q->asoc->stream, sid)->ext; in sctp_sched_rr_dequeue_done()
143 sctp_sched_rr_next_stream(&q->asoc->stream); in sctp_sched_rr_dequeue_done()
146 sctp_sched_rr_unsched(&q->asoc->stream, soute); in sctp_sched_rr_dequeue_done()
149 static void sctp_sched_rr_sched_all(struct sctp_stream *stream) in sctp_sched_rr_sched_all() argument
155 asoc = container_of(stream, struct sctp_association, stream); in sctp_sched_rr_sched_all()
160 soute = SCTP_SO(stream, sid)->ext; in sctp_sched_rr_sched_all()
162 sctp_sched_rr_sched(stream, soute); in sctp_sched_rr_sched_all()
166 static void sctp_sched_rr_unsched_all(struct sctp_stream *stream) in sctp_sched_rr_unsched_all() argument
170 list_for_each_entry_safe(soute, tmp, &stream->rr_list, rr_list) in sctp_sched_rr_unsched_all()
171 sctp_sched_rr_unsched(stream, soute); in sctp_sched_rr_unsched_all()