Lines Matching defs:strq

79 		struct sctp_stream_out *strq = TAILQ_FIRST(&asoc->ss_data.out.wheel);
82 strq->ss_params.rr.next_spoke.tqe_next = NULL;
83 strq->ss_params.rr.next_spoke.tqe_prev = NULL;
93 sctp_ss_default_init_stream(struct sctp_tcb *stcb, struct sctp_stream_out *strq, struct sctp_stream_out *with_strq)
97 stcb->asoc.ss_data.locked_on_sending = strq;
100 stcb->asoc.ss_data.last_out_stream = strq;
103 strq->ss_params.rr.next_spoke.tqe_next = NULL;
104 strq->ss_params.rr.next_spoke.tqe_prev = NULL;
110 struct sctp_stream_out *strq,
117 if (!TAILQ_EMPTY(&strq->outqueue) &&
118 (strq->ss_params.rr.next_spoke.tqe_next == NULL) &&
119 (strq->ss_params.rr.next_spoke.tqe_prev == NULL)) {
121 strq, ss_params.rr.next_spoke);
141 struct sctp_stream_out *strq,
151 if (TAILQ_EMPTY(&strq->outqueue) &&
152 (strq->ss_params.rr.next_spoke.tqe_next != NULL ||
153 strq->ss_params.rr.next_spoke.tqe_prev != NULL)) {
154 if (asoc->ss_data.last_out_stream == strq) {
162 if (asoc->ss_data.last_out_stream == strq) {
166 TAILQ_REMOVE(&asoc->ss_data.out.wheel, strq, ss_params.rr.next_spoke);
167 strq->ss_params.rr.next_spoke.tqe_next = NULL;
168 strq->ss_params.rr.next_spoke.tqe_prev = NULL;
181 struct sctp_stream_out *strq, *strqt;
190 strq = TAILQ_FIRST(&asoc->ss_data.out.wheel);
192 strq = TAILQ_NEXT(strqt, ss_params.rr.next_spoke);
193 if (strq == NULL) {
194 strq = TAILQ_FIRST(&asoc->ss_data.out.wheel);
207 if (net != NULL && strq != NULL &&
209 if (TAILQ_FIRST(&strq->outqueue) &&
210 TAILQ_FIRST(&strq->outqueue)->net != NULL &&
211 TAILQ_FIRST(&strq->outqueue)->net != net) {
212 if (strq == asoc->ss_data.last_out_stream) {
215 strqt = strq;
220 return (strq);
227 struct sctp_stream_out *strq,
232 asoc->ss_data.last_out_stream = strq;
234 sp = TAILQ_FIRST(&strq->outqueue);
236 stcb->asoc.ss_data.locked_on_sending = strq;
256 struct sctp_stream_out *strq SCTP_UNUSED, uint16_t * value SCTP_UNUSED)
264 struct sctp_stream_out *strq SCTP_UNUSED, uint16_t value SCTP_UNUSED)
282 struct sctp_stream_out *strq,
290 if (!TAILQ_EMPTY(&strq->outqueue) &&
291 (strq->ss_params.rr.next_spoke.tqe_next == NULL) &&
292 (strq->ss_params.rr.next_spoke.tqe_prev == NULL)) {
294 TAILQ_INSERT_HEAD(&asoc->ss_data.out.wheel, strq, ss_params.rr.next_spoke);
297 while (strqt != NULL && (strqt->stream_no < strq->stream_no)) {
301 TAILQ_INSERT_BEFORE(strqt, strq, ss_params.rr.next_spoke);
303 TAILQ_INSERT_TAIL(&asoc->ss_data.out.wheel, strq, ss_params.rr.next_spoke);
329 struct sctp_stream_out *strq, *strqt;
335 strq = TAILQ_FIRST(&asoc->ss_data.out.wheel);
337 strq = TAILQ_NEXT(strqt, ss_params.rr.next_spoke);
338 if (strq == NULL) {
339 strq = TAILQ_FIRST(&asoc->ss_data.out.wheel);
352 if (net != NULL && strq != NULL &&
354 if (TAILQ_FIRST(&strq->outqueue) &&
355 TAILQ_FIRST(&strq->outqueue)->net != NULL &&
356 TAILQ_FIRST(&strq->outqueue)->net != net) {
357 if (strq == asoc->ss_data.last_out_stream) {
358 strq = NULL;
360 strqt = strq;
365 asoc->ss_data.last_out_stream = strq;
382 struct sctp_stream_out *strq = TAILQ_FIRST(&asoc->ss_data.out.wheel);
385 strq->ss_params.prio.priority = 0;
388 strq->ss_params.prio.next_spoke.tqe_next = NULL;
389 strq->ss_params.prio.next_spoke.tqe_prev = NULL;
400 sctp_ss_prio_init_stream(struct sctp_tcb *stcb, struct sctp_stream_out *strq, struct sctp_stream_out *with_strq)
404 stcb->asoc.ss_data.locked_on_sending = strq;
407 stcb->asoc.ss_data.last_out_stream = strq;
410 strq->ss_params.prio.next_spoke.tqe_next = NULL;
411 strq->ss_params.prio.next_spoke.tqe_prev = NULL;
413 strq->ss_params.prio.priority = with_strq->ss_params.prio.priority;
415 strq->ss_params.prio.priority = 0;
422 struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
431 if (!TAILQ_EMPTY(&strq->outqueue) &&
432 (strq->ss_params.prio.next_spoke.tqe_next == NULL) &&
433 (strq->ss_params.prio.next_spoke.tqe_prev == NULL)) {
435 TAILQ_INSERT_HEAD(&asoc->ss_data.out.wheel, strq, ss_params.prio.next_spoke);
438 while (strqt != NULL && strqt->ss_params.prio.priority < strq->ss_params.prio.priority) {
442 TAILQ_INSERT_BEFORE(strqt, strq, ss_params.prio.next_spoke);
444 TAILQ_INSERT_TAIL(&asoc->ss_data.out.wheel, strq, ss_params.prio.next_spoke);
456 struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
466 if (TAILQ_EMPTY(&strq->outqueue) &&
467 (strq->ss_params.prio.next_spoke.tqe_next != NULL ||
468 strq->ss_params.prio.next_spoke.tqe_prev != NULL)) {
469 if (asoc->ss_data.last_out_stream == strq) {
476 if (asoc->ss_data.last_out_stream == strq) {
480 TAILQ_REMOVE(&asoc->ss_data.out.wheel, strq, ss_params.prio.next_spoke);
481 strq->ss_params.prio.next_spoke.tqe_next = NULL;
482 strq->ss_params.prio.next_spoke.tqe_prev = NULL;
494 struct sctp_stream_out *strq, *strqt, *strqn;
500 strq = TAILQ_FIRST(&asoc->ss_data.out.wheel);
505 strq = strqn;
507 strq = TAILQ_FIRST(&asoc->ss_data.out.wheel);
520 if (net != NULL && strq != NULL &&
522 if (TAILQ_FIRST(&strq->outqueue) &&
523 TAILQ_FIRST(&strq->outqueue)->net != NULL &&
524 TAILQ_FIRST(&strq->outqueue)->net != net) {
525 if (strq == asoc->ss_data.last_out_stream) {
528 strqt = strq;
533 return (strq);
538 struct sctp_stream_out *strq, uint16_t * value)
540 if (strq == NULL) {
543 *value = strq->ss_params.prio.priority;
549 struct sctp_stream_out *strq, uint16_t value)
551 if (strq == NULL) {
554 strq->ss_params.prio.priority = value;
555 sctp_ss_prio_remove(stcb, asoc, strq, NULL, 1);
556 sctp_ss_prio_add(stcb, asoc, strq, NULL, 1);
572 struct sctp_stream_out *strq = TAILQ_FIRST(&asoc->ss_data.out.wheel);
575 strq->ss_params.fb.rounds = -1;
578 strq->ss_params.fb.next_spoke.tqe_next = NULL;
579 strq->ss_params.fb.next_spoke.tqe_prev = NULL;
589 sctp_ss_fb_init_stream(struct sctp_tcb *stcb, struct sctp_stream_out *strq, struct sctp_stream_out *with_strq)
593 stcb->asoc.ss_data.locked_on_sending = strq;
596 stcb->asoc.ss_data.last_out_stream = strq;
599 strq->ss_params.fb.next_spoke.tqe_next = NULL;
600 strq->ss_params.fb.next_spoke.tqe_prev = NULL;
602 strq->ss_params.fb.rounds = with_strq->ss_params.fb.rounds;
604 strq->ss_params.fb.rounds = -1;
611 struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
617 if (!TAILQ_EMPTY(&strq->outqueue) &&
618 (strq->ss_params.fb.next_spoke.tqe_next == NULL) &&
619 (strq->ss_params.fb.next_spoke.tqe_prev == NULL)) {
620 if (strq->ss_params.fb.rounds < 0)
621 strq->ss_params.fb.rounds = TAILQ_FIRST(&strq->outqueue)->length;
622 TAILQ_INSERT_TAIL(&asoc->ss_data.out.wheel, strq, ss_params.fb.next_spoke);
632 struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
642 if (TAILQ_EMPTY(&strq->outqueue) &&
643 (strq->ss_params.fb.next_spoke.tqe_next != NULL ||
644 strq->ss_params.fb.next_spoke.tqe_prev != NULL)) {
645 if (asoc->ss_data.last_out_stream == strq) {
652 if (asoc->ss_data.last_out_stream == strq) {
656 TAILQ_REMOVE(&asoc->ss_data.out.wheel, strq, ss_params.fb.next_spoke);
657 strq->ss_params.fb.next_spoke.tqe_next = NULL;
658 strq->ss_params.fb.next_spoke.tqe_prev = NULL;
670 struct sctp_stream_out *strq = NULL, *strqt;
685 if ((strqt->ss_params.fb.rounds >= 0) && (strq == NULL ||
686 strqt->ss_params.fb.rounds < strq->ss_params.fb.rounds)) {
687 strq = strqt;
695 } while (strqt != strq);
696 return (strq);
701 struct sctp_association *asoc, struct sctp_stream_out *strq,
709 sp = TAILQ_FIRST(&strq->outqueue);
711 stcb->asoc.ss_data.locked_on_sending = strq;
718 subtract = strq->ss_params.fb.rounds;
724 if (TAILQ_FIRST(&strq->outqueue)) {
725 strq->ss_params.fb.rounds = TAILQ_FIRST(&strq->outqueue)->length;
727 strq->ss_params.fb.rounds = -1;
729 asoc->ss_data.last_out_stream = strq;
739 struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp,
795 sctp_ss_fcfs_init_stream(struct sctp_tcb *stcb, struct sctp_stream_out *strq, struct sctp_stream_out *with_strq)
799 stcb->asoc.ss_data.locked_on_sending = strq;
802 stcb->asoc.ss_data.last_out_stream = strq;
810 struct sctp_stream_out *strq SCTP_UNUSED, struct sctp_stream_queue_pending *sp,
838 struct sctp_stream_out *strq SCTP_UNUSED, struct sctp_stream_queue_pending *sp,
860 struct sctp_stream_out *strq;
866 strq = &asoc->strmout[sp->stream];
868 strq = NULL;
880 if (net != NULL && strq != NULL &&
882 if (TAILQ_FIRST(&strq->outqueue) &&
883 TAILQ_FIRST(&strq->outqueue)->net != NULL &&
884 TAILQ_FIRST(&strq->outqueue)->net != net) {
889 return (strq);