Home | History | Annotate | Download | only in netinet

Lines Matching defs:strq

83 		struct sctp_stream_out *strq = TAILQ_FIRST(&asoc->ss_data.out_wheel);
85 strq->ss_params.rr.next_spoke.tqe_next = NULL;
86 strq->ss_params.rr.next_spoke.tqe_prev = NULL;
96 sctp_ss_default_init_stream(struct sctp_stream_out *strq, struct sctp_stream_out *with_strq SCTP_UNUSED)
98 strq->ss_params.rr.next_spoke.tqe_next = NULL;
99 strq->ss_params.rr.next_spoke.tqe_prev = NULL;
105 struct sctp_stream_out *strq,
112 if (!TAILQ_EMPTY(&strq->outqueue) &&
113 (strq->ss_params.rr.next_spoke.tqe_next == NULL) &&
114 (strq->ss_params.rr.next_spoke.tqe_prev == NULL)) {
116 strq, ss_params.rr.next_spoke);
136 struct sctp_stream_out *strq,
143 if (TAILQ_EMPTY(&strq->outqueue) &&
144 (strq->ss_params.rr.next_spoke.tqe_next != NULL ||
145 strq->ss_params.rr.next_spoke.tqe_prev != NULL)) {
146 if (asoc->last_out_stream == strq) {
154 if (asoc->last_out_stream == strq) {
158 TAILQ_REMOVE(&asoc->ss_data.out_wheel, strq, ss_params.rr.next_spoke);
159 strq->ss_params.rr.next_spoke.tqe_next = NULL;
160 strq->ss_params.rr.next_spoke.tqe_prev = NULL;
173 struct sctp_stream_out *strq, *strqt;
179 strq = TAILQ_FIRST(&asoc->ss_data.out_wheel);
181 strq = TAILQ_NEXT(strqt, ss_params.rr.next_spoke);
182 if (strq == NULL) {
183 strq = TAILQ_FIRST(&asoc->ss_data.out_wheel);
198 if (net != NULL && strq != NULL &&
200 if (TAILQ_FIRST(&strq->outqueue) &&
201 TAILQ_FIRST(&strq->outqueue)->net != NULL &&
202 TAILQ_FIRST(&strq->outqueue)->net != net) {
203 if (strq == asoc->last_out_stream) {
206 strqt = strq;
211 return (strq);
217 struct sctp_stream_out *strq, int moved_how_much SCTP_UNUSED)
219 asoc->last_out_stream = strq;
233 struct sctp_stream_out *strq SCTP_UNUSED, uint16_t *value SCTP_UNUSED)
241 struct sctp_stream_out *strq SCTP_UNUSED, uint16_t value SCTP_UNUSED)
253 struct sctp_stream_out *strq,
261 if (!TAILQ_EMPTY(&strq->outqueue) &&
262 (strq->ss_params.rr.next_spoke.tqe_next == NULL) &&
263 (strq->ss_params.rr.next_spoke.tqe_prev == NULL)) {
265 TAILQ_INSERT_HEAD(&asoc->ss_data.out_wheel, strq, ss_params.rr.next_spoke);
268 while (strqt != NULL && (strqt->stream_no < strq->stream_no)) {
272 TAILQ_INSERT_BEFORE(strqt, strq, ss_params.rr.next_spoke);
274 TAILQ_INSERT_TAIL(&asoc->ss_data.out_wheel, strq, ss_params.rr.next_spoke);
300 struct sctp_stream_out *strq, *strqt;
306 strq = TAILQ_FIRST(&asoc->ss_data.out_wheel);
308 strq = TAILQ_NEXT(strqt, ss_params.rr.next_spoke);
309 if (strq == NULL) {
310 strq = TAILQ_FIRST(&asoc->ss_data.out_wheel);
325 if (net != NULL && strq != NULL &&
327 if (TAILQ_FIRST(&strq->outqueue) &&
328 TAILQ_FIRST(&strq->outqueue)->net != NULL &&
329 TAILQ_FIRST(&strq->outqueue)->net != net) {
330 if (strq == asoc->last_out_stream) {
331 strq = NULL;
333 strqt = strq;
338 asoc->last_out_stream = strq;
355 struct sctp_stream_out *strq = TAILQ_FIRST(&asoc->ss_data.out_wheel);
357 strq->ss_params.prio.priority = 0;
360 strq->ss_params.prio.next_spoke.tqe_next = NULL;
361 strq->ss_params.prio.next_spoke.tqe_prev = NULL;
372 sctp_ss_prio_init_stream(struct sctp_stream_out *strq, struct sctp_stream_out *with_strq)
374 strq->ss_params.prio.next_spoke.tqe_next = NULL;
375 strq->ss_params.prio.next_spoke.tqe_prev = NULL;
377 strq->ss_params.prio.priority = with_strq->ss_params.prio.priority;
379 strq->ss_params.prio.priority = 0;
386 struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
395 if (!TAILQ_EMPTY(&strq->outqueue) &&
396 (strq->ss_params.prio.next_spoke.tqe_next == NULL) &&
397 (strq->ss_params.prio.next_spoke.tqe_prev == NULL)) {
399 TAILQ_INSERT_HEAD(&asoc->ss_data.out_wheel, strq, ss_params.prio.next_spoke);
402 while (strqt != NULL && strqt->ss_params.prio.priority < strq->ss_params.prio.priority) {
406 TAILQ_INSERT_BEFORE(strqt, strq, ss_params.prio.next_spoke);
408 TAILQ_INSERT_TAIL(&asoc->ss_data.out_wheel, strq, ss_params.prio.next_spoke);
420 struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
427 if (TAILQ_EMPTY(&strq->outqueue) &&
428 (strq->ss_params.prio.next_spoke.tqe_next != NULL ||
429 strq->ss_params.prio.next_spoke.tqe_prev != NULL)) {
430 if (asoc->last_out_stream == strq) {
437 if (asoc->last_out_stream == strq) {
441 TAILQ_REMOVE(&asoc->ss_data.out_wheel, strq, ss_params.prio.next_spoke);
442 strq->ss_params.prio.next_spoke.tqe_next = NULL;
443 strq->ss_params.prio.next_spoke.tqe_prev = NULL;
455 struct sctp_stream_out *strq, *strqt, *strqn;
461 strq = TAILQ_FIRST(&asoc->ss_data.out_wheel);
466 strq = strqn;
468 strq = TAILQ_FIRST(&asoc->ss_data.out_wheel);
483 if (net != NULL && strq != NULL &&
485 if (TAILQ_FIRST(&strq->outqueue) &&
486 TAILQ_FIRST(&strq->outqueue)->net != NULL &&
487 TAILQ_FIRST(&strq->outqueue)->net != net) {
488 if (strq == asoc->last_out_stream) {
491 strqt = strq;
496 return (strq);
501 struct sctp_stream_out *strq, uint16_t *value)
503 if (strq == NULL) {
506 *value = strq->ss_params.prio.priority;
512 struct sctp_stream_out *strq, uint16_t value)
514 if (strq
517 strq->ss_params.prio.priority = value;
518 sctp_ss_prio_remove(stcb, asoc, strq, NULL, 1);
519 sctp_ss_prio_add(stcb, asoc, strq, NULL, 1);
535 struct sctp_stream_out *strq = TAILQ_FIRST(&asoc->ss_data.out_wheel);
537 strq->ss_params.fb.rounds = -1;
540 strq->ss_params.fb.next_spoke.tqe_next = NULL;
541 strq->ss_params.fb.next_spoke.tqe_prev = NULL;
551 sctp_ss_fb_init_stream(struct sctp_stream_out *strq, struct sctp_stream_out *with_strq)
553 strq->ss_params.fb.next_spoke.tqe_next = NULL;
554 strq->ss_params.fb.next_spoke.tqe_prev = NULL;
556 strq->ss_params.fb.rounds = with_strq->ss_params.fb.rounds;
558 strq->ss_params.fb.rounds = -1;
565 struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
571 if (!TAILQ_EMPTY(&strq->outqueue) &&
572 (strq->ss_params.fb.next_spoke.tqe_next == NULL) &&
573 (strq->ss_params.fb.next_spoke.tqe_prev == NULL)) {
574 if (strq->ss_params.fb.rounds < 0)
575 strq->ss_params.fb.rounds = TAILQ_FIRST(&strq->outqueue)->length;
576 TAILQ_INSERT_TAIL(&asoc->ss_data.out_wheel, strq, ss_params.fb.next_spoke);
586 struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
593 if (TAILQ_EMPTY(&strq->outqueue) &&
594 (strq->ss_params.fb.next_spoke.tqe_next != NULL ||
595 strq->ss_params.fb.next_spoke.tqe_prev != NULL)) {
596 if (asoc->last_out_stream == strq) {
603 if (asoc->last_out_stream == strq) {
607 TAILQ_REMOVE(&asoc->ss_data.out_wheel, strq, ss_params.fb.next_spoke);
608 strq->ss_params.fb.next_spoke.tqe_next = NULL;
609 strq->ss_params.fb.next_spoke.tqe_prev = NULL;
621 struct sctp_stream_out *strq = NULL, *strqt;
636 if ((strqt->ss_params.fb.rounds >= 0) && (strq == NULL ||
637 strqt->ss_params.fb.rounds < strq->ss_params.fb.rounds)) {
638 strq = strqt;
646 } while (strqt != strq);
647 return (strq);
652 struct sctp_association *asoc, struct sctp_stream_out *strq,
658 subtract = strq->ss_params.fb.rounds;
664 if (TAILQ_FIRST(&strq->outqueue)) {
665 strq->ss_params.fb.rounds = TAILQ_FIRST(&strq->outqueue)->length;
667 strq->ss_params.fb.rounds = -1;
669 asoc->last_out_stream = strq;
679 struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp,
737 sctp_ss_fcfs_init_stream(struct sctp_stream_out *strq SCTP_UNUSED, struct sctp_stream_out *with_strq SCTP_UNUSED)
745 struct sctp_stream_out *strq SCTP_UNUSED, struct sctp_stream_queue_pending *sp,
773 struct sctp_stream_out *strq SCTP_UNUSED, struct sctp_stream_queue_pending *sp,
795 struct sctp_stream_out *strq;
801 strq = &asoc->strmout[sp->stream];
803 strq = NULL;
818 if (net != NULL && strq != NULL &&
820 if (TAILQ_FIRST(&strq->outqueue) &&
821 TAILQ_FIRST(&strq->outqueue)->net != NULL &&
822 TAILQ_FIRST(&strq->outqueue)->net != net) {
827 return (strq);