• Home
  • Raw
  • Download

Lines Matching full:stream

6  * These functions manipulate sctp stream queue/scheduling.
40 static void sctp_sched_rr_unsched_all(struct sctp_stream *stream);
42 static void sctp_sched_rr_next_stream(struct sctp_stream *stream) in sctp_sched_rr_next_stream() argument
46 pos = stream->rr_next->rr_list.next; in sctp_sched_rr_next_stream()
47 if (pos == &stream->rr_list) in sctp_sched_rr_next_stream()
49 stream->rr_next = list_entry(pos, struct sctp_stream_out_ext, rr_list); in sctp_sched_rr_next_stream()
52 static void sctp_sched_rr_unsched(struct sctp_stream *stream, in sctp_sched_rr_unsched() argument
55 if (stream->rr_next == soute) in sctp_sched_rr_unsched()
56 /* Try to move to the next stream */ in sctp_sched_rr_unsched()
57 sctp_sched_rr_next_stream(stream); in sctp_sched_rr_unsched()
61 /* If we have no other stream queued, clear next */ in sctp_sched_rr_unsched()
62 if (list_empty(&stream->rr_list)) in sctp_sched_rr_unsched()
63 stream->rr_next = NULL; in sctp_sched_rr_unsched()
66 static void sctp_sched_rr_sched(struct sctp_stream *stream, in sctp_sched_rr_sched() argument
73 /* Schedule the stream */ in sctp_sched_rr_sched()
74 list_add_tail(&soute->rr_list, &stream->rr_list); in sctp_sched_rr_sched()
76 if (!stream->rr_next) in sctp_sched_rr_sched()
77 stream->rr_next = soute; in sctp_sched_rr_sched()
80 static int sctp_sched_rr_set(struct sctp_stream *stream, __u16 sid, in sctp_sched_rr_set() argument
86 static int sctp_sched_rr_get(struct sctp_stream *stream, __u16 sid, in sctp_sched_rr_get() argument
92 static int sctp_sched_rr_init(struct sctp_stream *stream) in sctp_sched_rr_init() argument
94 INIT_LIST_HEAD(&stream->rr_list); in sctp_sched_rr_init()
95 stream->rr_next = NULL; in sctp_sched_rr_init()
100 static int sctp_sched_rr_init_sid(struct sctp_stream *stream, __u16 sid, in sctp_sched_rr_init_sid() argument
103 INIT_LIST_HEAD(&SCTP_SO(stream, sid)->ext->rr_list); in sctp_sched_rr_init_sid()
108 static void sctp_sched_rr_free(struct sctp_stream *stream) in sctp_sched_rr_free() argument
110 sctp_sched_rr_unsched_all(stream); in sctp_sched_rr_free()
116 struct sctp_stream *stream; in sctp_sched_rr_enqueue() local
122 stream = &q->asoc->stream; in sctp_sched_rr_enqueue()
123 sctp_sched_rr_sched(stream, SCTP_SO(stream, sid)->ext); in sctp_sched_rr_enqueue()
128 struct sctp_stream *stream = &q->asoc->stream; in sctp_sched_rr_dequeue() local
137 if (stream->out_curr) in sctp_sched_rr_dequeue()
138 soute = stream->out_curr->ext; in sctp_sched_rr_dequeue()
140 soute = stream->rr_next; in sctp_sched_rr_dequeue()
155 /* Last chunk on that msg, move to the next stream */ in sctp_sched_rr_dequeue_done()
157 soute = SCTP_SO(&q->asoc->stream, sid)->ext; in sctp_sched_rr_dequeue_done()
159 sctp_sched_rr_next_stream(&q->asoc->stream); in sctp_sched_rr_dequeue_done()
162 sctp_sched_rr_unsched(&q->asoc->stream, soute); in sctp_sched_rr_dequeue_done()
165 static void sctp_sched_rr_sched_all(struct sctp_stream *stream) in sctp_sched_rr_sched_all() argument
171 asoc = container_of(stream, struct sctp_association, stream); in sctp_sched_rr_sched_all()
176 soute = SCTP_SO(stream, sid)->ext; in sctp_sched_rr_sched_all()
178 sctp_sched_rr_sched(stream, soute); in sctp_sched_rr_sched_all()
182 static void sctp_sched_rr_unsched_all(struct sctp_stream *stream) in sctp_sched_rr_unsched_all() argument
186 list_for_each_entry_safe(soute, tmp, &stream->rr_list, rr_list) in sctp_sched_rr_unsched_all()
187 sctp_sched_rr_unsched(stream, soute); in sctp_sched_rr_unsched_all()