Lines Matching full:control
62 sctp_add_chk_to_control(struct sctp_queued_to_read *control,
329 struct sctp_queued_to_read *control) in sctp_place_control_in_stream() argument
335 flags = (control->sinfo_flags >> 8); in sctp_place_control_in_stream()
347 TAILQ_INSERT_TAIL(q, control, next_instrm); in sctp_place_control_in_stream()
348 control->on_strm_q = SCTP_ON_UNORDERED; in sctp_place_control_in_stream()
355 control->end_added = 1; in sctp_place_control_in_stream()
356 control->first_frag_seen = 1; in sctp_place_control_in_stream()
357 control->last_frag_seen = 1; in sctp_place_control_in_stream()
361 TAILQ_INSERT_HEAD(q, control, next_instrm); in sctp_place_control_in_stream()
363 control->on_strm_q = SCTP_ON_UNORDERED; in sctp_place_control_in_stream()
365 control->on_strm_q = SCTP_ON_ORDERED; in sctp_place_control_in_stream()
370 if (SCTP_MID_GT(asoc->idata_supported, at->mid, control->mid)) { in sctp_place_control_in_stream()
375 TAILQ_INSERT_BEFORE(at, control, next_instrm); in sctp_place_control_in_stream()
377 control->on_strm_q = SCTP_ON_UNORDERED; in sctp_place_control_in_stream()
379 control->on_strm_q = SCTP_ON_ORDERED; in sctp_place_control_in_stream()
382 } else if (SCTP_MID_EQ(asoc->idata_supported, at->mid, control->mid)) { in sctp_place_control_in_stream()
395 sctp_log_strm_del(control, at, in sctp_place_control_in_stream()
398 TAILQ_INSERT_AFTER(q, at, control, next_instrm); in sctp_place_control_in_stream()
400 control->on_strm_q = SCTP_ON_UNORDERED; in sctp_place_control_in_stream()
402 control->on_strm_q = SCTP_ON_ORDERED; in sctp_place_control_in_stream()
414 struct sctp_queued_to_read *control, in sctp_abort_in_reasm() argument
425 control->fsn_included, in sctp_abort_in_reasm()
433 control->fsn_included, in sctp_abort_in_reasm()
449 sctp_clean_up_control(struct sctp_tcb *stcb, struct sctp_queued_to_read *control) in sctp_clean_up_control() argument
452 * The control could not be placed and must be cleaned. in sctp_clean_up_control()
456 TAILQ_FOREACH_SAFE(chk, &control->reasm, sctp_next, nchk) { in sctp_clean_up_control()
457 TAILQ_REMOVE(&control->reasm, chk, sctp_next); in sctp_clean_up_control()
463 sctp_free_remote_addr(control->whoFrom); in sctp_clean_up_control()
464 if (control->data) { in sctp_clean_up_control()
465 sctp_m_freem(control->data); in sctp_clean_up_control()
466 control->data = NULL; in sctp_clean_up_control()
468 sctp_free_a_readq(stcb, control); in sctp_clean_up_control()
475 * long as the control's entered are non-fragmented.
480 struct sctp_queued_to_read *control, int *abort_flag, int *need_reasm) in sctp_queue_data_to_stream() argument
507 strm = &asoc->strmin[control->sinfo_stream]; in sctp_queue_data_to_stream()
509 sctp_log_strm_del(control, NULL, SCTP_STR_LOG_FROM_INTO_STRD); in sctp_queue_data_to_stream()
511 if (SCTP_MID_GT((asoc->idata_supported), strm->last_mid_delivered, control->mid)) { in sctp_queue_data_to_stream()
514 strm->last_mid_delivered, control->mid); in sctp_queue_data_to_stream()
519 TAILQ_INSERT_HEAD(&strm->inqueue, control, next_instrm); in sctp_queue_data_to_stream()
522 strm->last_mid_delivered, control->sinfo_tsn, in sctp_queue_data_to_stream()
523 control->sinfo_stream, control->mid); in sctp_queue_data_to_stream()
527 control->sinfo_tsn, in sctp_queue_data_to_stream()
528 control->sinfo_stream, in sctp_queue_data_to_stream()
529 (uint16_t)control->mid); in sctp_queue_data_to_stream()
538 asoc->size_on_all_streams += control->length; in sctp_queue_data_to_stream()
541 if (SCTP_MID_EQ(asoc->idata_supported, nxt_todel, control->mid)) { in sctp_queue_data_to_stream()
544 sctp_log_strm_del(control, NULL, SCTP_STR_LOG_FROM_IMMED_DEL); in sctp_queue_data_to_stream()
548 if (asoc->size_on_all_streams >= control->length) { in sctp_queue_data_to_stream()
549 asoc->size_on_all_streams -= control->length; in sctp_queue_data_to_stream()
552 …panic("size_on_all_streams = %u smaller than control length %u", asoc->size_on_all_streams, contro… in sctp_queue_data_to_stream()
559 sctp_mark_non_revokable(asoc, control->sinfo_tsn); in sctp_queue_data_to_stream()
561 control, in sctp_queue_data_to_stream()
564 TAILQ_FOREACH_SAFE(control, &strm->inqueue, next_instrm, at) { in sctp_queue_data_to_stream()
567 if (SCTP_MID_EQ(asoc->idata_supported, nxt_todel, control->mid) && in sctp_queue_data_to_stream()
568 (((control->sinfo_flags >> 8) & SCTP_DATA_NOT_FRAG) == SCTP_DATA_NOT_FRAG)) { in sctp_queue_data_to_stream()
569 if (control->on_strm_q == SCTP_ON_ORDERED) { in sctp_queue_data_to_stream()
570 TAILQ_REMOVE(&strm->inqueue, control, next_instrm); in sctp_queue_data_to_stream()
571 if (asoc->size_on_all_streams >= control->length) { in sctp_queue_data_to_stream()
572 asoc->size_on_all_streams -= control->length; in sctp_queue_data_to_stream()
575 …panic("size_on_all_streams = %u smaller than control length %u", asoc->size_on_all_streams, contro… in sctp_queue_data_to_stream()
583 panic("Huh control: %p is on_strm_q: %d", in sctp_queue_data_to_stream()
584 control, control->on_strm_q); in sctp_queue_data_to_stream()
587 control->on_strm_q = 0; in sctp_queue_data_to_stream()
596 sctp_log_strm_del(control, NULL, in sctp_queue_data_to_stream()
599 sctp_mark_non_revokable(asoc, control->sinfo_tsn); in sctp_queue_data_to_stream()
601 control, in sctp_queue_data_to_stream()
606 } else if (SCTP_MID_EQ(asoc->idata_supported, nxt_todel, control->mid)) { in sctp_queue_data_to_stream()
617 if (sctp_place_control_in_stream(strm, asoc, control)) { in sctp_queue_data_to_stream()
619 "Queue to str MID: %u duplicate", control->mid); in sctp_queue_data_to_stream()
620 sctp_clean_up_control(stcb, control); in sctp_queue_data_to_stream()
630 sctp_setup_tail_pointer(struct sctp_queued_to_read *control) in sctp_setup_tail_pointer() argument
635 stcb = control->stcb; in sctp_setup_tail_pointer()
636 control->held_length = 0; in sctp_setup_tail_pointer()
637 control->length = 0; in sctp_setup_tail_pointer()
638 m = control->data; in sctp_setup_tail_pointer()
644 control->data = sctp_m_free(m); in sctp_setup_tail_pointer()
645 m = control->data; in sctp_setup_tail_pointer()
651 control->tail_mbuf = prev; in sctp_setup_tail_pointer()
656 atomic_add_int(&control->length, SCTP_BUF_LEN(m)); in sctp_setup_tail_pointer()
657 if (control->on_read_q) { in sctp_setup_tail_pointer()
667 control->tail_mbuf = prev; in sctp_setup_tail_pointer()
672 sctp_add_to_tail_pointer(struct sctp_queued_to_read *control, struct mbuf *m, uint32_t *added) in sctp_add_to_tail_pointer() argument
677 stcb = control->stcb; in sctp_add_to_tail_pointer()
680 panic("Control broken"); in sctp_add_to_tail_pointer()
685 if (control->tail_mbuf == NULL) { in sctp_add_to_tail_pointer()
687 sctp_m_freem(control->data); in sctp_add_to_tail_pointer()
688 control->data = m; in sctp_add_to_tail_pointer()
689 sctp_setup_tail_pointer(control); in sctp_add_to_tail_pointer()
692 control->tail_mbuf->m_next = m; in sctp_add_to_tail_pointer()
698 control->tail_mbuf->m_next = sctp_m_free(m); in sctp_add_to_tail_pointer()
699 m = control->tail_mbuf->m_next; in sctp_add_to_tail_pointer()
705 control->tail_mbuf = prev; in sctp_add_to_tail_pointer()
710 if (control->on_read_q) { in sctp_add_to_tail_pointer()
718 atomic_add_int(&control->length, SCTP_BUF_LEN(m)); in sctp_add_to_tail_pointer()
722 control->tail_mbuf = prev; in sctp_add_to_tail_pointer()
727 sctp_build_readq_entry_from_ctl(struct sctp_queued_to_read *nc, struct sctp_queued_to_read *control) in sctp_build_readq_entry_from_ctl() argument
730 nc->sinfo_stream = control->sinfo_stream; in sctp_build_readq_entry_from_ctl()
731 nc->mid = control->mid; in sctp_build_readq_entry_from_ctl()
733 nc->top_fsn = control->top_fsn; in sctp_build_readq_entry_from_ctl()
734 nc->mid = control->mid; in sctp_build_readq_entry_from_ctl()
735 nc->sinfo_flags = control->sinfo_flags; in sctp_build_readq_entry_from_ctl()
736 nc->sinfo_ppid = control->sinfo_ppid; in sctp_build_readq_entry_from_ctl()
737 nc->sinfo_context = control->sinfo_context; in sctp_build_readq_entry_from_ctl()
739 nc->sinfo_tsn = control->sinfo_tsn; in sctp_build_readq_entry_from_ctl()
740 nc->sinfo_cumtsn = control->sinfo_cumtsn; in sctp_build_readq_entry_from_ctl()
741 nc->sinfo_assoc_id = control->sinfo_assoc_id; in sctp_build_readq_entry_from_ctl()
742 nc->whoFrom = control->whoFrom; in sctp_build_readq_entry_from_ctl()
744 nc->stcb = control->stcb; in sctp_build_readq_entry_from_ctl()
745 nc->port_from = control->port_from; in sctp_build_readq_entry_from_ctl()
746 nc->do_not_ref_stcb = control->do_not_ref_stcb; in sctp_build_readq_entry_from_ctl()
753 struct sctp_queued_to_read *control, in sctp_handle_old_unordered_data() argument
760 * to see if we have it all. If you return one, no other control in sctp_handle_old_unordered_data()
770 if (control->first_frag_seen == 0) { in sctp_handle_old_unordered_data()
777 fsn = control->fsn_included + 1; in sctp_handle_old_unordered_data()
779 TAILQ_FOREACH_SAFE(chk, &control->reasm, sctp_next, lchk) { in sctp_handle_old_unordered_data()
787 TAILQ_REMOVE(&control->reasm, chk, sctp_next); in sctp_handle_old_unordered_data()
788 sctp_add_chk_to_control(control, strm, stcb, asoc, chk, inp_read_lock_held); in sctp_handle_old_unordered_data()
792 if (control->end_added) { in sctp_handle_old_unordered_data()
794 if (!TAILQ_EMPTY(&control->reasm)) { in sctp_handle_old_unordered_data()
797 * on the control queue to a new in sctp_handle_old_unordered_data()
798 * control. in sctp_handle_old_unordered_data()
800 sctp_build_readq_entry_from_ctl(nc, control); in sctp_handle_old_unordered_data()
801 tchk = TAILQ_FIRST(&control->reasm); in sctp_handle_old_unordered_data()
803 TAILQ_REMOVE(&control->reasm, tchk, sctp_next); in sctp_handle_old_unordered_data()
823 tchk = TAILQ_FIRST(&control->reasm); in sctp_handle_old_unordered_data()
827 TAILQ_REMOVE(&control->reasm, tchk, sctp_next); in sctp_handle_old_unordered_data()
829 tchk = TAILQ_FIRST(&control->reasm); in sctp_handle_old_unordered_data()
833 * after removing control in sctp_handle_old_unordered_data()
837 if (control->on_strm_q) { in sctp_handle_old_unordered_data()
838 TAILQ_REMOVE(&strm->uno_inqueue, control, next_instrm); in sctp_handle_old_unordered_data()
839 control->on_strm_q = 0; in sctp_handle_old_unordered_data()
842 if (control->pdapi_started) { in sctp_handle_old_unordered_data()
844 control->pdapi_started = 0; in sctp_handle_old_unordered_data()
846 if (control->on_strm_q) { in sctp_handle_old_unordered_data()
847 TAILQ_REMOVE(&strm->uno_inqueue, control, next_instrm); in sctp_handle_old_unordered_data()
848 control->on_strm_q = 0; in sctp_handle_old_unordered_data()
851 if (control->on_read_q == 0) { in sctp_handle_old_unordered_data()
852 sctp_add_to_readq(stcb->sctp_ep, stcb, control, in sctp_handle_old_unordered_data()
853 &stcb->sctp_socket->so_rcv, control->end_added, in sctp_handle_old_unordered_data()
862 control = nc; in sctp_handle_old_unordered_data()
881 if ((control->length > pd_point) && (strm->pd_api_started == 0)) { in sctp_handle_old_unordered_data()
883 control->pdapi_started = 1; in sctp_handle_old_unordered_data()
884 sctp_add_to_readq(stcb->sctp_ep, stcb, control, in sctp_handle_old_unordered_data()
885 &stcb->sctp_socket->so_rcv, control->end_added, in sctp_handle_old_unordered_data()
897 struct sctp_queued_to_read *control, in sctp_inject_old_unordered_data() argument
905 * Here we need to place the chunk into the control structure sorted in sctp_inject_old_unordered_data()
913 at = TAILQ_FIRST(&control->reasm); in sctp_inject_old_unordered_data()
922 if (control->first_frag_seen) { in sctp_inject_old_unordered_data()
925 * control multiple messages. As long as the next in sctp_inject_old_unordered_data()
932 if (SCTP_TSN_GT(chk->rec.data.fsn, control->fsn_included)) { in sctp_inject_old_unordered_data()
939 if ((chk->rec.data.fsn == control->fsn_included) || in sctp_inject_old_unordered_data()
940 (control->pdapi_started)) { in sctp_inject_old_unordered_data()
953 sctp_abort_in_reasm(stcb, control, chk, in sctp_inject_old_unordered_data()
965 tdata = control->data; in sctp_inject_old_unordered_data()
966 control->data = chk->data; in sctp_inject_old_unordered_data()
969 chk->send_size = control->length; in sctp_inject_old_unordered_data()
970 /* Recompute length of control and tail pointer */ in sctp_inject_old_unordered_data()
971 sctp_setup_tail_pointer(control); in sctp_inject_old_unordered_data()
973 tmp = control->fsn_included; in sctp_inject_old_unordered_data()
974 control->fsn_included = chk->rec.data.fsn; in sctp_inject_old_unordered_data()
977 tmp = control->sinfo_tsn; in sctp_inject_old_unordered_data()
978 control->sinfo_tsn = chk->rec.data.tsn; in sctp_inject_old_unordered_data()
981 tmp = control->sinfo_ppid; in sctp_inject_old_unordered_data()
982 control->sinfo_ppid = chk->rec.data.ppid; in sctp_inject_old_unordered_data()
987 control->first_frag_seen = 1; in sctp_inject_old_unordered_data()
988 control->fsn_included = chk->rec.data.fsn; in sctp_inject_old_unordered_data()
989 control->top_fsn = chk->rec.data.fsn; in sctp_inject_old_unordered_data()
990 control->sinfo_tsn = chk->rec.data.tsn; in sctp_inject_old_unordered_data()
991 control->sinfo_ppid = chk->rec.data.ppid; in sctp_inject_old_unordered_data()
992 control->data = chk->data; in sctp_inject_old_unordered_data()
996 sctp_setup_tail_pointer(control); in sctp_inject_old_unordered_data()
1001 TAILQ_FOREACH(at, &control->reasm, sctp_next) { in sctp_inject_old_unordered_data()
1018 sctp_abort_in_reasm(stcb, control, chk, in sctp_inject_old_unordered_data()
1028 control->top_fsn = chk->rec.data.fsn; in sctp_inject_old_unordered_data()
1029 TAILQ_INSERT_TAIL(&control->reasm, chk, sctp_next); in sctp_inject_old_unordered_data()
1043 struct sctp_queued_to_read *control, *nctl = NULL; in sctp_deliver_reasm_check() local
1054 control = TAILQ_FIRST(&strm->uno_inqueue); in sctp_deliver_reasm_check()
1056 if ((control != NULL) && in sctp_deliver_reasm_check()
1059 if (sctp_handle_old_unordered_data(stcb, asoc, strm, control, pd_point, inp_read_lock_held)) { in sctp_deliver_reasm_check()
1067 while (control) { in sctp_deliver_reasm_check()
1068 SCTPDBG(SCTP_DEBUG_XXX, "Looking at control: %p e(%d) ssn: %u top_fsn: %u inc_fsn: %u -uo\n", in sctp_deliver_reasm_check()
1069 control, control->end_added, control->mid, control->top_fsn, control->fsn_included); in sctp_deliver_reasm_check()
1070 nctl = TAILQ_NEXT(control, next_instrm); in sctp_deliver_reasm_check()
1071 if (control->end_added) { in sctp_deliver_reasm_check()
1073 if (control->on_strm_q) { in sctp_deliver_reasm_check()
1075 if (control->on_strm_q != SCTP_ON_UNORDERED) { in sctp_deliver_reasm_check()
1076 panic("Huh control: %p on_q: %d -- not unordered?", in sctp_deliver_reasm_check()
1077 control, control->on_strm_q); in sctp_deliver_reasm_check()
1081 TAILQ_REMOVE(&strm->uno_inqueue, control, next_instrm); in sctp_deliver_reasm_check()
1082 if (asoc->size_on_all_streams >= control->length) { in sctp_deliver_reasm_check()
1083 asoc->size_on_all_streams -= control->length; in sctp_deliver_reasm_check()
1086 …panic("size_on_all_streams = %u smaller than control length %u", asoc->size_on_all_streams, contro… in sctp_deliver_reasm_check()
1092 control->on_strm_q = 0; in sctp_deliver_reasm_check()
1094 if (control->on_read_q == 0) { in sctp_deliver_reasm_check()
1096 control, in sctp_deliver_reasm_check()
1097 &stcb->sctp_socket->so_rcv, control->end_added, in sctp_deliver_reasm_check()
1102 if ((control->length >= pd_point) && (strm->pd_api_started == 0)) { in sctp_deliver_reasm_check()
1104 control->pdapi_started = 1; in sctp_deliver_reasm_check()
1106 control, in sctp_deliver_reasm_check()
1107 &stcb->sctp_socket->so_rcv, control->end_added, in sctp_deliver_reasm_check()
1113 control = nctl; in sctp_deliver_reasm_check()
1116 control = TAILQ_FIRST(&strm->inqueue); in sctp_deliver_reasm_check()
1121 if (control == NULL) { in sctp_deliver_reasm_check()
1124 if (SCTP_MID_EQ(asoc->idata_supported, strm->last_mid_delivered, control->mid)) { in sctp_deliver_reasm_check()
1131 nctl = TAILQ_NEXT(control, next_instrm); in sctp_deliver_reasm_check()
1133 "Looking at control: %p e(%d) ssn: %u top_fsn: %u inc_fsn: %u (lastdel: %u)- o\n", in sctp_deliver_reasm_check()
1134 control, control->end_added, control->mid, in sctp_deliver_reasm_check()
1135 control->top_fsn, control->fsn_included, in sctp_deliver_reasm_check()
1137 if (control->end_added) { in sctp_deliver_reasm_check()
1138 if (control->on_strm_q) { in sctp_deliver_reasm_check()
1140 if (control->on_strm_q != SCTP_ON_ORDERED) { in sctp_deliver_reasm_check()
1141 panic("Huh control: %p on_q: %d -- not ordered?", in sctp_deliver_reasm_check()
1142 control, control->on_strm_q); in sctp_deliver_reasm_check()
1146 TAILQ_REMOVE(&strm->inqueue, control, next_instrm); in sctp_deliver_reasm_check()
1147 if (asoc->size_on_all_streams >= control->length) { in sctp_deliver_reasm_check()
1148 asoc->size_on_all_streams -= control->length; in sctp_deliver_reasm_check()
1151 …panic("size_on_all_streams = %u smaller than control length %u", asoc->size_on_all_streams, contro… in sctp_deliver_reasm_check()
1157 control->on_strm_q = 0; in sctp_deliver_reasm_check()
1159 if (strm->pd_api_started && control->pdapi_started) { in sctp_deliver_reasm_check()
1160 control->pdapi_started = 0; in sctp_deliver_reasm_check()
1163 if (control->on_read_q == 0) { in sctp_deliver_reasm_check()
1165 control, in sctp_deliver_reasm_check()
1166 &stcb->sctp_socket->so_rcv, control->end_added, in sctp_deliver_reasm_check()
1169 control = nctl; in sctp_deliver_reasm_check()
1181 if (control) { in sctp_deliver_reasm_check()
1183 "Looking at control: %p e(%d) ssn: %u top_fsn: %u inc_fsn: %u (nxtdel: %u)- o\n", in sctp_deliver_reasm_check()
1184 control, control->end_added, control->mid, control->top_fsn, control->fsn_included, in sctp_deliver_reasm_check()
1186 nctl = TAILQ_NEXT(control, next_instrm); in sctp_deliver_reasm_check()
1187 if (SCTP_MID_EQ(asoc->idata_supported, control->mid, next_to_del) && in sctp_deliver_reasm_check()
1188 (control->first_frag_seen)) { in sctp_deliver_reasm_check()
1192 if (control->end_added) { in sctp_deliver_reasm_check()
1194 if (control->on_strm_q) { in sctp_deliver_reasm_check()
1196 if (control->on_strm_q != SCTP_ON_ORDERED) { in sctp_deliver_reasm_check()
1197 panic("Huh control: %p on_q: %d -- not ordered?", in sctp_deliver_reasm_check()
1198 control, control->on_strm_q); in sctp_deliver_reasm_check()
1202 TAILQ_REMOVE(&strm->inqueue, control, next_instrm); in sctp_deliver_reasm_check()
1203 if (asoc->size_on_all_streams >= control->length) { in sctp_deliver_reasm_check()
1204 asoc->size_on_all_streams -= control->length; in sctp_deliver_reasm_check()
1207 …panic("size_on_all_streams = %u smaller than control length %u", asoc->size_on_all_streams, contro… in sctp_deliver_reasm_check()
1213 control->on_strm_q = 0; in sctp_deliver_reasm_check()
1217 if (((control->sinfo_flags >> 8) & SCTP_DATA_NOT_FRAG) == SCTP_DATA_NOT_FRAG) { in sctp_deliver_reasm_check()
1222 sctp_mark_non_revokable(asoc, control->sinfo_tsn); in sctp_deliver_reasm_check()
1223 } else if (control->end_added == 0) { in sctp_deliver_reasm_check()
1228 if ((control->length < pd_point) || (strm->pd_api_started)) { in sctp_deliver_reasm_check()
1236 done = (control->end_added) && (control->last_frag_seen); in sctp_deliver_reasm_check()
1237 if (control->on_read_q == 0) { in sctp_deliver_reasm_check()
1239 if (asoc->size_on_all_streams >= control->length) { in sctp_deliver_reasm_check()
1240 asoc->size_on_all_streams -= control->length; in sctp_deliver_reasm_check()
1243 …panic("size_on_all_streams = %u smaller than control length %u", asoc->size_on_all_streams, contro… in sctp_deliver_reasm_check()
1249 control->pdapi_started = 1; in sctp_deliver_reasm_check()
1252 control, in sctp_deliver_reasm_check()
1253 &stcb->sctp_socket->so_rcv, control->end_added, in sctp_deliver_reasm_check()
1258 control = nctl; in sctp_deliver_reasm_check()
1268 sctp_add_chk_to_control(struct sctp_queued_to_read *control, in sctp_add_chk_to_control() argument
1274 * Given a control and a chunk, merge the data from the chk onto the in sctp_add_chk_to_control()
1275 * control and free up the chunk resources. in sctp_add_chk_to_control()
1280 if (control->on_read_q) { in sctp_add_chk_to_control()
1290 if (control->data == NULL) { in sctp_add_chk_to_control()
1291 control->data = chk->data; in sctp_add_chk_to_control()
1292 sctp_setup_tail_pointer(control); in sctp_add_chk_to_control()
1294 sctp_add_to_tail_pointer(control, chk->data, &added); in sctp_add_chk_to_control()
1296 control->fsn_included = chk->rec.data.fsn; in sctp_add_chk_to_control()
1302 control->first_frag_seen = 1; in sctp_add_chk_to_control()
1303 control->sinfo_tsn = chk->rec.data.tsn; in sctp_add_chk_to_control()
1304 control->sinfo_ppid = chk->rec.data.ppid; in sctp_add_chk_to_control()
1308 if ((control->on_strm_q) && (control->on_read_q)) { in sctp_add_chk_to_control()
1309 if (control->pdapi_started) { in sctp_add_chk_to_control()
1310 control->pdapi_started = 0; in sctp_add_chk_to_control()
1313 if (control->on_strm_q == SCTP_ON_UNORDERED) { in sctp_add_chk_to_control()
1315 TAILQ_REMOVE(&strm->uno_inqueue, control, next_instrm); in sctp_add_chk_to_control()
1316 control->on_strm_q = 0; in sctp_add_chk_to_control()
1317 } else if (control->on_strm_q == SCTP_ON_ORDERED) { in sctp_add_chk_to_control()
1319 TAILQ_REMOVE(&strm->inqueue, control, next_instrm); in sctp_add_chk_to_control()
1322 * size_on_all_streams, since control is on in sctp_add_chk_to_control()
1326 control->on_strm_q = 0; in sctp_add_chk_to_control()
1328 } else if (control->on_strm_q) { in sctp_add_chk_to_control()
1329 panic("Unknown state on ctrl: %p on_strm_q: %d", control, in sctp_add_chk_to_control()
1330 control->on_strm_q); in sctp_add_chk_to_control()
1334 control->end_added = 1; in sctp_add_chk_to_control()
1335 control->last_frag_seen = 1; in sctp_add_chk_to_control()
1353 struct sctp_queued_to_read *control, in sctp_queue_data_for_reasm() argument
1364 strm = &asoc->strmin[control->sinfo_stream]; in sctp_queue_data_for_reasm()
1368 if ((control->sinfo_flags >> 8) & SCTP_DATA_UNORDERED) { in sctp_queue_data_for_reasm()
1378 if (sctp_place_control_in_stream(strm, asoc, control)) { in sctp_queue_data_for_reasm()
1380 sctp_abort_in_reasm(stcb, control, chk, in sctp_queue_data_for_reasm()
1383 sctp_clean_up_control(stcb, control); in sctp_queue_data_for_reasm()
1388 * Ok we created this control and now lets validate in sctp_queue_data_for_reasm()
1393 sctp_abort_in_reasm(stcb, control, chk, in sctp_queue_data_for_reasm()
1401 sctp_inject_old_unordered_data(stcb, asoc, control, chk, abort_flag); in sctp_queue_data_for_reasm()
1406 * the first it goes to the control mbuf. o if its not first but the in sctp_queue_data_for_reasm()
1407 * next in sequence it goes to the control, and each succeeding one in sctp_queue_data_for_reasm()
1416 if (control->first_frag_seen) { in sctp_queue_data_for_reasm()
1423 sctp_abort_in_reasm(stcb, control, chk, in sctp_queue_data_for_reasm()
1428 control->first_frag_seen = 1; in sctp_queue_data_for_reasm()
1429 control->sinfo_ppid = chk->rec.data.ppid; in sctp_queue_data_for_reasm()
1430 control->sinfo_tsn = chk->rec.data.tsn; in sctp_queue_data_for_reasm()
1431 control->fsn_included = chk->rec.data.fsn; in sctp_queue_data_for_reasm()
1432 control->data = chk->data; in sctp_queue_data_for_reasm()
1436 sctp_setup_tail_pointer(control); in sctp_queue_data_for_reasm()
1437 asoc->size_on_all_streams += control->length; in sctp_queue_data_for_reasm()
1442 if (control->last_frag_seen == 0) { in sctp_queue_data_for_reasm()
1444 if (SCTP_TSN_GT(chk->rec.data.fsn, control->top_fsn)) { in sctp_queue_data_for_reasm()
1448 control->top_fsn = chk->rec.data.fsn; in sctp_queue_data_for_reasm()
1454 control->last_frag_seen = 1; in sctp_queue_data_for_reasm()
1455 if (SCTP_TSN_GT(control->top_fsn, chk->rec.data.fsn)) { in sctp_queue_data_for_reasm()
1459 control->top_fsn); in sctp_queue_data_for_reasm()
1460 sctp_abort_in_reasm(stcb, control, chk, in sctp_queue_data_for_reasm()
1466 if (asoc->idata_supported || control->first_frag_seen) { in sctp_queue_data_for_reasm()
1473 if (SCTP_TSN_GE(control->fsn_included, chk->rec.data.fsn)) { in sctp_queue_data_for_reasm()
1478 sctp_abort_in_reasm(stcb, control, chk, in sctp_queue_data_for_reasm()
1489 chk->rec.data.fsn, control->top_fsn); in sctp_queue_data_for_reasm()
1490 sctp_abort_in_reasm(stcb, control, in sctp_queue_data_for_reasm()
1495 if (asoc->idata_supported || control->first_frag_seen) { in sctp_queue_data_for_reasm()
1503 if (SCTP_TSN_GE(control->fsn_included, chk->rec.data.fsn)) { in sctp_queue_data_for_reasm()
1510 chk->rec.data.fsn, control->fsn_included); in sctp_queue_data_for_reasm()
1511 sctp_abort_in_reasm(stcb, control, chk, in sctp_queue_data_for_reasm()
1521 if (SCTP_TSN_GT(chk->rec.data.fsn, control->top_fsn)) { in sctp_queue_data_for_reasm()
1525 control->top_fsn); in sctp_queue_data_for_reasm()
1526 sctp_abort_in_reasm(stcb, control, chk, in sctp_queue_data_for_reasm()
1534 * reassembly for this control. in sctp_queue_data_for_reasm()
1539 TAILQ_FOREACH(at, &control->reasm, sctp_next) { in sctp_queue_data_for_reasm()
1545 sctp_abort_in_reasm(stcb, control, in sctp_queue_data_for_reasm()
1578 sctp_abort_in_reasm(stcb, control, in sctp_queue_data_for_reasm()
1590 TAILQ_INSERT_TAIL(&control->reasm, chk, sctp_next); in sctp_queue_data_for_reasm()
1594 * Ok lets see if we can suck any up into the control structure that in sctp_queue_data_for_reasm()
1602 if (control->first_frag_seen) { in sctp_queue_data_for_reasm()
1603 next_fsn = control->fsn_included + 1; in sctp_queue_data_for_reasm()
1604 TAILQ_FOREACH_SAFE(at, &control->reasm, sctp_next, nat) { in sctp_queue_data_for_reasm()
1606 /* We can add this one now to the control */ in sctp_queue_data_for_reasm()
1608 "Adding more to control: %p at: %p fsn: %u next_fsn: %u included: %u\n", in sctp_queue_data_for_reasm()
1609 control, at, in sctp_queue_data_for_reasm()
1611 next_fsn, control->fsn_included); in sctp_queue_data_for_reasm()
1612 TAILQ_REMOVE(&control->reasm, at, sctp_next); in sctp_queue_data_for_reasm()
1613 lenadded = sctp_add_chk_to_control(control, strm, stcb, asoc, at, SCTP_READ_LOCK_NOT_HELD); in sctp_queue_data_for_reasm()
1614 if (control->on_read_q) { in sctp_queue_data_for_reasm()
1627 if (control->end_added && control->pdapi_started) { in sctp_queue_data_for_reasm()
1630 control->pdapi_started = 0; in sctp_queue_data_for_reasm()
1632 if (control->on_read_q == 0) { in sctp_queue_data_for_reasm()
1634 control, in sctp_queue_data_for_reasm()
1635 &stcb->sctp_socket->so_rcv, control->end_added, in sctp_queue_data_for_reasm()
1654 struct sctp_queued_to_read *control; in sctp_find_reasm_entry() local
1657 TAILQ_FOREACH(control, &strm->inqueue, next_instrm) { in sctp_find_reasm_entry()
1658 if (SCTP_MID_EQ(idata_supported, control->mid, mid)) { in sctp_find_reasm_entry()
1664 TAILQ_FOREACH(control, &strm->uno_inqueue, next_instrm) { in sctp_find_reasm_entry()
1665 if (SCTP_MID_EQ(idata_supported, control->mid, mid)) { in sctp_find_reasm_entry()
1670 control = TAILQ_FIRST(&strm->uno_inqueue); in sctp_find_reasm_entry()
1673 return (control); in sctp_find_reasm_entry()
1691 struct sctp_queued_to_read *control, *ncontrol; in sctp_process_a_data_chunk() local
1846 * If its a fragmented message, lets see if we can find the control in sctp_process_a_data_chunk()
1860 control = sctp_find_reasm_entry(&asoc->strmin[sid], mid, ordered, asoc->idata_supported); in sctp_process_a_data_chunk()
1861 SCTPDBG(SCTP_DEBUG_XXX, "chunk_flags:0x%x look for control on queues %p\n", in sctp_process_a_data_chunk()
1862 chk_flags, control); in sctp_process_a_data_chunk()
1865 if (control != NULL) { in sctp_process_a_data_chunk()
1867 if (ordered && (mid != control->mid)) { in sctp_process_a_data_chunk()
1876 if (ordered && ((control->sinfo_flags >> 8) & SCTP_DATA_UNORDERED)) { in sctp_process_a_data_chunk()
1886 if (!ordered && (((control->sinfo_flags >> 8) & SCTP_DATA_UNORDERED) == 0)) { in sctp_process_a_data_chunk()
1903 if (control != NULL) { in sctp_process_a_data_chunk()
1910 if ((control->first_frag_seen) && in sctp_process_a_data_chunk()
1911 (tsn == control->fsn_included + 1) && in sctp_process_a_data_chunk()
1912 (control->end_added == 0)) { in sctp_process_a_data_chunk()
1915 control->fsn_included); in sctp_process_a_data_chunk()
1918 control = NULL; in sctp_process_a_data_chunk()
1954 if (control == NULL) { in sctp_process_a_data_chunk()
1957 if (SCTP_TSN_GT(fsn, control->top_fsn)) { in sctp_process_a_data_chunk()
2067 * Now no matter what, we need a control, get one if we don't have in sctp_process_a_data_chunk()
2071 if (control == NULL) { in sctp_process_a_data_chunk()
2072 sctp_alloc_a_readq(stcb, control); in sctp_process_a_data_chunk()
2073 sctp_build_readq_entry_mac(control, stcb, asoc->context, net, tsn, in sctp_process_a_data_chunk()
2078 if (control == NULL) { in sctp_process_a_data_chunk()
2085 control->data = dmbuf; in sctp_process_a_data_chunk()
2086 control->tail_mbuf = NULL; in sctp_process_a_data_chunk()
2087 for (mm = control->data; mm; mm = mm->m_next) { in sctp_process_a_data_chunk()
2088 control->length += SCTP_BUF_LEN(mm); in sctp_process_a_data_chunk()
2090 control->tail_mbuf = mm; in sctp_process_a_data_chunk()
2093 control->end_added = 1; in sctp_process_a_data_chunk()
2094 control->last_frag_seen = 1; in sctp_process_a_data_chunk()
2095 control->first_frag_seen = 1; in sctp_process_a_data_chunk()
2096 control->fsn_included = fsn; in sctp_process_a_data_chunk()
2097 control->top_fsn = fsn; in sctp_process_a_data_chunk()
2101 SCTPDBG(SCTP_DEBUG_XXX, "chunk_flags: 0x%x ordered: %d MID: %u control: %p\n", in sctp_process_a_data_chunk()
2102 chk_flags, ordered, mid, control); in sctp_process_a_data_chunk()
2120 SCTPDBG(SCTP_DEBUG_XXX, "Injecting control: %p to be read (MID: %u)\n", in sctp_process_a_data_chunk()
2121 control, mid); in sctp_process_a_data_chunk()
2124 control, &stcb->sctp_socket->so_rcv, in sctp_process_a_data_chunk()
2136 control = NULL; in sctp_process_a_data_chunk()
2164 SCTPDBG(SCTP_DEBUG_XXX, "Building ck: %p for control: %p to be read (MID: %u)\n", in sctp_process_a_data_chunk()
2166 control, mid); in sctp_process_a_data_chunk()
2200 TAILQ_INSERT_TAIL(&asoc->pending_reply_queue, control, next); in sctp_process_a_data_chunk()
2206 if (SCTP_TSN_GT(control->sinfo_tsn, lcontrol->sinfo_tsn)) { in sctp_process_a_data_chunk()
2210 TAILQ_INSERT_BEFORE(lcontrol, control, next); in sctp_process_a_data_chunk()
2221 TAILQ_INSERT_TAIL(&asoc->pending_reply_queue, control, next); in sctp_process_a_data_chunk()
2228 SCTPDBG(SCTP_DEBUG_XXX, "Unordered data to be read control: %p MID: %u\n", in sctp_process_a_data_chunk()
2229 control, mid); in sctp_process_a_data_chunk()
2230 sctp_mark_non_revokable(asoc, control->sinfo_tsn); in sctp_process_a_data_chunk()
2232 control, in sctp_process_a_data_chunk()
2237 SCTPDBG(SCTP_DEBUG_XXX, "Queue control: %p for reordering MID: %u\n", control, in sctp_process_a_data_chunk()
2239 sctp_queue_data_to_stream(stcb, asoc, control, abort_flag, &need_reasm_check); in sctp_process_a_data_chunk()
2252 "Queue data to stream for reasm control: %p MID: %u\n", in sctp_process_a_data_chunk()
2253 control, mid); in sctp_process_a_data_chunk()
2254 sctp_queue_data_for_reasm(stcb, asoc, control, chk, created_control, abort_flag, tsn); in sctp_process_a_data_chunk()
2309 TAILQ_FOREACH_SAFE(control, &asoc->pending_reply_queue, next, ncontrol) { in sctp_process_a_data_chunk()
2310 TAILQ_REMOVE(&asoc->pending_reply_queue, control, next); in sctp_process_a_data_chunk()
2311 strm = &asoc->strmin[control->sinfo_stream]; in sctp_process_a_data_chunk()
2312 sctp_queue_data_to_stream(stcb, asoc, control, abort_flag, &need_reasm_check); in sctp_process_a_data_chunk()
2322 TAILQ_FOREACH_SAFE(control, &asoc->pending_reply_queue, next, ncontrol) { in sctp_process_a_data_chunk()
2323 if (SCTP_TSN_GT(control->sinfo_tsn, liste->tsn)) { in sctp_process_a_data_chunk()
2327 * if control->sinfo_tsn is <= liste->tsn we in sctp_process_a_data_chunk()
2329 * control->sinfo_tsn > liste->tsn in sctp_process_a_data_chunk()
2331 TAILQ_REMOVE(&asoc->pending_reply_queue, control, next); in sctp_process_a_data_chunk()
2332 strm = &asoc->strmin[control->sinfo_stream]; in sctp_process_a_data_chunk()
2333 sctp_queue_data_to_stream(stcb, asoc, control, abort_flag, &need_reasm_check); in sctp_process_a_data_chunk()
2643 int num_chunks = 0; /* number of control chunks processed */ in sctp_process_data()
4136 /* JRS - Use the congestion control given in the CC module */ in sctp_express_handle_sack()
4879 /* JRS - Use the congestion control given in the CC module */ in sctp_handle_sack()
5038 /* JRS - Use the congestion control given in the CC module */ in sctp_handle_sack()
5225 struct sctp_queued_to_read *control, *ncontrol; in sctp_kick_prsctp_reorder_queue() local
5240 TAILQ_FOREACH_SAFE(control, &strmin->inqueue, next_instrm, ncontrol) { in sctp_kick_prsctp_reorder_queue()
5241 if (SCTP_MID_GE(asoc->idata_supported, mid, control->mid)) { in sctp_kick_prsctp_reorder_queue()
5243 if (((control->sinfo_flags >> 8) & SCTP_DATA_NOT_FRAG) == SCTP_DATA_NOT_FRAG) { in sctp_kick_prsctp_reorder_queue()
5244 if (control->on_strm_q) { in sctp_kick_prsctp_reorder_queue()
5245 if (control->on_strm_q == SCTP_ON_ORDERED) { in sctp_kick_prsctp_reorder_queue()
5246 TAILQ_REMOVE(&strmin->inqueue, control, next_instrm); in sctp_kick_prsctp_reorder_queue()
5247 } else if (control->on_strm_q == SCTP_ON_UNORDERED) { in sctp_kick_prsctp_reorder_queue()
5248 TAILQ_REMOVE(&strmin->uno_inqueue, control, next_instrm); in sctp_kick_prsctp_reorder_queue()
5252 strmin, control, control->on_strm_q); in sctp_kick_prsctp_reorder_queue()
5255 control->on_strm_q = 0; in sctp_kick_prsctp_reorder_queue()
5258 if (asoc->size_on_all_streams >= control->length) { in sctp_kick_prsctp_reorder_queue()
5259 asoc->size_on_all_streams -= control->length; in sctp_kick_prsctp_reorder_queue()
5262 …panic("size_on_all_streams = %u smaller than control length %u", asoc->size_on_all_streams, contro… in sctp_kick_prsctp_reorder_queue()
5270 sctp_mark_non_revokable(asoc, control->sinfo_tsn); in sctp_kick_prsctp_reorder_queue()
5271 sctp_add_to_readq(stcb->sctp_ep, stcb, control, in sctp_kick_prsctp_reorder_queue()
5277 if (control->first_frag_seen) { in sctp_kick_prsctp_reorder_queue()
5282 strmin->last_mid_delivered = control->mid - 1; in sctp_kick_prsctp_reorder_queue()
5311 TAILQ_FOREACH_SAFE(control, &strmin->inqueue, next_instrm, ncontrol) { in sctp_kick_prsctp_reorder_queue()
5312 if (SCTP_MID_EQ(asoc->idata_supported, mid, control->mid)) { in sctp_kick_prsctp_reorder_queue()
5313 if (((control->sinfo_flags >> 8) & SCTP_DATA_NOT_FRAG) == SCTP_DATA_NOT_FRAG) { in sctp_kick_prsctp_reorder_queue()
5315 if (control->on_strm_q) { in sctp_kick_prsctp_reorder_queue()
5316 if (control->on_strm_q == SCTP_ON_ORDERED) { in sctp_kick_prsctp_reorder_queue()
5317 TAILQ_REMOVE(&strmin->inqueue, control, next_instrm); in sctp_kick_prsctp_reorder_queue()
5318 } else if (control->on_strm_q == SCTP_ON_UNORDERED) { in sctp_kick_prsctp_reorder_queue()
5319 TAILQ_REMOVE(&strmin->uno_inqueue, control, next_instrm); in sctp_kick_prsctp_reorder_queue()
5323 strmin, control, control->on_strm_q); in sctp_kick_prsctp_reorder_queue()
5326 control->on_strm_q = 0; in sctp_kick_prsctp_reorder_queue()
5329 if (asoc->size_on_all_streams >= control->length) { in sctp_kick_prsctp_reorder_queue()
5330 asoc->size_on_all_streams -= control->length; in sctp_kick_prsctp_reorder_queue()
5333 …panic("size_on_all_streams = %u smaller than control length %u", asoc->size_on_all_streams, contro… in sctp_kick_prsctp_reorder_queue()
5340 strmin->last_mid_delivered = control->mid; in sctp_kick_prsctp_reorder_queue()
5342 sctp_mark_non_revokable(asoc, control->sinfo_tsn); in sctp_kick_prsctp_reorder_queue()
5343 sctp_add_to_readq(stcb->sctp_ep, stcb, control, in sctp_kick_prsctp_reorder_queue()
5350 if (control->first_frag_seen) { in sctp_kick_prsctp_reorder_queue()
5355 strmin->last_mid_delivered = control->mid - 1; in sctp_kick_prsctp_reorder_queue()
5372 struct sctp_queued_to_read *control, int ordered, uint32_t cumtsn) in sctp_flush_reassm_for_str_seq() argument
5390 control->first_frag_seen && in sctp_flush_reassm_for_str_seq()
5391 SCTP_TSN_GT(control->fsn_included, cumtsn)) { in sctp_flush_reassm_for_str_seq()
5394 TAILQ_FOREACH_SAFE(chk, &control->reasm, sctp_next, nchk) { in sctp_flush_reassm_for_str_seq()
5401 TAILQ_REMOVE(&control->reasm, chk, sctp_next); in sctp_flush_reassm_for_str_seq()
5418 if (!TAILQ_EMPTY(&control->reasm)) { in sctp_flush_reassm_for_str_seq()
5423 if (control->data) { in sctp_flush_reassm_for_str_seq()
5424 sctp_m_freem(control->data); in sctp_flush_reassm_for_str_seq()
5425 control->data = NULL; in sctp_flush_reassm_for_str_seq()
5427 control->fsn_included = 0xffffffff; in sctp_flush_reassm_for_str_seq()
5428 control->first_frag_seen = 0; in sctp_flush_reassm_for_str_seq()
5429 control->last_frag_seen = 0; in sctp_flush_reassm_for_str_seq()
5430 if (control->on_read_q) { in sctp_flush_reassm_for_str_seq()
5435 TAILQ_REMOVE(&stcb->sctp_ep->read_queue, control, next); in sctp_flush_reassm_for_str_seq()
5436 control->on_read_q = 0; in sctp_flush_reassm_for_str_seq()
5438 chk = TAILQ_FIRST(&control->reasm); in sctp_flush_reassm_for_str_seq()
5440 TAILQ_REMOVE(&control->reasm, chk, sctp_next); in sctp_flush_reassm_for_str_seq()
5441 sctp_add_chk_to_control(control, strm, stcb, asoc, in sctp_flush_reassm_for_str_seq()
5447 if (control->on_strm_q == SCTP_ON_ORDERED) { in sctp_flush_reassm_for_str_seq()
5448 TAILQ_REMOVE(&strm->inqueue, control, next_instrm); in sctp_flush_reassm_for_str_seq()
5449 if (asoc->size_on_all_streams >= control->length) { in sctp_flush_reassm_for_str_seq()
5450 asoc->size_on_all_streams -= control->length; in sctp_flush_reassm_for_str_seq()
5453 …panic("size_on_all_streams = %u smaller than control length %u", asoc->size_on_all_streams, contro… in sctp_flush_reassm_for_str_seq()
5459 control->on_strm_q = 0; in sctp_flush_reassm_for_str_seq()
5460 } else if (control->on_strm_q == SCTP_ON_UNORDERED) { in sctp_flush_reassm_for_str_seq()
5461 TAILQ_REMOVE(&strm->uno_inqueue, control, next_instrm); in sctp_flush_reassm_for_str_seq()
5462 control->on_strm_q = 0; in sctp_flush_reassm_for_str_seq()
5464 } else if (control->on_strm_q) { in sctp_flush_reassm_for_str_seq()
5466 strm, control, control->on_strm_q); in sctp_flush_reassm_for_str_seq()
5469 control->on_strm_q = 0; in sctp_flush_reassm_for_str_seq()
5470 if (control->on_read_q == 0) { in sctp_flush_reassm_for_str_seq()
5471 sctp_free_remote_addr(control->whoFrom); in sctp_flush_reassm_for_str_seq()
5472 if (control->data) { in sctp_flush_reassm_for_str_seq()
5473 sctp_m_freem(control->data); in sctp_flush_reassm_for_str_seq()
5474 control->data = NULL; in sctp_flush_reassm_for_str_seq()
5476 sctp_free_a_readq(stcb, control); in sctp_flush_reassm_for_str_seq()
5501 struct sctp_queued_to_read *control, *ncontrol; in sctp_handle_forward_tsn() local
5661 TAILQ_FOREACH_SAFE(control, &strm->inqueue, next_instrm, ncontrol) { in sctp_handle_forward_tsn()
5662 if (SCTP_MID_GE(asoc->idata_supported, mid, control->mid)) { in sctp_handle_forward_tsn()
5663 sctp_flush_reassm_for_str_seq(stcb, asoc, strm, control, ordered, new_cum_tsn); in sctp_handle_forward_tsn()
5668 TAILQ_FOREACH_SAFE(control, &strm->uno_inqueue, next_instrm, ncontrol) { in sctp_handle_forward_tsn()
5669 if (SCTP_MID_GE(asoc->idata_supported, mid, control->mid)) { in sctp_handle_forward_tsn()
5670 sctp_flush_reassm_for_str_seq(stcb, asoc, strm, control, ordered, new_cum_tsn); in sctp_handle_forward_tsn()
5679 TAILQ_FOREACH(control, &stcb->sctp_ep->read_queue, next) { in sctp_handle_forward_tsn()
5680 if ((control->sinfo_stream == sid) && in sctp_handle_forward_tsn()
5681 (SCTP_MID_EQ(asoc->idata_supported, control->mid, mid))) { in sctp_handle_forward_tsn()
5682 control->pdapi_aborted = 1; in sctp_handle_forward_tsn()
5683 control->end_added = 1; in sctp_handle_forward_tsn()
5684 if (control->on_strm_q == SCTP_ON_ORDERED) { in sctp_handle_forward_tsn()
5685 TAILQ_REMOVE(&strm->inqueue, control, next_instrm); in sctp_handle_forward_tsn()
5686 if (asoc->size_on_all_streams >= control->length) { in sctp_handle_forward_tsn()
5687 asoc->size_on_all_streams -= control->length; in sctp_handle_forward_tsn()
5690 …panic("size_on_all_streams = %u smaller than control length %u", asoc->size_on_all_streams, contro… in sctp_handle_forward_tsn()
5696 } else if (control->on_strm_q == SCTP_ON_UNORDERED) { in sctp_handle_forward_tsn()
5697 TAILQ_REMOVE(&strm->uno_inqueue, control, next_instrm); in sctp_handle_forward_tsn()
5699 } else if (control->on_strm_q) { in sctp_handle_forward_tsn()
5701 strm, control, control->on_strm_q); in sctp_handle_forward_tsn()
5704 control->on_strm_q = 0; in sctp_handle_forward_tsn()
5708 (void *)control, in sctp_handle_forward_tsn()
5711 } else if ((control->sinfo_stream == sid) && in sctp_handle_forward_tsn()
5712 SCTP_MID_GT(asoc->idata_supported, control->mid, mid)) { in sctp_handle_forward_tsn()