sctp: Simplify stream scheduler usage
Callers are getting the stcb send lock, so just KASSERT that. No need to signal this when calling stream scheduler functions. No functional change intended. MFC after: 1 week
This commit is contained in:
parent
2734050154
commit
762ae0ec8d
@ -213,7 +213,7 @@ sctp_is_there_unsent_data(struct sctp_tcb *stcb, int so_locked)
|
|||||||
}
|
}
|
||||||
atomic_subtract_int(&stcb->asoc.stream_queue_cnt, 1);
|
atomic_subtract_int(&stcb->asoc.stream_queue_cnt, 1);
|
||||||
TAILQ_REMOVE(&stcb->asoc.strmout[i].outqueue, sp, next);
|
TAILQ_REMOVE(&stcb->asoc.strmout[i].outqueue, sp, next);
|
||||||
stcb->asoc.ss_functions.sctp_ss_remove_from_stream(stcb, asoc, &asoc->strmout[i], sp, 1);
|
stcb->asoc.ss_functions.sctp_ss_remove_from_stream(stcb, asoc, &asoc->strmout[i], sp);
|
||||||
if (sp->net) {
|
if (sp->net) {
|
||||||
sctp_free_remote_addr(sp->net);
|
sctp_free_remote_addr(sp->net);
|
||||||
sp->net = NULL;
|
sp->net = NULL;
|
||||||
@ -302,7 +302,7 @@ sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb)
|
|||||||
TAILQ_FOREACH_SAFE(sp, &outs->outqueue, next, nsp) {
|
TAILQ_FOREACH_SAFE(sp, &outs->outqueue, next, nsp) {
|
||||||
atomic_subtract_int(&stcb->asoc.stream_queue_cnt, 1);
|
atomic_subtract_int(&stcb->asoc.stream_queue_cnt, 1);
|
||||||
TAILQ_REMOVE(&outs->outqueue, sp, next);
|
TAILQ_REMOVE(&outs->outqueue, sp, next);
|
||||||
stcb->asoc.ss_functions.sctp_ss_remove_from_stream(stcb, asoc, outs, sp, 1);
|
stcb->asoc.ss_functions.sctp_ss_remove_from_stream(stcb, asoc, outs, sp);
|
||||||
sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL,
|
sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL,
|
||||||
stcb, 0, sp, SCTP_SO_NOT_LOCKED);
|
stcb, 0, sp, SCTP_SO_NOT_LOCKED);
|
||||||
if (sp->data) {
|
if (sp->data) {
|
||||||
|
@ -354,6 +354,11 @@ __FBSDID("$FreeBSD$");
|
|||||||
mtx_unlock(&(_tcb)->tcb_send_mtx); \
|
mtx_unlock(&(_tcb)->tcb_send_mtx); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
#define SCTP_TCB_SEND_LOCK_ASSERT(_tcb) do { \
|
||||||
|
KASSERT(mtx_owned(&(_tcb)->tcb_send_mtx), \
|
||||||
|
("Don't own TCB send lock")); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For the majority of things (once we have found the association) we will
|
* For the majority of things (once we have found the association) we will
|
||||||
* lock the actual association mutex. This will protect all the assoiciation
|
* lock the actual association mutex. This will protect all the assoiciation
|
||||||
|
@ -6399,7 +6399,7 @@ sctp_msg_append(struct sctp_tcb *stcb,
|
|||||||
sctp_snd_sb_alloc(stcb, sp->length);
|
sctp_snd_sb_alloc(stcb, sp->length);
|
||||||
atomic_add_int(&stcb->asoc.stream_queue_cnt, 1);
|
atomic_add_int(&stcb->asoc.stream_queue_cnt, 1);
|
||||||
TAILQ_INSERT_TAIL(&strm->outqueue, sp, next);
|
TAILQ_INSERT_TAIL(&strm->outqueue, sp, next);
|
||||||
stcb->asoc.ss_functions.sctp_ss_add_to_stream(stcb, &stcb->asoc, strm, sp, 1);
|
stcb->asoc.ss_functions.sctp_ss_add_to_stream(stcb, &stcb->asoc, strm, sp);
|
||||||
m = NULL;
|
m = NULL;
|
||||||
if (hold_stcb_lock == 0) {
|
if (hold_stcb_lock == 0) {
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
SCTP_TCB_SEND_UNLOCK(stcb);
|
||||||
@ -7213,7 +7213,7 @@ sctp_move_to_outqueue(struct sctp_tcb *stcb,
|
|||||||
}
|
}
|
||||||
atomic_subtract_int(&asoc->stream_queue_cnt, 1);
|
atomic_subtract_int(&asoc->stream_queue_cnt, 1);
|
||||||
TAILQ_REMOVE(&strq->outqueue, sp, next);
|
TAILQ_REMOVE(&strq->outqueue, sp, next);
|
||||||
stcb->asoc.ss_functions.sctp_ss_remove_from_stream(stcb, asoc, strq, sp, 1);
|
stcb->asoc.ss_functions.sctp_ss_remove_from_stream(stcb, asoc, strq, sp);
|
||||||
if ((strq->state == SCTP_STREAM_RESET_PENDING) &&
|
if ((strq->state == SCTP_STREAM_RESET_PENDING) &&
|
||||||
(strq->chunks_on_queues == 0) &&
|
(strq->chunks_on_queues == 0) &&
|
||||||
TAILQ_EMPTY(&strq->outqueue)) {
|
TAILQ_EMPTY(&strq->outqueue)) {
|
||||||
@ -7644,7 +7644,7 @@ sctp_move_to_outqueue(struct sctp_tcb *stcb,
|
|||||||
}
|
}
|
||||||
atomic_subtract_int(&asoc->stream_queue_cnt, 1);
|
atomic_subtract_int(&asoc->stream_queue_cnt, 1);
|
||||||
TAILQ_REMOVE(&strq->outqueue, sp, next);
|
TAILQ_REMOVE(&strq->outqueue, sp, next);
|
||||||
stcb->asoc.ss_functions.sctp_ss_remove_from_stream(stcb, asoc, strq, sp, 1);
|
stcb->asoc.ss_functions.sctp_ss_remove_from_stream(stcb, asoc, strq, sp);
|
||||||
if ((strq->state == SCTP_STREAM_RESET_PENDING) &&
|
if ((strq->state == SCTP_STREAM_RESET_PENDING) &&
|
||||||
(strq->chunks_on_queues == 0) &&
|
(strq->chunks_on_queues == 0) &&
|
||||||
TAILQ_EMPTY(&strq->outqueue)) {
|
TAILQ_EMPTY(&strq->outqueue)) {
|
||||||
@ -12176,7 +12176,7 @@ sctp_send_str_reset_req(struct sctp_tcb *stcb,
|
|||||||
* initializing the new stuff.
|
* initializing the new stuff.
|
||||||
*/
|
*/
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
SCTP_TCB_SEND_LOCK(stcb);
|
||||||
stcb->asoc.ss_functions.sctp_ss_clear(stcb, &stcb->asoc, 0, 1);
|
stcb->asoc.ss_functions.sctp_ss_clear(stcb, &stcb->asoc, 0);
|
||||||
for (i = 0; i < stcb->asoc.streamoutcnt; i++) {
|
for (i = 0; i < stcb->asoc.streamoutcnt; i++) {
|
||||||
TAILQ_INIT(&stcb->asoc.strmout[i].outqueue);
|
TAILQ_INIT(&stcb->asoc.strmout[i].outqueue);
|
||||||
/* FIX ME FIX ME */
|
/* FIX ME FIX ME */
|
||||||
@ -12207,7 +12207,7 @@ sctp_send_str_reset_req(struct sctp_tcb *stcb,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* now the new streams */
|
/* now the new streams */
|
||||||
stcb->asoc.ss_functions.sctp_ss_init(stcb, &stcb->asoc, 1);
|
stcb->asoc.ss_functions.sctp_ss_init(stcb, &stcb->asoc);
|
||||||
for (i = stcb->asoc.streamoutcnt; i < (stcb->asoc.streamoutcnt + adding_o); i++) {
|
for (i = stcb->asoc.streamoutcnt; i < (stcb->asoc.streamoutcnt + adding_o); i++) {
|
||||||
TAILQ_INIT(&stcb->asoc.strmout[i].outqueue);
|
TAILQ_INIT(&stcb->asoc.strmout[i].outqueue);
|
||||||
stcb->asoc.strmout[i].chunks_on_queues = 0;
|
stcb->asoc.strmout[i].chunks_on_queues = 0;
|
||||||
@ -13161,7 +13161,7 @@ sctp_lower_sosend(struct socket *so,
|
|||||||
}
|
}
|
||||||
sp->processing = 1;
|
sp->processing = 1;
|
||||||
TAILQ_INSERT_TAIL(&strm->outqueue, sp, next);
|
TAILQ_INSERT_TAIL(&strm->outqueue, sp, next);
|
||||||
stcb->asoc.ss_functions.sctp_ss_add_to_stream(stcb, asoc, strm, sp, 1);
|
stcb->asoc.ss_functions.sctp_ss_add_to_stream(stcb, asoc, strm, sp);
|
||||||
} else {
|
} else {
|
||||||
sp = TAILQ_LAST(&strm->outqueue, sctp_streamhead);
|
sp = TAILQ_LAST(&strm->outqueue, sctp_streamhead);
|
||||||
if (sp == NULL) {
|
if (sp == NULL) {
|
||||||
|
@ -4923,7 +4923,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre
|
|||||||
TAILQ_FOREACH_SAFE(sp, &outs->outqueue, next, nsp) {
|
TAILQ_FOREACH_SAFE(sp, &outs->outqueue, next, nsp) {
|
||||||
atomic_subtract_int(&asoc->stream_queue_cnt, 1);
|
atomic_subtract_int(&asoc->stream_queue_cnt, 1);
|
||||||
TAILQ_REMOVE(&outs->outqueue, sp, next);
|
TAILQ_REMOVE(&outs->outqueue, sp, next);
|
||||||
stcb->asoc.ss_functions.sctp_ss_remove_from_stream(stcb, asoc, outs, sp, 1);
|
stcb->asoc.ss_functions.sctp_ss_remove_from_stream(stcb, asoc, outs, sp);
|
||||||
sctp_free_spbufspace(stcb, asoc, sp);
|
sctp_free_spbufspace(stcb, asoc, sp);
|
||||||
if (sp->data) {
|
if (sp->data) {
|
||||||
if (so) {
|
if (so) {
|
||||||
|
@ -41,22 +41,19 @@ __FBSDID("$FreeBSD$");
|
|||||||
static void
|
static void
|
||||||
sctp_ss_default_add(struct sctp_tcb *, struct sctp_association *,
|
sctp_ss_default_add(struct sctp_tcb *, struct sctp_association *,
|
||||||
struct sctp_stream_out *,
|
struct sctp_stream_out *,
|
||||||
struct sctp_stream_queue_pending *, int);
|
struct sctp_stream_queue_pending *);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_default_remove(struct sctp_tcb *, struct sctp_association *,
|
sctp_ss_default_remove(struct sctp_tcb *, struct sctp_association *,
|
||||||
struct sctp_stream_out *,
|
struct sctp_stream_out *,
|
||||||
struct sctp_stream_queue_pending *, int);
|
struct sctp_stream_queue_pending *);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_default_init(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_default_init(struct sctp_tcb *stcb, struct sctp_association *asoc)
|
||||||
int holds_lock)
|
|
||||||
{
|
{
|
||||||
uint16_t i;
|
uint16_t i;
|
||||||
|
|
||||||
if (holds_lock == 0) {
|
SCTP_TCB_SEND_LOCK_ASSERT(stcb);
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
|
||||||
}
|
|
||||||
asoc->ss_data.locked_on_sending = NULL;
|
asoc->ss_data.locked_on_sending = NULL;
|
||||||
asoc->ss_data.last_out_stream = NULL;
|
asoc->ss_data.last_out_stream = NULL;
|
||||||
TAILQ_INIT(&asoc->ss_data.out.wheel);
|
TAILQ_INIT(&asoc->ss_data.out.wheel);
|
||||||
@ -68,21 +65,17 @@ sctp_ss_default_init(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
for (i = 0; i < stcb->asoc.streamoutcnt; i++) {
|
for (i = 0; i < stcb->asoc.streamoutcnt; i++) {
|
||||||
stcb->asoc.ss_functions.sctp_ss_add_to_stream(stcb, &stcb->asoc,
|
stcb->asoc.ss_functions.sctp_ss_add_to_stream(stcb, &stcb->asoc,
|
||||||
&stcb->asoc.strmout[i],
|
&stcb->asoc.strmout[i],
|
||||||
NULL, 1);
|
NULL);
|
||||||
}
|
|
||||||
if (holds_lock == 0) {
|
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_default_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_default_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
int clear_values SCTP_UNUSED, int holds_lock)
|
int clear_values SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
if (holds_lock == 0) {
|
SCTP_TCB_SEND_LOCK_ASSERT(stcb);
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
|
||||||
}
|
|
||||||
while (!TAILQ_EMPTY(&asoc->ss_data.out.wheel)) {
|
while (!TAILQ_EMPTY(&asoc->ss_data.out.wheel)) {
|
||||||
struct sctp_stream_out *strq;
|
struct sctp_stream_out *strq;
|
||||||
|
|
||||||
@ -92,9 +85,6 @@ sctp_ss_default_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
strq->ss_params.rr.next_spoke.tqe_prev = NULL;
|
strq->ss_params.rr.next_spoke.tqe_prev = NULL;
|
||||||
}
|
}
|
||||||
asoc->ss_data.last_out_stream = NULL;
|
asoc->ss_data.last_out_stream = NULL;
|
||||||
if (holds_lock == 0) {
|
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,11 +107,10 @@ sctp_ss_default_init_stream(struct sctp_tcb *stcb, struct sctp_stream_out *strq,
|
|||||||
static void
|
static void
|
||||||
sctp_ss_default_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_default_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq,
|
struct sctp_stream_out *strq,
|
||||||
struct sctp_stream_queue_pending *sp SCTP_UNUSED, int holds_lock)
|
struct sctp_stream_queue_pending *sp SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
if (holds_lock == 0) {
|
SCTP_TCB_SEND_LOCK_ASSERT(stcb);
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
|
||||||
}
|
|
||||||
/* Add to wheel if not already on it and stream queue not empty */
|
/* Add to wheel if not already on it and stream queue not empty */
|
||||||
if (!TAILQ_EMPTY(&strq->outqueue) &&
|
if (!TAILQ_EMPTY(&strq->outqueue) &&
|
||||||
(strq->ss_params.rr.next_spoke.tqe_next == NULL) &&
|
(strq->ss_params.rr.next_spoke.tqe_next == NULL) &&
|
||||||
@ -129,9 +118,6 @@ sctp_ss_default_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
TAILQ_INSERT_TAIL(&asoc->ss_data.out.wheel,
|
TAILQ_INSERT_TAIL(&asoc->ss_data.out.wheel,
|
||||||
strq, ss_params.rr.next_spoke);
|
strq, ss_params.rr.next_spoke);
|
||||||
}
|
}
|
||||||
if (holds_lock == 0) {
|
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,11 +134,10 @@ sctp_ss_default_is_empty(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_associat
|
|||||||
static void
|
static void
|
||||||
sctp_ss_default_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_default_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq,
|
struct sctp_stream_out *strq,
|
||||||
struct sctp_stream_queue_pending *sp SCTP_UNUSED, int holds_lock)
|
struct sctp_stream_queue_pending *sp SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
if (holds_lock == 0) {
|
SCTP_TCB_SEND_LOCK_ASSERT(stcb);
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
* Remove from wheel if stream queue is empty and actually is on the
|
* Remove from wheel if stream queue is empty and actually is on the
|
||||||
* wheel
|
* wheel
|
||||||
@ -176,9 +161,6 @@ sctp_ss_default_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
strq->ss_params.rr.next_spoke.tqe_next = NULL;
|
strq->ss_params.rr.next_spoke.tqe_next = NULL;
|
||||||
strq->ss_params.rr.next_spoke.tqe_prev = NULL;
|
strq->ss_params.rr.next_spoke.tqe_prev = NULL;
|
||||||
}
|
}
|
||||||
if (holds_lock == 0) {
|
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,13 +284,12 @@ sctp_ss_default_is_user_msgs_incomplete(struct sctp_tcb *stcb SCTP_UNUSED, struc
|
|||||||
static void
|
static void
|
||||||
sctp_ss_rr_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_rr_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq,
|
struct sctp_stream_out *strq,
|
||||||
struct sctp_stream_queue_pending *sp SCTP_UNUSED, int holds_lock)
|
struct sctp_stream_queue_pending *sp SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
struct sctp_stream_out *strqt;
|
struct sctp_stream_out *strqt;
|
||||||
|
|
||||||
if (holds_lock == 0) {
|
SCTP_TCB_SEND_LOCK_ASSERT(stcb);
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
|
||||||
}
|
|
||||||
if (!TAILQ_EMPTY(&strq->outqueue) &&
|
if (!TAILQ_EMPTY(&strq->outqueue) &&
|
||||||
(strq->ss_params.rr.next_spoke.tqe_next == NULL) &&
|
(strq->ss_params.rr.next_spoke.tqe_next == NULL) &&
|
||||||
(strq->ss_params.rr.next_spoke.tqe_prev == NULL)) {
|
(strq->ss_params.rr.next_spoke.tqe_prev == NULL)) {
|
||||||
@ -326,9 +307,6 @@ sctp_ss_rr_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (holds_lock == 0) {
|
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -394,11 +372,10 @@ sctp_ss_rrp_packet_done(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
sctp_ss_prio_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_prio_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
int clear_values, int holds_lock)
|
int clear_values)
|
||||||
{
|
{
|
||||||
if (holds_lock == 0) {
|
SCTP_TCB_SEND_LOCK_ASSERT(stcb);
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
|
||||||
}
|
|
||||||
while (!TAILQ_EMPTY(&asoc->ss_data.out.wheel)) {
|
while (!TAILQ_EMPTY(&asoc->ss_data.out.wheel)) {
|
||||||
struct sctp_stream_out *strq;
|
struct sctp_stream_out *strq;
|
||||||
|
|
||||||
@ -411,9 +388,6 @@ sctp_ss_prio_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
strq->ss_params.prio.next_spoke.tqe_prev = NULL;
|
strq->ss_params.prio.next_spoke.tqe_prev = NULL;
|
||||||
}
|
}
|
||||||
asoc->ss_data.last_out_stream = NULL;
|
asoc->ss_data.last_out_stream = NULL;
|
||||||
if (holds_lock == 0) {
|
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -440,14 +414,12 @@ sctp_ss_prio_init_stream(struct sctp_tcb *stcb, struct sctp_stream_out *strq, st
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_prio_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_prio_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
|
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED)
|
||||||
int holds_lock)
|
|
||||||
{
|
{
|
||||||
struct sctp_stream_out *strqt;
|
struct sctp_stream_out *strqt;
|
||||||
|
|
||||||
if (holds_lock == 0) {
|
SCTP_TCB_SEND_LOCK_ASSERT(stcb);
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
|
||||||
}
|
|
||||||
/* Add to wheel if not already on it and stream queue not empty */
|
/* Add to wheel if not already on it and stream queue not empty */
|
||||||
if (!TAILQ_EMPTY(&strq->outqueue) &&
|
if (!TAILQ_EMPTY(&strq->outqueue) &&
|
||||||
(strq->ss_params.prio.next_spoke.tqe_next == NULL) &&
|
(strq->ss_params.prio.next_spoke.tqe_next == NULL) &&
|
||||||
@ -466,20 +438,15 @@ sctp_ss_prio_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (holds_lock == 0) {
|
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_prio_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_prio_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
|
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED)
|
||||||
int holds_lock)
|
|
||||||
{
|
{
|
||||||
if (holds_lock == 0) {
|
SCTP_TCB_SEND_LOCK_ASSERT(stcb);
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
* Remove from wheel if stream queue is empty and actually is on the
|
* Remove from wheel if stream queue is empty and actually is on the
|
||||||
* wheel
|
* wheel
|
||||||
@ -502,9 +469,6 @@ sctp_ss_prio_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
strq->ss_params.prio.next_spoke.tqe_next = NULL;
|
strq->ss_params.prio.next_spoke.tqe_next = NULL;
|
||||||
strq->ss_params.prio.next_spoke.tqe_prev = NULL;
|
strq->ss_params.prio.next_spoke.tqe_prev = NULL;
|
||||||
}
|
}
|
||||||
if (holds_lock == 0) {
|
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -576,8 +540,8 @@ sctp_ss_prio_set_value(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
strq->ss_params.prio.priority = value;
|
strq->ss_params.prio.priority = value;
|
||||||
sctp_ss_prio_remove(stcb, asoc, strq, NULL, 1);
|
sctp_ss_prio_remove(stcb, asoc, strq, NULL);
|
||||||
sctp_ss_prio_add(stcb, asoc, strq, NULL, 1);
|
sctp_ss_prio_add(stcb, asoc, strq, NULL);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -587,11 +551,10 @@ sctp_ss_prio_set_value(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
sctp_ss_fb_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_fb_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
int clear_values, int holds_lock)
|
int clear_values)
|
||||||
{
|
{
|
||||||
if (holds_lock == 0) {
|
SCTP_TCB_SEND_LOCK_ASSERT(stcb);
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
|
||||||
}
|
|
||||||
while (!TAILQ_EMPTY(&asoc->ss_data.out.wheel)) {
|
while (!TAILQ_EMPTY(&asoc->ss_data.out.wheel)) {
|
||||||
struct sctp_stream_out *strq;
|
struct sctp_stream_out *strq;
|
||||||
|
|
||||||
@ -604,9 +567,6 @@ sctp_ss_fb_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
strq->ss_params.fb.next_spoke.tqe_prev = NULL;
|
strq->ss_params.fb.next_spoke.tqe_prev = NULL;
|
||||||
}
|
}
|
||||||
asoc->ss_data.last_out_stream = NULL;
|
asoc->ss_data.last_out_stream = NULL;
|
||||||
if (holds_lock == 0) {
|
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -633,12 +593,10 @@ sctp_ss_fb_init_stream(struct sctp_tcb *stcb, struct sctp_stream_out *strq, stru
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_fb_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_fb_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
|
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED)
|
||||||
int holds_lock)
|
|
||||||
{
|
{
|
||||||
if (holds_lock == 0) {
|
SCTP_TCB_SEND_LOCK_ASSERT(stcb);
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
|
||||||
}
|
|
||||||
if (!TAILQ_EMPTY(&strq->outqueue) &&
|
if (!TAILQ_EMPTY(&strq->outqueue) &&
|
||||||
(strq->ss_params.fb.next_spoke.tqe_next == NULL) &&
|
(strq->ss_params.fb.next_spoke.tqe_next == NULL) &&
|
||||||
(strq->ss_params.fb.next_spoke.tqe_prev == NULL)) {
|
(strq->ss_params.fb.next_spoke.tqe_prev == NULL)) {
|
||||||
@ -646,20 +604,15 @@ sctp_ss_fb_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
strq->ss_params.fb.rounds = TAILQ_FIRST(&strq->outqueue)->length;
|
strq->ss_params.fb.rounds = TAILQ_FIRST(&strq->outqueue)->length;
|
||||||
TAILQ_INSERT_TAIL(&asoc->ss_data.out.wheel, strq, ss_params.fb.next_spoke);
|
TAILQ_INSERT_TAIL(&asoc->ss_data.out.wheel, strq, ss_params.fb.next_spoke);
|
||||||
}
|
}
|
||||||
if (holds_lock == 0) {
|
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_fb_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_fb_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
|
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED)
|
||||||
int holds_lock)
|
|
||||||
{
|
{
|
||||||
if (holds_lock == 0) {
|
SCTP_TCB_SEND_LOCK_ASSERT(stcb);
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
* Remove from wheel if stream queue is empty and actually is on the
|
* Remove from wheel if stream queue is empty and actually is on the
|
||||||
* wheel
|
* wheel
|
||||||
@ -682,9 +635,6 @@ sctp_ss_fb_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
strq->ss_params.fb.next_spoke.tqe_next = NULL;
|
strq->ss_params.fb.next_spoke.tqe_next = NULL;
|
||||||
strq->ss_params.fb.next_spoke.tqe_prev = NULL;
|
strq->ss_params.fb.next_spoke.tqe_prev = NULL;
|
||||||
}
|
}
|
||||||
if (holds_lock == 0) {
|
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -765,19 +715,17 @@ sctp_ss_fb_scheduled(struct sctp_tcb *stcb, struct sctp_nets *net SCTP_UNUSED,
|
|||||||
static void
|
static void
|
||||||
sctp_ss_fcfs_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_fcfs_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq SCTP_UNUSED,
|
struct sctp_stream_out *strq SCTP_UNUSED,
|
||||||
struct sctp_stream_queue_pending *sp, int holds_lock);
|
struct sctp_stream_queue_pending *sp);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_fcfs_init(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_fcfs_init(struct sctp_tcb *stcb, struct sctp_association *asoc)
|
||||||
int holds_lock)
|
|
||||||
{
|
{
|
||||||
uint32_t x, n = 0, add_more = 1;
|
uint32_t x, n = 0, add_more = 1;
|
||||||
struct sctp_stream_queue_pending *sp;
|
struct sctp_stream_queue_pending *sp;
|
||||||
uint16_t i;
|
uint16_t i;
|
||||||
|
|
||||||
if (holds_lock == 0) {
|
SCTP_TCB_SEND_LOCK_ASSERT(stcb);
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
|
||||||
}
|
|
||||||
TAILQ_INIT(&asoc->ss_data.out.list);
|
TAILQ_INIT(&asoc->ss_data.out.list);
|
||||||
/*
|
/*
|
||||||
* If there is data in the stream queues already, the scheduler of
|
* If there is data in the stream queues already, the scheduler of
|
||||||
@ -795,27 +743,23 @@ sctp_ss_fcfs_init(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
if (sp != NULL) {
|
if (sp != NULL) {
|
||||||
sctp_ss_fcfs_add(stcb, &stcb->asoc, &stcb->asoc.strmout[i], sp, 1);
|
sctp_ss_fcfs_add(stcb, &stcb->asoc, &stcb->asoc.strmout[i], sp);
|
||||||
add_more = 1;
|
add_more = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
if (holds_lock == 0) {
|
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_fcfs_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_fcfs_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
int clear_values SCTP_UNUSED, int holds_lock)
|
int clear_values SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
struct sctp_stream_queue_pending *sp;
|
struct sctp_stream_queue_pending *sp;
|
||||||
|
|
||||||
if (holds_lock == 0) {
|
SCTP_TCB_SEND_LOCK_ASSERT(stcb);
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
|
||||||
}
|
|
||||||
while (!TAILQ_EMPTY(&asoc->ss_data.out.list)) {
|
while (!TAILQ_EMPTY(&asoc->ss_data.out.list)) {
|
||||||
sp = TAILQ_FIRST(&asoc->ss_data.out.list);
|
sp = TAILQ_FIRST(&asoc->ss_data.out.list);
|
||||||
TAILQ_REMOVE(&asoc->ss_data.out.list, sp, ss_next);
|
TAILQ_REMOVE(&asoc->ss_data.out.list, sp, ss_next);
|
||||||
@ -823,9 +767,6 @@ sctp_ss_fcfs_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
sp->ss_next.tqe_prev = NULL;
|
sp->ss_next.tqe_prev = NULL;
|
||||||
}
|
}
|
||||||
asoc->ss_data.last_out_stream = NULL;
|
asoc->ss_data.last_out_stream = NULL;
|
||||||
if (holds_lock == 0) {
|
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -847,19 +788,14 @@ sctp_ss_fcfs_init_stream(struct sctp_tcb *stcb, struct sctp_stream_out *strq, st
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_fcfs_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_fcfs_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq SCTP_UNUSED, struct sctp_stream_queue_pending *sp,
|
struct sctp_stream_out *strq SCTP_UNUSED, struct sctp_stream_queue_pending *sp)
|
||||||
int holds_lock)
|
|
||||||
{
|
{
|
||||||
if (holds_lock == 0) {
|
SCTP_TCB_SEND_LOCK_ASSERT(stcb);
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
|
||||||
}
|
|
||||||
if (sp && (sp->ss_next.tqe_next == NULL) &&
|
if (sp && (sp->ss_next.tqe_next == NULL) &&
|
||||||
(sp->ss_next.tqe_prev == NULL)) {
|
(sp->ss_next.tqe_prev == NULL)) {
|
||||||
TAILQ_INSERT_TAIL(&asoc->ss_data.out.list, sp, ss_next);
|
TAILQ_INSERT_TAIL(&asoc->ss_data.out.list, sp, ss_next);
|
||||||
}
|
}
|
||||||
if (holds_lock == 0) {
|
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -875,12 +811,10 @@ sctp_ss_fcfs_is_empty(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_fcfs_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_fcfs_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq SCTP_UNUSED, struct sctp_stream_queue_pending *sp,
|
struct sctp_stream_out *strq SCTP_UNUSED, struct sctp_stream_queue_pending *sp)
|
||||||
int holds_lock)
|
|
||||||
{
|
{
|
||||||
if (holds_lock == 0) {
|
SCTP_TCB_SEND_LOCK_ASSERT(stcb);
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
|
||||||
}
|
|
||||||
if (sp &&
|
if (sp &&
|
||||||
((sp->ss_next.tqe_next != NULL) ||
|
((sp->ss_next.tqe_next != NULL) ||
|
||||||
(sp->ss_next.tqe_prev != NULL))) {
|
(sp->ss_next.tqe_prev != NULL))) {
|
||||||
@ -888,9 +822,6 @@ sctp_ss_fcfs_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
sp->ss_next.tqe_next = NULL;
|
sp->ss_next.tqe_next = NULL;
|
||||||
sp->ss_next.tqe_prev = NULL;
|
sp->ss_next.tqe_prev = NULL;
|
||||||
}
|
}
|
||||||
if (holds_lock == 0) {
|
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -729,16 +729,15 @@ struct sctp_cc_functions {
|
|||||||
* for stream scheduling.
|
* for stream scheduling.
|
||||||
*/
|
*/
|
||||||
struct sctp_ss_functions {
|
struct sctp_ss_functions {
|
||||||
void (*sctp_ss_init) (struct sctp_tcb *stcb, struct sctp_association *asoc,
|
void (*sctp_ss_init) (struct sctp_tcb *stcb, struct sctp_association *asoc);
|
||||||
int holds_lock);
|
|
||||||
void (*sctp_ss_clear) (struct sctp_tcb *stcb, struct sctp_association *asoc,
|
void (*sctp_ss_clear) (struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
int clear_values, int holds_lock);
|
int clear_values);
|
||||||
void (*sctp_ss_init_stream) (struct sctp_tcb *stcb, struct sctp_stream_out *strq, struct sctp_stream_out *with_strq);
|
void (*sctp_ss_init_stream) (struct sctp_tcb *stcb, struct sctp_stream_out *strq, struct sctp_stream_out *with_strq);
|
||||||
void (*sctp_ss_add_to_stream) (struct sctp_tcb *stcb, struct sctp_association *asoc,
|
void (*sctp_ss_add_to_stream) (struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp, int holds_lock);
|
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp);
|
||||||
int (*sctp_ss_is_empty) (struct sctp_tcb *stcb, struct sctp_association *asoc);
|
int (*sctp_ss_is_empty) (struct sctp_tcb *stcb, struct sctp_association *asoc);
|
||||||
void (*sctp_ss_remove_from_stream) (struct sctp_tcb *stcb, struct sctp_association *asoc,
|
void (*sctp_ss_remove_from_stream) (struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp, int holds_lock);
|
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp);
|
||||||
struct sctp_stream_out *(*sctp_ss_select_stream) (struct sctp_tcb *stcb,
|
struct sctp_stream_out *(*sctp_ss_select_stream) (struct sctp_tcb *stcb,
|
||||||
struct sctp_nets *net, struct sctp_association *asoc);
|
struct sctp_nets *net, struct sctp_association *asoc);
|
||||||
void (*sctp_ss_scheduled) (struct sctp_tcb *stcb, struct sctp_nets *net,
|
void (*sctp_ss_scheduled) (struct sctp_tcb *stcb, struct sctp_nets *net,
|
||||||
|
@ -1364,7 +1364,7 @@ sctp_audit_stream_queues_for_size(struct sctp_inpcb *inp, struct sctp_tcb *stcb)
|
|||||||
}
|
}
|
||||||
if (stcb->asoc.ss_functions.sctp_ss_is_empty(stcb, &stcb->asoc)) {
|
if (stcb->asoc.ss_functions.sctp_ss_is_empty(stcb, &stcb->asoc)) {
|
||||||
/* No stream scheduler information, initialize scheduler */
|
/* No stream scheduler information, initialize scheduler */
|
||||||
stcb->asoc.ss_functions.sctp_ss_init(stcb, &stcb->asoc, 1);
|
stcb->asoc.ss_functions.sctp_ss_init(stcb, &stcb->asoc);
|
||||||
if (!stcb->asoc.ss_functions.sctp_ss_is_empty(stcb, &stcb->asoc)) {
|
if (!stcb->asoc.ss_functions.sctp_ss_is_empty(stcb, &stcb->asoc)) {
|
||||||
/* yep, we lost a stream or two */
|
/* yep, we lost a stream or two */
|
||||||
SCTP_PRINTF("Found additional streams NOT managed by scheduler, corrected\n");
|
SCTP_PRINTF("Found additional streams NOT managed by scheduler, corrected\n");
|
||||||
|
@ -4043,10 +4043,10 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
|
|||||||
SCTP_FIND_STCB(inp, stcb, av->assoc_id);
|
SCTP_FIND_STCB(inp, stcb, av->assoc_id);
|
||||||
if (stcb) {
|
if (stcb) {
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
SCTP_TCB_SEND_LOCK(stcb);
|
||||||
stcb->asoc.ss_functions.sctp_ss_clear(stcb, &stcb->asoc, 1, 1);
|
stcb->asoc.ss_functions.sctp_ss_clear(stcb, &stcb->asoc, 1);
|
||||||
stcb->asoc.ss_functions = sctp_ss_functions[av->assoc_value];
|
stcb->asoc.ss_functions = sctp_ss_functions[av->assoc_value];
|
||||||
stcb->asoc.stream_scheduling_module = av->assoc_value;
|
stcb->asoc.stream_scheduling_module = av->assoc_value;
|
||||||
stcb->asoc.ss_functions.sctp_ss_init(stcb, &stcb->asoc, 1);
|
stcb->asoc.ss_functions.sctp_ss_init(stcb, &stcb->asoc);
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
SCTP_TCB_SEND_UNLOCK(stcb);
|
||||||
SCTP_TCB_UNLOCK(stcb);
|
SCTP_TCB_UNLOCK(stcb);
|
||||||
} else {
|
} else {
|
||||||
@ -4066,10 +4066,10 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
|
|||||||
LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) {
|
LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) {
|
||||||
SCTP_TCB_LOCK(stcb);
|
SCTP_TCB_LOCK(stcb);
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
SCTP_TCB_SEND_LOCK(stcb);
|
||||||
stcb->asoc.ss_functions.sctp_ss_clear(stcb, &stcb->asoc, 1, 1);
|
stcb->asoc.ss_functions.sctp_ss_clear(stcb, &stcb->asoc, 1);
|
||||||
stcb->asoc.ss_functions = sctp_ss_functions[av->assoc_value];
|
stcb->asoc.ss_functions = sctp_ss_functions[av->assoc_value];
|
||||||
stcb->asoc.stream_scheduling_module = av->assoc_value;
|
stcb->asoc.stream_scheduling_module = av->assoc_value;
|
||||||
stcb->asoc.ss_functions.sctp_ss_init(stcb, &stcb->asoc, 1);
|
stcb->asoc.ss_functions.sctp_ss_init(stcb, &stcb->asoc);
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
SCTP_TCB_SEND_UNLOCK(stcb);
|
||||||
SCTP_TCB_UNLOCK(stcb);
|
SCTP_TCB_UNLOCK(stcb);
|
||||||
}
|
}
|
||||||
|
@ -1316,7 +1316,7 @@ sctp_init_asoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
|||||||
asoc->strmout[i].last_msg_incomplete = 0;
|
asoc->strmout[i].last_msg_incomplete = 0;
|
||||||
asoc->strmout[i].state = SCTP_STREAM_OPENING;
|
asoc->strmout[i].state = SCTP_STREAM_OPENING;
|
||||||
}
|
}
|
||||||
asoc->ss_functions.sctp_ss_init(stcb, asoc, 1);
|
asoc->ss_functions.sctp_ss_init(stcb, asoc);
|
||||||
SCTP_TCB_SEND_UNLOCK(stcb);
|
SCTP_TCB_SEND_UNLOCK(stcb);
|
||||||
|
|
||||||
/* Now the mapping array */
|
/* Now the mapping array */
|
||||||
@ -4325,7 +4325,7 @@ sctp_report_all_outbound(struct sctp_tcb *stcb, uint16_t error, int so_locked)
|
|||||||
TAILQ_FOREACH_SAFE(sp, &outs->outqueue, next, nsp) {
|
TAILQ_FOREACH_SAFE(sp, &outs->outqueue, next, nsp) {
|
||||||
atomic_subtract_int(&asoc->stream_queue_cnt, 1);
|
atomic_subtract_int(&asoc->stream_queue_cnt, 1);
|
||||||
TAILQ_REMOVE(&outs->outqueue, sp, next);
|
TAILQ_REMOVE(&outs->outqueue, sp, next);
|
||||||
stcb->asoc.ss_functions.sctp_ss_remove_from_stream(stcb, asoc, outs, sp, 1);
|
stcb->asoc.ss_functions.sctp_ss_remove_from_stream(stcb, asoc, outs, sp);
|
||||||
sctp_free_spbufspace(stcb, asoc, sp);
|
sctp_free_spbufspace(stcb, asoc, sp);
|
||||||
if (sp->data) {
|
if (sp->data) {
|
||||||
sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, stcb,
|
sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, stcb,
|
||||||
|
Loading…
Reference in New Issue
Block a user