Cleanup debug output.

This commit is contained in:
Michael Tuexen 2016-04-18 06:58:07 +00:00
parent e187bac213
commit f2ea2a2d5f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298188

View File

@ -507,7 +507,7 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb,
}
if (SCTP_MSGID_GT((!asoc->idata_supported), strm->last_sequence_delivered, control->sinfo_ssn)) {
/* The incoming sseq is behind where we last delivered? */
SCTPDBG(SCTP_DEBUG_INDATA1, "Duplicate S-SEQ:%d delivered:%d from peer, Abort association\n",
SCTPDBG(SCTP_DEBUG_INDATA1, "Duplicate S-SEQ: %u delivered: %u from peer, Abort association\n",
control->sinfo_ssn, strm->last_sequence_delivered);
protocol_error:
/*
@ -571,7 +571,7 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb,
if (control->on_strm_q == SCTP_ON_ORDERED) {
TAILQ_REMOVE(&strm->inqueue, control, next_instrm);
} else {
panic("Huh control:%p is on_strm_q:%d",
panic("Huh control: %p is on_strm_q: %d",
control, control->on_strm_q);
}
control->on_strm_q = 0;
@ -612,7 +612,7 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb,
struct mbuf *oper;
snprintf(msg, sizeof(msg),
"Queue to str mid:%d duplicate",
"Queue to str msg_id: %u duplicate",
control->msg_id);
clean_up_control(stcb, control);
oper = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg);
@ -870,7 +870,7 @@ sctp_inject_old_data_unordered(struct sctp_tcb *stcb, struct sctp_association *a
if (chk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) {
/* Its the very first one. */
SCTPDBG(SCTP_DEBUG_XXX,
"chunk is a first fsn:%d becomes fsn_included\n",
"chunk is a first fsn: %u becomes fsn_included\n",
chk->rec.data.fsn_num);
if (control->first_frag_seen) {
/*
@ -1014,14 +1014,14 @@ sctp_deliver_reasm_check(struct sctp_tcb *stcb, struct sctp_association *asoc, s
return (0);
}
while (control) {
SCTPDBG(SCTP_DEBUG_XXX, "Looking at control:%p e(%d) ssn:%d top_fsn:%d inc_fsn:%d -uo\n",
SCTPDBG(SCTP_DEBUG_XXX, "Looking at control: %p e(%d) ssn: %u top_fsn: %u inc_fsn: %u -uo\n",
control, control->end_added, control->sinfo_ssn, control->top_fsn, control->fsn_included);
nctl = TAILQ_NEXT(control, next_instrm);
if (control->end_added) {
/* We just put the last bit on */
if (control->on_strm_q) {
if (control->on_strm_q != SCTP_ON_UNORDERED) {
panic("Huh control:%p on_q:%d -- not unordered?",
panic("Huh control: %p on_q: %d -- not unordered?",
control, control->on_strm_q);
}
TAILQ_REMOVE(&strm->uno_inqueue, control, next_instrm);
@ -1066,14 +1066,14 @@ sctp_deliver_reasm_check(struct sctp_tcb *stcb, struct sctp_association *asoc, s
*/
nctl = TAILQ_NEXT(control, next_instrm);
SCTPDBG(SCTP_DEBUG_XXX,
"Looking at control:%p e(%d) ssn:%d top_fsn:%d inc_fsn:%d (lastdel:%d)- o\n",
"Looking at control: %p e(%d) ssn: %u top_fsn: %u inc_fsn: %u (lastdel: %u)- o\n",
control, control->end_added, control->sinfo_ssn,
control->top_fsn, control->fsn_included,
strm->last_sequence_delivered);
if (control->end_added) {
if (control->on_strm_q) {
if (control->on_strm_q != SCTP_ON_ORDERED) {
panic("Huh control:%p on_q:%d -- not ordered?",
panic("Huh control: %p on_q: %d -- not ordered?",
control, control->on_strm_q);
}
TAILQ_REMOVE(&strm->inqueue, control, next_instrm);
@ -1103,7 +1103,7 @@ sctp_deliver_reasm_check(struct sctp_tcb *stcb, struct sctp_association *asoc, s
next_to_del = strm->last_sequence_delivered + 1;
if (control) {
SCTPDBG(SCTP_DEBUG_XXX,
"Looking at control:%p e(%d) ssn:%d top_fsn:%d inc_fsn:%d (nxtdel:%d)- o\n",
"Looking at control: %p e(%d) ssn: %u top_fsn: %u inc_fsn: %u (nxtdel: %u)- o\n",
control, control->end_added, control->sinfo_ssn, control->top_fsn, control->fsn_included,
next_to_del);
nctl = TAILQ_NEXT(control, next_instrm);
@ -1114,7 +1114,7 @@ sctp_deliver_reasm_check(struct sctp_tcb *stcb, struct sctp_association *asoc, s
/* We are done with it afterwards */
if (control->on_strm_q) {
if (control->on_strm_q != SCTP_ON_ORDERED) {
panic("Huh control:%p on_q:%d -- not ordered?",
panic("Huh control: %p on_q: %d -- not ordered?",
control, control->on_strm_q);
}
TAILQ_REMOVE(&strm->inqueue, control, next_instrm);
@ -1211,7 +1211,7 @@ sctp_add_chk_to_control(struct sctp_queued_to_read *control,
TAILQ_REMOVE(&strm->inqueue, control, next_instrm);
control->on_strm_q = 0;
} else if (control->on_strm_q) {
panic("Unknown state on ctrl:%p on_strm_q:%d", control,
panic("Unknown state on ctrl: %p on_strm_q: %d", control,
control->on_strm_q);
}
}
@ -1288,7 +1288,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
if (chk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) {
/* Its the very first one. */
SCTPDBG(SCTP_DEBUG_XXX,
"chunk is a first fsn:%d becomes fsn_included\n",
"chunk is a first fsn: %u becomes fsn_included\n",
chk->rec.data.fsn_num);
if (control->first_frag_seen) {
/*
@ -1317,13 +1317,13 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
/* Still willing to raise highest FSN seen */
if (SCTP_TSN_GT(chk->rec.data.fsn_num, control->top_fsn)) {
SCTPDBG(SCTP_DEBUG_XXX,
"We have a new top_fsn:%d\n",
"We have a new top_fsn: %u\n",
chk->rec.data.fsn_num);
control->top_fsn = chk->rec.data.fsn_num;
}
if (chk->rec.data.rcv_flags & SCTP_DATA_LAST_FRAG) {
SCTPDBG(SCTP_DEBUG_XXX,
"The last fsn is now in place fsn:%d\n",
"The last fsn is now in place fsn: %u\n",
chk->rec.data.fsn_num);
control->last_frag_seen = 1;
}
@ -1349,7 +1349,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
if (chk->rec.data.rcv_flags & SCTP_DATA_LAST_FRAG) {
/* Second last? huh? */
SCTPDBG(SCTP_DEBUG_XXX,
"Duplicate last fsn:%d (top:%d) -- abort\n",
"Duplicate last fsn: %u (top: %u) -- abort\n",
chk->rec.data.fsn_num, control->top_fsn);
sctp_abort_in_reasm(stcb, strm, control,
chk, abort_flag,
@ -1370,7 +1370,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
* this so its a dup
*/
SCTPDBG(SCTP_DEBUG_XXX,
"New fsn:%d is already seen in included_fsn:%d -- abort\n",
"New fsn: %u is already seen in included_fsn: %u -- abort\n",
chk->rec.data.fsn_num, control->fsn_included);
sctp_abort_in_reasm(stcb, strm, control, chk,
abort_flag,
@ -1384,7 +1384,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
*/
if (SCTP_TSN_GT(chk->rec.data.fsn_num, control->top_fsn)) {
SCTPDBG(SCTP_DEBUG_XXX,
"New fsn:%d is beyond or at top_fsn:%d -- abort\n",
"New fsn: %u is beyond or at top_fsn: %u -- abort\n",
chk->rec.data.fsn_num,
control->top_fsn);
sctp_abort_in_reasm(stcb, strm, control, chk,
@ -1398,7 +1398,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
* reassembly for this control.
*/
SCTPDBG(SCTP_DEBUG_XXX,
"chunk is a not first fsn:%d needs to be inserted\n",
"chunk is a not first fsn: %u needs to be inserted\n",
chk->rec.data.fsn_num);
TAILQ_FOREACH(at, &control->reasm, sctp_next) {
if (SCTP_TSN_GT(at->rec.data.fsn_num, chk->rec.data.fsn_num)) {
@ -1407,7 +1407,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
* one, insert the new one before at.
*/
SCTPDBG(SCTP_DEBUG_XXX,
"Insert it before fsn:%d\n",
"Insert it before fsn: %u\n",
at->rec.data.fsn_num);
asoc->size_on_reasm_queue += chk->send_size;
sctp_ucount_incr(asoc->cnt_on_reasm_queue);
@ -1428,7 +1428,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
* the chunk!
*/
SCTPDBG(SCTP_DEBUG_XXX,
"Duplicate to fsn:%d -- abort\n",
"Duplicate to fsn: %u -- abort\n",
at->rec.data.fsn_num);
sctp_abort_in_reasm(stcb, strm, control,
chk, abort_flag,
@ -1438,7 +1438,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
}
if (inserted == 0) {
/* Goes on the end */
SCTPDBG(SCTP_DEBUG_XXX, "Inserting at tail of list fsn:%d\n",
SCTPDBG(SCTP_DEBUG_XXX, "Inserting at tail of list fsn: %u\n",
chk->rec.data.fsn_num);
asoc->size_on_reasm_queue += chk->send_size;
sctp_ucount_incr(asoc->cnt_on_reasm_queue);
@ -1460,7 +1460,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
if (at->rec.data.fsn_num == next_fsn) {
/* We can add this one now to the control */
SCTPDBG(SCTP_DEBUG_XXX,
"Adding more to control:%p at:%p fsn:%d next_fsn:%d included:%d\n",
"Adding more to control: %p at: %p fsn: %u next_fsn: %u included: %u\n",
control, at,
at->rec.data.fsn_num,
next_fsn, control->fsn_included);
@ -1745,7 +1745,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
SCTPDBG(SCTP_DEBUG_XXX, "chunk_flags:0x%x look for msg in case we have dup\n",
chunk_flags);
if (find_reasm_entry(strm, msg_id, ordered, old_data)) {
SCTPDBG(SCTP_DEBUG_XXX, "chunk_flags:0x%x dup detected on msg_id:%d\n",
SCTPDBG(SCTP_DEBUG_XXX, "chunk_flags: 0x%x dup detected on msg_id: %u\n",
chunk_flags,
msg_id);
@ -1837,7 +1837,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
(chunk_flags & SCTP_DATA_UNORDERED) == 0 &&
SCTP_MSGID_GE(old_data, asoc->strmin[strmno].last_sequence_delivered, msg_id)) {
/* The incoming sseq is behind where we last delivered? */
SCTPDBG(SCTP_DEBUG_INDATA1, "EVIL/Broken-Dup S-SEQ:%d delivered:%d from peer, Abort!\n",
SCTPDBG(SCTP_DEBUG_INDATA1, "EVIL/Broken-Dup S-SEQ: %u delivered: %u from peer, Abort!\n",
msg_id, asoc->strmin[strmno].last_sequence_delivered);
snprintf(msg, sizeof(msg), "Delivered SSN=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x",
@ -1931,7 +1931,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
}
created_control = 1;
}
SCTPDBG(SCTP_DEBUG_XXX, "chunk_flags:0x%x ordered:%d msgid:%d control:%p\n",
SCTPDBG(SCTP_DEBUG_XXX, "chunk_flags: 0x%x ordered: %d msgid: %u control: %p\n",
chunk_flags, ordered, msg_id, control);
if ((chunk_flags & SCTP_DATA_NOT_FRAG) == SCTP_DATA_NOT_FRAG &&
TAILQ_EMPTY(&asoc->resetHead) &&
@ -1950,7 +1950,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
if (SCTP_TSN_GT(tsn, asoc->highest_tsn_inside_nr_map)) {
asoc->highest_tsn_inside_nr_map = tsn;
}
SCTPDBG(SCTP_DEBUG_XXX, "Injecting control:%p to be read (mid:%d)\n",
SCTPDBG(SCTP_DEBUG_XXX, "Injecting control: %p to be read (msg_id: %u)\n",
control, msg_id);
sctp_add_to_readq(stcb->sctp_ep, stcb,
@ -1993,7 +1993,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
chk->asoc = asoc;
chk->send_size = the_len;
chk->whoTo = net;
SCTPDBG(SCTP_DEBUG_XXX, "Building ck:%p for control:%p to be read (mid:%d)\n",
SCTPDBG(SCTP_DEBUG_XXX, "Building ck: %p for control: %p to be read (msg_id: %u)\n",
chk,
control, msg_id);
atomic_add_int(&net->ref_count, 1);
@ -2058,7 +2058,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
}
if (chunk_flags & SCTP_DATA_UNORDERED) {
/* queue directly into socket buffer */
SCTPDBG(SCTP_DEBUG_XXX, "Unordered data to be read control:%p msg_id:%d\n",
SCTPDBG(SCTP_DEBUG_XXX, "Unordered data to be read control: %p msg_id: %u\n",
control, msg_id);
sctp_mark_non_revokable(asoc, control->sinfo_tsn);
sctp_add_to_readq(stcb->sctp_ep, stcb,
@ -2067,7 +2067,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED);
} else {
SCTPDBG(SCTP_DEBUG_XXX, "Queue control:%p for reordering msg_id:%d\n", control,
SCTPDBG(SCTP_DEBUG_XXX, "Queue control: %p for reordering msg_id: %u\n", control,
msg_id);
sctp_queue_data_to_stream(stcb, strm, asoc, control, abort_flag, &need_reasm_check);
if (*abort_flag) {
@ -2082,7 +2082,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
/* If we reach here its a reassembly */
need_reasm_check = 1;
SCTPDBG(SCTP_DEBUG_XXX,
"Queue data to stream for reasm control:%p msg_id:%d\n",
"Queue data to stream for reasm control: %p msg_id: %u\n",
control, msg_id);
sctp_queue_data_for_reasm(stcb, asoc, strm, control, chk, created_control, abort_flag, tsn);
if (*abort_flag) {
@ -2317,7 +2317,7 @@ sctp_slide_mapping_arrays(struct sctp_tcb *stcb)
#ifdef INVARIANTS
panic("impossible slide");
#else
SCTP_PRINTF("impossible slide lgap:%x slide_end:%x slide_from:%x? at:%d\n",
SCTP_PRINTF("impossible slide lgap: %x slide_end: %x slide_from: %x? at: %d\n",
lgap, slide_end, slide_from, at);
return;
#endif
@ -2326,7 +2326,7 @@ sctp_slide_mapping_arrays(struct sctp_tcb *stcb)
#ifdef INVARIANTS
panic("would overrun buffer");
#else
SCTP_PRINTF("Gak, would have overrun map end:%d slide_end:%d\n",
SCTP_PRINTF("Gak, would have overrun map end: %d slide_end: %d\n",
asoc->mapping_array_size, slide_end);
slide_end = asoc->mapping_array_size;
#endif
@ -3661,7 +3661,7 @@ sctp_fs_audit(struct sctp_association *asoc)
TAILQ_FOREACH(chk, &asoc->sent_queue, sctp_next) {
if (chk->sent < SCTP_DATAGRAM_RESEND) {
SCTP_PRINTF("Chk TSN:%u size:%d inflight cnt:%d\n",
SCTP_PRINTF("Chk TSN: %u size: %d inflight cnt: %d\n",
chk->rec.data.TSN_seq,
chk->send_size,
chk->snd_count);
@ -3681,10 +3681,10 @@ sctp_fs_audit(struct sctp_association *asoc)
#ifdef INVARIANTS
panic("Flight size-express incorrect? \n");
#else
SCTP_PRINTF("asoc->total_flight:%d cnt:%d\n",
SCTP_PRINTF("asoc->total_flight: %d cnt: %d\n",
entry_flight, entry_cnt);
SCTP_PRINTF("Flight size-express incorrect F:%d I:%d R:%d Ab:%d ACK:%d\n",
SCTP_PRINTF("Flight size-express incorrect F: %d I: %d R: %d Ab: %d ACK: %d\n",
inflight, inbetween, resend, above, acked);
ret = 1;
#endif
@ -4378,7 +4378,7 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
SCTP_PRINTF("NEW cum_ack:%x send_s:%x is smaller or equal\n",
cum_ack, send_s);
if (tp1) {
SCTP_PRINTF("Got send_s from tsn:%x + 1 of tp1:%p\n",
SCTP_PRINTF("Got send_s from tsn:%x + 1 of tp1: %p\n",
tp1->rec.data.TSN_seq, (void *)tp1);
}
hopeless_peer:
@ -5168,7 +5168,7 @@ sctp_kick_prsctp_reorder_queue(struct sctp_tcb *stcb,
} else if (ctl->on_strm_q == SCTP_ON_UNORDERED) {
TAILQ_REMOVE(&strmin->uno_inqueue, ctl, next_instrm);
} else {
panic("strmin:%p ctl:%p unknown %d",
panic("strmin: %p ctl: %p unknown %d",
strmin, ctl, ctl->on_strm_q);
}
ctl->on_strm_q = 0;
@ -5231,7 +5231,7 @@ sctp_kick_prsctp_reorder_queue(struct sctp_tcb *stcb,
} else if (ctl->on_strm_q == SCTP_ON_UNORDERED) {
TAILQ_REMOVE(&strmin->uno_inqueue, ctl, next_instrm);
} else {
panic("strmin:%p ctl:%p unknown %d",
panic("strmin: %p ctl: %p unknown %d",
strmin, ctl, ctl->on_strm_q);
}
ctl->on_strm_q = 0;
@ -5494,7 +5494,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb,
} else if (ctl->on_strm_q == SCTP_ON_UNORDERED) {
TAILQ_REMOVE(&strm->uno_inqueue, ctl, next_instrm);
} else if (ctl->on_strm_q) {
panic("strm:%p ctl:%p unknown %d",
panic("strm: %p ctl: %p unknown %d",
strm, ctl, ctl->on_strm_q);
}
ctl->on_strm_q = 0;