Lines Matching full:asoc
50 sctp_ss_default_init(struct sctp_tcb *stcb, struct sctp_association *asoc) in sctp_ss_default_init() argument
56 asoc->ss_data.locked_on_sending = NULL; in sctp_ss_default_init()
57 asoc->ss_data.last_out_stream = NULL; in sctp_ss_default_init()
58 TAILQ_INIT(&asoc->ss_data.out.wheel); in sctp_ss_default_init()
64 for (i = 0; i < asoc->streamoutcnt; i++) { in sctp_ss_default_init()
65 stcb->asoc.ss_functions.sctp_ss_add_to_stream(stcb, asoc, in sctp_ss_default_init()
66 &asoc->strmout[i], in sctp_ss_default_init()
73 sctp_ss_default_clear(struct sctp_tcb *stcb, struct sctp_association *asoc, in sctp_ss_default_clear() argument
78 while (!TAILQ_EMPTY(&asoc->ss_data.out.wheel)) { in sctp_ss_default_clear()
81 strq = TAILQ_FIRST(&asoc->ss_data.out.wheel); in sctp_ss_default_clear()
83 TAILQ_REMOVE(&asoc->ss_data.out.wheel, strq, ss_params.ss.rr.next_spoke); in sctp_ss_default_clear()
86 asoc->ss_data.last_out_stream = NULL; in sctp_ss_default_clear()
96 if (stcb->asoc.ss_data.locked_on_sending == with_strq) { in sctp_ss_default_init_stream()
97 stcb->asoc.ss_data.locked_on_sending = strq; in sctp_ss_default_init_stream()
99 if (stcb->asoc.ss_data.last_out_stream == with_strq) { in sctp_ss_default_init_stream()
100 stcb->asoc.ss_data.last_out_stream = strq; in sctp_ss_default_init_stream()
108 sctp_ss_default_add(struct sctp_tcb *stcb, struct sctp_association *asoc, in sctp_ss_default_add() argument
116 TAILQ_INSERT_TAIL(&asoc->ss_data.out.wheel, in sctp_ss_default_add()
124 sctp_ss_default_is_empty(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc) in sctp_ss_default_is_empty() argument
128 return (TAILQ_EMPTY(&asoc->ss_data.out.wheel)); in sctp_ss_default_is_empty()
132 sctp_ss_default_remove(struct sctp_tcb *stcb, struct sctp_association *asoc, in sctp_ss_default_remove() argument
143 if (asoc->ss_data.last_out_stream == strq) { in sctp_ss_default_remove()
144 asoc->ss_data.last_out_stream = TAILQ_PREV(asoc->ss_data.last_out_stream, in sctp_ss_default_remove()
147 if (asoc->ss_data.last_out_stream == NULL) { in sctp_ss_default_remove()
148 asoc->ss_data.last_out_stream = TAILQ_LAST(&asoc->ss_data.out.wheel, in sctp_ss_default_remove()
151 if (asoc->ss_data.last_out_stream == strq) { in sctp_ss_default_remove()
152 asoc->ss_data.last_out_stream = NULL; in sctp_ss_default_remove()
155 if (asoc->ss_data.locked_on_sending == strq) { in sctp_ss_default_remove()
156 asoc->ss_data.locked_on_sending = NULL; in sctp_ss_default_remove()
158 TAILQ_REMOVE(&asoc->ss_data.out.wheel, strq, ss_params.ss.rr.next_spoke); in sctp_ss_default_remove()
166 struct sctp_association *asoc) in sctp_ss_default_select() argument
172 if (asoc->ss_data.locked_on_sending != NULL) { in sctp_ss_default_select()
173 KASSERT(asoc->ss_data.locked_on_sending->ss_params.scheduled, in sctp_ss_default_select()
175 (void *)asoc->ss_data.locked_on_sending)); in sctp_ss_default_select()
176 return (asoc->ss_data.locked_on_sending); in sctp_ss_default_select()
178 strqt = asoc->ss_data.last_out_stream; in sctp_ss_default_select()
184 strq = TAILQ_FIRST(&asoc->ss_data.out.wheel); in sctp_ss_default_select()
188 strq = TAILQ_FIRST(&asoc->ss_data.out.wheel); in sctp_ss_default_select()
208 if (strq == asoc->ss_data.last_out_stream) { in sctp_ss_default_select()
222 struct sctp_association *asoc, in sctp_ss_default_scheduled() argument
232 asoc->ss_data.last_out_stream = strq; in sctp_ss_default_scheduled()
233 if (asoc->idata_supported == 0) { in sctp_ss_default_scheduled()
236 asoc->ss_data.locked_on_sending = strq; in sctp_ss_default_scheduled()
238 asoc->ss_data.locked_on_sending = NULL; in sctp_ss_default_scheduled()
241 asoc->ss_data.locked_on_sending = NULL; in sctp_ss_default_scheduled()
248 struct sctp_association *asoc SCTP_UNUSED) in sctp_ss_default_packet_done()
257 sctp_ss_default_get_value(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc SCTP_UNU… in sctp_ss_default_get_value()
267 sctp_ss_default_set_value(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc SCTP_UNU… in sctp_ss_default_set_value()
277 …s_default_is_user_msgs_incomplete(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc) in sctp_ss_default_is_user_msgs_incomplete() argument
284 if (asoc->stream_queue_cnt != 1) { in sctp_ss_default_is_user_msgs_incomplete()
287 strq = asoc->ss_data.locked_on_sending; in sctp_ss_default_is_user_msgs_incomplete()
303 sctp_ss_rr_add(struct sctp_tcb *stcb, struct sctp_association *asoc, in sctp_ss_rr_add() argument
312 if (TAILQ_EMPTY(&asoc->ss_data.out.wheel)) { in sctp_ss_rr_add()
313 TAILQ_INSERT_HEAD(&asoc->ss_data.out.wheel, strq, ss_params.ss.rr.next_spoke); in sctp_ss_rr_add()
315 strqt = TAILQ_FIRST(&asoc->ss_data.out.wheel); in sctp_ss_rr_add()
322 TAILQ_INSERT_TAIL(&asoc->ss_data.out.wheel, strq, ss_params.ss.rr.next_spoke); in sctp_ss_rr_add()
337 struct sctp_association *asoc) in sctp_ss_rrp_select() argument
341 return (asoc->ss_data.last_out_stream); in sctp_ss_rrp_select()
346 struct sctp_association *asoc) in sctp_ss_rrp_packet_done() argument
352 strqt = asoc->ss_data.last_out_stream; in sctp_ss_rrp_packet_done()
358 strq = TAILQ_FIRST(&asoc->ss_data.out.wheel); in sctp_ss_rrp_packet_done()
362 strq = TAILQ_FIRST(&asoc->ss_data.out.wheel); in sctp_ss_rrp_packet_done()
382 if (strq == asoc->ss_data.last_out_stream) { in sctp_ss_rrp_packet_done()
390 asoc->ss_data.last_out_stream = strq; in sctp_ss_rrp_packet_done()
399 sctp_ss_prio_clear(struct sctp_tcb *stcb, struct sctp_association *asoc, in sctp_ss_prio_clear() argument
404 while (!TAILQ_EMPTY(&asoc->ss_data.out.wheel)) { in sctp_ss_prio_clear()
407 strq = TAILQ_FIRST(&asoc->ss_data.out.wheel); in sctp_ss_prio_clear()
412 TAILQ_REMOVE(&asoc->ss_data.out.wheel, strq, ss_params.ss.prio.next_spoke); in sctp_ss_prio_clear()
415 asoc->ss_data.last_out_stream = NULL; in sctp_ss_prio_clear()
425 if (stcb->asoc.ss_data.locked_on_sending == with_strq) { in sctp_ss_prio_init_stream()
426 stcb->asoc.ss_data.locked_on_sending = strq; in sctp_ss_prio_init_stream()
428 if (stcb->asoc.ss_data.last_out_stream == with_strq) { in sctp_ss_prio_init_stream()
429 stcb->asoc.ss_data.last_out_stream = strq; in sctp_ss_prio_init_stream()
442 sctp_ss_prio_add(struct sctp_tcb *stcb, struct sctp_association *asoc, in sctp_ss_prio_add() argument
451 if (TAILQ_EMPTY(&asoc->ss_data.out.wheel)) { in sctp_ss_prio_add()
452 TAILQ_INSERT_HEAD(&asoc->ss_data.out.wheel, strq, ss_params.ss.prio.next_spoke); in sctp_ss_prio_add()
454 strqt = TAILQ_FIRST(&asoc->ss_data.out.wheel); in sctp_ss_prio_add()
461 TAILQ_INSERT_TAIL(&asoc->ss_data.out.wheel, strq, ss_params.ss.prio.next_spoke); in sctp_ss_prio_add()
470 sctp_ss_prio_remove(struct sctp_tcb *stcb, struct sctp_association *asoc, in sctp_ss_prio_remove() argument
480 if (asoc->ss_data.last_out_stream == strq) { in sctp_ss_prio_remove()
481 asoc->ss_data.last_out_stream = TAILQ_PREV(asoc->ss_data.last_out_stream, in sctp_ss_prio_remove()
484 if (asoc->ss_data.last_out_stream == NULL) { in sctp_ss_prio_remove()
485 asoc->ss_data.last_out_stream = TAILQ_LAST(&asoc->ss_data.out.wheel, in sctp_ss_prio_remove()
488 if (asoc->ss_data.last_out_stream == strq) { in sctp_ss_prio_remove()
489 asoc->ss_data.last_out_stream = NULL; in sctp_ss_prio_remove()
492 if (asoc->ss_data.locked_on_sending == strq) { in sctp_ss_prio_remove()
493 asoc->ss_data.locked_on_sending = NULL; in sctp_ss_prio_remove()
495 TAILQ_REMOVE(&asoc->ss_data.out.wheel, strq, ss_params.ss.prio.next_spoke); in sctp_ss_prio_remove()
503 struct sctp_association *asoc) in sctp_ss_prio_select() argument
509 if (asoc->ss_data.locked_on_sending != NULL) { in sctp_ss_prio_select()
510 KASSERT(asoc->ss_data.locked_on_sending->ss_params.scheduled, in sctp_ss_prio_select()
512 (void *)asoc->ss_data.locked_on_sending)); in sctp_ss_prio_select()
513 return (asoc->ss_data.locked_on_sending); in sctp_ss_prio_select()
515 strqt = asoc->ss_data.last_out_stream; in sctp_ss_prio_select()
521 strq = TAILQ_FIRST(&asoc->ss_data.out.wheel); in sctp_ss_prio_select()
528 strq = TAILQ_FIRST(&asoc->ss_data.out.wheel); in sctp_ss_prio_select()
548 if (strq == asoc->ss_data.last_out_stream) { in sctp_ss_prio_select()
560 sctp_ss_prio_get_value(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc SCTP_UNUSED, in sctp_ss_prio_get_value()
573 sctp_ss_prio_set_value(struct sctp_tcb *stcb, struct sctp_association *asoc, in sctp_ss_prio_set_value() argument
582 sctp_ss_prio_remove(stcb, asoc, strq, NULL); in sctp_ss_prio_set_value()
583 sctp_ss_prio_add(stcb, asoc, strq, NULL); in sctp_ss_prio_set_value()
592 sctp_ss_fb_clear(struct sctp_tcb *stcb, struct sctp_association *asoc, in sctp_ss_fb_clear() argument
597 while (!TAILQ_EMPTY(&asoc->ss_data.out.wheel)) { in sctp_ss_fb_clear()
600 strq = TAILQ_FIRST(&asoc->ss_data.out.wheel); in sctp_ss_fb_clear()
605 TAILQ_REMOVE(&asoc->ss_data.out.wheel, strq, ss_params.ss.fb.next_spoke); in sctp_ss_fb_clear()
608 asoc->ss_data.last_out_stream = NULL; in sctp_ss_fb_clear()
618 if (stcb->asoc.ss_data.locked_on_sending == with_strq) { in sctp_ss_fb_init_stream()
619 stcb->asoc.ss_data.locked_on_sending = strq; in sctp_ss_fb_init_stream()
621 if (stcb->asoc.ss_data.last_out_stream == with_strq) { in sctp_ss_fb_init_stream()
622 stcb->asoc.ss_data.last_out_stream = strq; in sctp_ss_fb_init_stream()
635 sctp_ss_fb_add(struct sctp_tcb *stcb, struct sctp_association *asoc, in sctp_ss_fb_add() argument
643 TAILQ_INSERT_TAIL(&asoc->ss_data.out.wheel, strq, ss_params.ss.fb.next_spoke); in sctp_ss_fb_add()
650 sctp_ss_fb_remove(struct sctp_tcb *stcb, struct sctp_association *asoc, in sctp_ss_fb_remove() argument
660 if (asoc->ss_data.last_out_stream == strq) { in sctp_ss_fb_remove()
661 asoc->ss_data.last_out_stream = TAILQ_PREV(asoc->ss_data.last_out_stream, in sctp_ss_fb_remove()
664 if (asoc->ss_data.last_out_stream == NULL) { in sctp_ss_fb_remove()
665 asoc->ss_data.last_out_stream = TAILQ_LAST(&asoc->ss_data.out.wheel, in sctp_ss_fb_remove()
668 if (asoc->ss_data.last_out_stream == strq) { in sctp_ss_fb_remove()
669 asoc->ss_data.last_out_stream = NULL; in sctp_ss_fb_remove()
672 if (asoc->ss_data.locked_on_sending == strq) { in sctp_ss_fb_remove()
673 asoc->ss_data.locked_on_sending = NULL; in sctp_ss_fb_remove()
675 TAILQ_REMOVE(&asoc->ss_data.out.wheel, strq, ss_params.ss.fb.next_spoke); in sctp_ss_fb_remove()
683 struct sctp_association *asoc) in sctp_ss_fb_select() argument
689 if (asoc->ss_data.locked_on_sending != NULL) { in sctp_ss_fb_select()
690 KASSERT(asoc->ss_data.locked_on_sending->ss_params.scheduled, in sctp_ss_fb_select()
692 (void *)asoc->ss_data.locked_on_sending)); in sctp_ss_fb_select()
693 return (asoc->ss_data.locked_on_sending); in sctp_ss_fb_select()
695 if (asoc->ss_data.last_out_stream == NULL || in sctp_ss_fb_select()
696 …TAILQ_FIRST(&asoc->ss_data.out.wheel) == TAILQ_LAST(&asoc->ss_data.out.wheel, sctpwheel_listhead))… in sctp_ss_fb_select()
697 strqt = TAILQ_FIRST(&asoc->ss_data.out.wheel); in sctp_ss_fb_select()
699 strqt = TAILQ_NEXT(asoc->ss_data.last_out_stream, ss_params.ss.fb.next_spoke); in sctp_ss_fb_select()
717 strqt = TAILQ_FIRST(&asoc->ss_data.out.wheel); in sctp_ss_fb_select()
725 struct sctp_association *asoc, struct sctp_stream_out *strq, in sctp_ss_fb_scheduled() argument
734 if (asoc->idata_supported == 0) { in sctp_ss_fb_scheduled()
737 asoc->ss_data.locked_on_sending = strq; in sctp_ss_fb_scheduled()
739 asoc->ss_data.locked_on_sending = NULL; in sctp_ss_fb_scheduled()
742 asoc->ss_data.locked_on_sending = NULL; in sctp_ss_fb_scheduled()
745 TAILQ_FOREACH(strqt, &asoc->ss_data.out.wheel, ss_params.ss.fb.next_spoke) { in sctp_ss_fb_scheduled()
755 asoc->ss_data.last_out_stream = strq; in sctp_ss_fb_scheduled()
764 sctp_ss_fcfs_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
769 sctp_ss_fcfs_init(struct sctp_tcb *stcb, struct sctp_association *asoc) in sctp_ss_fcfs_init() argument
777 TAILQ_INIT(&asoc->ss_data.out.list); in sctp_ss_fcfs_init()
785 for (i = 0; i < asoc->streamoutcnt; i++) { in sctp_ss_fcfs_init()
786 sp = TAILQ_FIRST(&asoc->strmout[i].outqueue); in sctp_ss_fcfs_init()
794 sctp_ss_fcfs_add(stcb, asoc, &asoc->strmout[i], sp); in sctp_ss_fcfs_init()
804 sctp_ss_fcfs_clear(struct sctp_tcb *stcb, struct sctp_association *asoc, in sctp_ss_fcfs_clear() argument
811 while (!TAILQ_EMPTY(&asoc->ss_data.out.list)) { in sctp_ss_fcfs_clear()
812 sp = TAILQ_FIRST(&asoc->ss_data.out.list); in sctp_ss_fcfs_clear()
814 TAILQ_REMOVE(&asoc->ss_data.out.list, sp, ss_next); in sctp_ss_fcfs_clear()
817 asoc->ss_data.last_out_stream = NULL; in sctp_ss_fcfs_clear()
827 if (stcb->asoc.ss_data.locked_on_sending == with_strq) { in sctp_ss_fcfs_init_stream()
828 stcb->asoc.ss_data.locked_on_sending = strq; in sctp_ss_fcfs_init_stream()
830 if (stcb->asoc.ss_data.last_out_stream == with_strq) { in sctp_ss_fcfs_init_stream()
831 stcb->asoc.ss_data.last_out_stream = strq; in sctp_ss_fcfs_init_stream()
839 sctp_ss_fcfs_add(struct sctp_tcb *stcb, struct sctp_association *asoc, in sctp_ss_fcfs_add() argument
845 TAILQ_INSERT_TAIL(&asoc->ss_data.out.list, sp, ss_next); in sctp_ss_fcfs_add()
852 sctp_ss_fcfs_is_empty(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc) in sctp_ss_fcfs_is_empty() argument
856 return (TAILQ_EMPTY(&asoc->ss_data.out.list)); in sctp_ss_fcfs_is_empty()
860 sctp_ss_fcfs_remove(struct sctp_tcb *stcb, struct sctp_association *asoc, in sctp_ss_fcfs_remove() argument
866 TAILQ_REMOVE(&asoc->ss_data.out.list, sp, ss_next); in sctp_ss_fcfs_remove()
874 struct sctp_association *asoc) in sctp_ss_fcfs_select() argument
881 if (asoc->ss_data.locked_on_sending) { in sctp_ss_fcfs_select()
882 return (asoc->ss_data.locked_on_sending); in sctp_ss_fcfs_select()
884 sp = TAILQ_FIRST(&asoc->ss_data.out.list); in sctp_ss_fcfs_select()
887 strq = &asoc->strmout[sp->sid]; in sctp_ss_fcfs_select()
916 struct sctp_association *asoc, in sctp_ss_fcfs_scheduled() argument
923 asoc->ss_data.last_out_stream = strq; in sctp_ss_fcfs_scheduled()
924 if (asoc->idata_supported == 0) { in sctp_ss_fcfs_scheduled()
927 asoc->ss_data.locked_on_sending = strq; in sctp_ss_fcfs_scheduled()
929 asoc->ss_data.locked_on_sending = NULL; in sctp_ss_fcfs_scheduled()
932 asoc->ss_data.locked_on_sending = NULL; in sctp_ss_fcfs_scheduled()