diff options
author | rrs <rrs@FreeBSD.org> | 2007-04-19 11:28:43 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2007-04-19 11:28:43 +0000 |
commit | e8a77bd9270dfbfa30aa44607f5f3ecb4e70ee3e (patch) | |
tree | d950582b945c3e6f66e506197c41a7fa14d07c72 /sys/netinet/sctputil.c | |
parent | 19613c2bfe0ba59b977ac06457e84b93cceb5045 (diff) | |
download | FreeBSD-src-e8a77bd9270dfbfa30aa44607f5f3ecb4e70ee3e.zip FreeBSD-src-e8a77bd9270dfbfa30aa44607f5f3ecb4e70ee3e.tar.gz |
- More work on making send lock contention.
- Removed free-oqueue cache.
- Fix counter for sq entries
- Increased the amount of information retained
on ASOC_TSN logging on the association.
- Made it so with the ASOC_TSN logging on
sending or recieving an abort we dump the log.
- Went through and added invariant's around some
panic's that needed them.
- decrements went to atomic_subtact_int instead of add -1
- Removed residual count increment that threw off a
strm oq count.
- Tracks and complaints if we don't have a LAST fragment and
clean up the sp structure.
- Track a new stat that counts number of abandoned msgs that
happen if you close without reading.
- Fix lookup of frag point to be aware of a 0 assoc-id.
Reviewed by: gnn
Diffstat (limited to 'sys/netinet/sctputil.c')
-rw-r--r-- | sys/netinet/sctputil.c | 65 |
1 files changed, 64 insertions, 1 deletions
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 54aef9f..c94b2d4 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -1085,7 +1085,6 @@ sctp_init_asoc(struct sctp_inpcb *m, struct sctp_association *asoc, memset(asoc->mapping_array, 0, asoc->mapping_array_size); /* Now the init of the other outqueues */ TAILQ_INIT(&asoc->free_chunks); - TAILQ_INIT(&asoc->free_strmoq); TAILQ_INIT(&asoc->out_wheel); TAILQ_INIT(&asoc->control_send_queue); TAILQ_INIT(&asoc->send_queue); @@ -3494,6 +3493,67 @@ sctp_abort_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb, } } +#ifdef SCTP_ASOCLOG_OF_TSNS +void +sctp_print_out_track_log(struct sctp_tcb *stcb) +{ + int i; + + printf("Last ep reason:%x\n", stcb->sctp_ep->last_abort_code); + printf("IN bound TSN log-aaa\n"); + if ((stcb->asoc.tsn_in_at == 0) && (stcb->asoc.tsn_in_wrapped == 0)) { + printf("None rcvd\n"); + goto none_in; + } + if (stcb->asoc.tsn_in_wrapped) { + for (i = stcb->asoc.tsn_in_at; i < SCTP_TSN_LOG_SIZE; i++) { + printf("TSN:%x strm:%d seq:%d flags:%x sz:%d\n", + stcb->asoc.in_tsnlog[i].tsn, + stcb->asoc.in_tsnlog[i].strm, + stcb->asoc.in_tsnlog[i].seq, + stcb->asoc.in_tsnlog[i].flgs, + stcb->asoc.in_tsnlog[i].sz); + } + } + if (stcb->asoc.tsn_in_at) { + for (i = 0; i < stcb->asoc.tsn_in_at; i++) { + printf("TSN:%x strm:%d seq:%d flags:%x sz:%d\n", + stcb->asoc.in_tsnlog[i].tsn, + stcb->asoc.in_tsnlog[i].strm, + stcb->asoc.in_tsnlog[i].seq, + stcb->asoc.in_tsnlog[i].flgs, + stcb->asoc.in_tsnlog[i].sz); + } + } +none_in: + printf("OUT bound TSN log-aaa\n"); + if ((stcb->asoc.tsn_out_at == 0) && (stcb->asoc.tsn_out_wrapped == 0)) { + printf("None sent\n"); + } + if (stcb->asoc.tsn_out_wrapped) { + for (i = stcb->asoc.tsn_out_at; i < SCTP_TSN_LOG_SIZE; i++) { + printf("TSN:%x strm:%d seq:%d flags:%x sz:%d\n", + stcb->asoc.out_tsnlog[i].tsn, + stcb->asoc.out_tsnlog[i].strm, + stcb->asoc.out_tsnlog[i].seq, + stcb->asoc.out_tsnlog[i].flgs, + stcb->asoc.out_tsnlog[i].sz); + } + } + if (stcb->asoc.tsn_out_at) { + for (i = 0; i < stcb->asoc.tsn_out_at; i++) { + printf("TSN:%x strm:%d seq:%d flags:%x sz:%d\n", + stcb->asoc.out_tsnlog[i].tsn, + stcb->asoc.out_tsnlog[i].strm, + stcb->asoc.out_tsnlog[i].seq, + stcb->asoc.out_tsnlog[i].flgs, + stcb->asoc.out_tsnlog[i].sz); + } + } +} + +#endif + void sctp_abort_an_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int error, struct mbuf *op_err) @@ -3521,6 +3581,9 @@ sctp_abort_an_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb, SCTP_STAT_DECR_GAUGE32(sctps_currestab); } /* now free the asoc */ +#ifdef SCTP_ASOCLOG_OF_TSNS + sctp_print_out_track_log(stcb); +#endif sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_5); } |