Lines Matching full:stream

7  * These functions manipulate sctp stream queue/scheduling.
26 static void sctp_sched_prio_unsched_all(struct sctp_stream *stream);
41 struct sctp_stream *stream, int prio, gfp_t gfp) in sctp_sched_prio_new_head() argument
59 struct sctp_stream *stream, int prio, gfp_t gfp) in sctp_sched_prio_get_head() argument
67 list_for_each_entry(p, &stream->prio_list, prio_sched) { in sctp_sched_prio_get_head()
75 for (i = 0; i < stream->outcnt; i++) { in sctp_sched_prio_get_head()
76 if (!SCTP_SO(stream, i)->ext) in sctp_sched_prio_get_head()
79 p = SCTP_SO(stream, i)->ext->prio_head; in sctp_sched_prio_get_head()
90 return sctp_sched_prio_new_head(stream, prio, gfp); in sctp_sched_prio_get_head()
114 /* Try to move to the next stream */ in sctp_sched_prio_unsched()
119 /* Also unsched the priority if this was the last stream */ in sctp_sched_prio_unsched()
122 /* If there is no stream left, clear next */ in sctp_sched_prio_unsched()
130 static void sctp_sched_prio_sched(struct sctp_stream *stream, in sctp_sched_prio_sched() argument
141 /* Schedule the stream. If there is a next, we schedule the new in sctp_sched_prio_sched()
153 list_for_each_entry(prio, &stream->prio_list, prio_sched) { in sctp_sched_prio_sched()
160 list_add_tail(&prio_head->prio_sched, &stream->prio_list); in sctp_sched_prio_sched()
163 static int sctp_sched_prio_set(struct sctp_stream *stream, __u16 sid, in sctp_sched_prio_set() argument
166 struct sctp_stream_out *sout = SCTP_SO(stream, sid); in sctp_sched_prio_set()
175 prio_head = sctp_sched_prio_get_head(stream, prio, gfp); in sctp_sched_prio_set()
182 sctp_sched_prio_sched(stream, soute); in sctp_sched_prio_set()
188 static int sctp_sched_prio_get(struct sctp_stream *stream, __u16 sid, in sctp_sched_prio_get() argument
191 *value = SCTP_SO(stream, sid)->ext->prio_head->prio; in sctp_sched_prio_get()
195 static int sctp_sched_prio_init(struct sctp_stream *stream) in sctp_sched_prio_init() argument
197 INIT_LIST_HEAD(&stream->prio_list); in sctp_sched_prio_init()
202 static int sctp_sched_prio_init_sid(struct sctp_stream *stream, __u16 sid, in sctp_sched_prio_init_sid() argument
205 INIT_LIST_HEAD(&SCTP_SO(stream, sid)->ext->prio_list); in sctp_sched_prio_init_sid()
206 return sctp_sched_prio_set(stream, sid, 0, gfp); in sctp_sched_prio_init_sid()
209 static void sctp_sched_prio_free_sid(struct sctp_stream *stream, __u16 sid) in sctp_sched_prio_free_sid() argument
211 sctp_sched_prio_head_put(SCTP_SO(stream, sid)->ext->prio_head); in sctp_sched_prio_free_sid()
212 SCTP_SO(stream, sid)->ext->prio_head = NULL; in sctp_sched_prio_free_sid()
218 struct sctp_stream *stream; in sctp_sched_prio_enqueue() local
224 stream = &q->asoc->stream; in sctp_sched_prio_enqueue()
225 sctp_sched_prio_sched(stream, SCTP_SO(stream, sid)->ext); in sctp_sched_prio_enqueue()
230 struct sctp_stream *stream = &q->asoc->stream; in sctp_sched_prio_dequeue() local
240 * one or the first chunk on the next active stream. in sctp_sched_prio_dequeue()
242 if (stream->out_curr) { in sctp_sched_prio_dequeue()
243 soute = stream->out_curr->ext; in sctp_sched_prio_dequeue()
245 prio = list_entry(stream->prio_list.next, in sctp_sched_prio_dequeue()
263 /* Last chunk on that msg, move to the next stream on in sctp_sched_prio_dequeue_done()
267 soute = SCTP_SO(&q->asoc->stream, sid)->ext; in sctp_sched_prio_dequeue_done()
276 static void sctp_sched_prio_sched_all(struct sctp_stream *stream) in sctp_sched_prio_sched_all() argument
282 asoc = container_of(stream, struct sctp_association, stream); in sctp_sched_prio_sched_all()
287 sout = SCTP_SO(stream, sid); in sctp_sched_prio_sched_all()
289 sctp_sched_prio_sched(stream, sout->ext); in sctp_sched_prio_sched_all()
293 static void sctp_sched_prio_unsched_all(struct sctp_stream *stream) in sctp_sched_prio_unsched_all() argument
298 list_for_each_entry_safe(p, tmp, &stream->prio_list, prio_sched) in sctp_sched_prio_unsched_all()