Lines Matching defs:stream

7  * These functions manipulate sctp stream queue/scheduling.
25 static void sctp_sched_rr_unsched_all(struct sctp_stream *stream);
27 static void sctp_sched_rr_next_stream(struct sctp_stream *stream)
31 pos = stream->rr_next->rr_list.next;
32 if (pos == &stream->rr_list)
34 stream->rr_next = list_entry(pos, struct sctp_stream_out_ext, rr_list);
37 static void sctp_sched_rr_unsched(struct sctp_stream *stream,
40 if (stream->rr_next == soute)
41 /* Try to move to the next stream */
42 sctp_sched_rr_next_stream(stream);
46 /* If we have no other stream queued, clear next */
47 if (list_empty(&stream->rr_list))
48 stream->rr_next = NULL;
51 static void sctp_sched_rr_sched(struct sctp_stream *stream,
58 /* Schedule the stream */
59 list_add_tail(&soute->rr_list, &stream->rr_list);
61 if (!stream->rr_next)
62 stream->rr_next = soute;
65 static int sctp_sched_rr_set(struct sctp_stream *stream, __u16 sid,
71 static int sctp_sched_rr_get(struct sctp_stream *stream, __u16 sid,
77 static int sctp_sched_rr_init(struct sctp_stream *stream)
79 INIT_LIST_HEAD(&stream->rr_list);
80 stream->rr_next = NULL;
85 static int sctp_sched_rr_init_sid(struct sctp_stream *stream, __u16 sid,
88 INIT_LIST_HEAD(&SCTP_SO(stream, sid)->ext->rr_list);
93 static void sctp_sched_rr_free_sid(struct sctp_stream *stream, __u16 sid)
100 struct sctp_stream *stream;
106 stream = &q->asoc->stream;
107 sctp_sched_rr_sched(stream, SCTP_SO(stream, sid)->ext);
112 struct sctp_stream *stream = &q->asoc->stream;
121 if (stream->out_curr)
122 soute = stream->out_curr->ext;
124 soute = stream->rr_next;
139 /* Last chunk on that msg, move to the next stream */
141 soute = SCTP_SO(&q->asoc->stream, sid)->ext;
143 sctp_sched_rr_next_stream(&q->asoc->stream);
146 sctp_sched_rr_unsched(&q->asoc->stream, soute);
149 static void sctp_sched_rr_sched_all(struct sctp_stream *stream)
155 asoc = container_of(stream, struct sctp_association, stream);
160 soute = SCTP_SO(stream, sid)->ext;
162 sctp_sched_rr_sched(stream, soute);
166 static void sctp_sched_rr_unsched_all(struct sctp_stream *stream)
170 list_for_each_entry_safe(soute, tmp, &stream->rr_list, rr_list)
171 sctp_sched_rr_unsched(stream, soute);