Lines Matching defs:stream
7 * These functions manipulate sctp stream queue/scheduling.
25 static int sctp_sched_fcfs_set(struct sctp_stream *stream, __u16 sid,
31 static int sctp_sched_fcfs_get(struct sctp_stream *stream, __u16 sid,
38 static int sctp_sched_fcfs_init(struct sctp_stream *stream)
43 static int sctp_sched_fcfs_init_sid(struct sctp_stream *stream, __u16 sid,
49 static void sctp_sched_fcfs_free_sid(struct sctp_stream *stream, __u16 sid)
60 struct sctp_stream *stream = &q->asoc->stream;
67 if (stream->out_curr) {
68 ch = list_entry(stream->out_curr->ext->outq.next,
86 static void sctp_sched_fcfs_sched_all(struct sctp_stream *stream)
90 static void sctp_sched_fcfs_unsched_all(struct sctp_stream *stream)
131 static void sctp_sched_free_sched(struct sctp_stream *stream)
133 struct sctp_sched_ops *sched = sctp_sched_ops_from_stream(stream);
137 sched->unsched_all(stream);
138 for (i = 0; i < stream->outcnt; i++) {
139 soute = SCTP_SO(stream, i)->ext;
142 sched->free_sid(stream, i);
165 sctp_sched_free_sched(&asoc->stream);
168 n->init(&asoc->stream);
169 for (i = 0; i < asoc->stream.outcnt; i++) {
170 if (!SCTP_SO(&asoc->stream, i)->ext)
173 ret = n->init_sid(&asoc->stream, i, GFP_ATOMIC);
189 sctp_sched_free_sched(&asoc->stream);
209 if (sid >= asoc->stream.outcnt)
212 if (!SCTP_SO(&asoc->stream, sid)->ext) {
215 ret = sctp_stream_init_ext(&asoc->stream, sid);
220 return asoc->outqueue.sched->set(&asoc->stream, sid, value, gfp);
226 if (sid >= asoc->stream.outcnt)
229 if (!SCTP_SO(&asoc->stream, sid)->ext)
232 return asoc->outqueue.sched->get(&asoc->stream, sid, value);
244 * priority stream comes in.
247 sout = SCTP_SO(&q->asoc->stream, sid);
248 q->asoc->stream.out_curr = sout;
252 q->asoc->stream.out_curr = NULL;
264 int sctp_sched_init_sid(struct sctp_stream *stream, __u16 sid, gfp_t gfp)
266 struct sctp_sched_ops *sched = sctp_sched_ops_from_stream(stream);
267 struct sctp_stream_out_ext *ext = SCTP_SO(stream, sid)->ext;
270 return sched->init_sid(stream, sid, gfp);
273 struct sctp_sched_ops *sctp_sched_ops_from_stream(struct sctp_stream *stream)
277 asoc = container_of(stream, struct sctp_association, stream);