diff options
author | rrs <rrs@FreeBSD.org> | 2007-09-13 14:43:54 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2007-09-13 14:43:54 +0000 |
commit | 6368c8b6996760fbbbf5a02a3334bbf98d9d074f (patch) | |
tree | 1bf870312924584217762bb4c4c0f3cd5ec65aab /sys/netinet/sctputil.c | |
parent | 73fcd49c8635599cba72011c539ea9f781c1da23 (diff) | |
download | FreeBSD-src-6368c8b6996760fbbbf5a02a3334bbf98d9d074f.zip FreeBSD-src-6368c8b6996760fbbbf5a02a3334bbf98d9d074f.tar.gz |
- DF bit was on for COOKIE-ECHO chunks. This is
incorrect and should be OFF letting IP fragment
large cookie-echos.
- Rename sysctl variable logging to log_level.
- Fix description of sysctl variable stats.
- Add sysctl variable log to make sctp_log readable via sysctl
mechanism (this is by compile switch and targets non KTR platforms or
when someone wants to do performance wise tracing).
- Removed debug code
Approved by: re@freebsd.org (B Mah)
Diffstat (limited to 'sys/netinet/sctputil.c')
-rw-r--r-- | sys/netinet/sctputil.c | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 8b4d47b..6c17576 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -6459,40 +6459,30 @@ sctp_local_addr_count(struct sctp_tcb *stcb) #if defined(SCTP_LOCAL_TRACE_BUF) -struct sctp_dump_log { - u_int64_t timestamp; - const char *descr; - uint32_t subsys; - uint32_t params[SCTP_TRACE_PARAMS]; -}; -int sctp_log_index = 0; -struct sctp_dump_log sctp_log[SCTP_MAX_LOGGING_SIZE]; - void -sctp_log_trace(uint32_t subsys, const char *str, uint32_t a, uint32_t b, uint32_t c, uint32_t d, uint32_t e, uint32_t f) +sctp_log_trace(uint32_t subsys, const char *str SCTP_UNUSED, uint32_t a, uint32_t b, uint32_t c, uint32_t d, uint32_t e, uint32_t f) { - int saveindex, newindex; + uint32_t saveindex, newindex; do { - saveindex = sctp_log_index; + saveindex = sctp_log.index; if (saveindex >= SCTP_MAX_LOGGING_SIZE) { newindex = 1; } else { newindex = saveindex + 1; } - } while (atomic_cmpset_int(&sctp_log_index, saveindex, newindex) == 0); + } while (atomic_cmpset_int(&sctp_log.index, saveindex, newindex) == 0); if (saveindex >= SCTP_MAX_LOGGING_SIZE) { saveindex = 0; } - sctp_log[saveindex].timestamp = SCTP_GET_CYCLECOUNT; - sctp_log[saveindex].subsys = subsys; - sctp_log[saveindex].descr = str; - sctp_log[saveindex].params[0] = a; - sctp_log[saveindex].params[1] = b; - sctp_log[saveindex].params[2] = c; - sctp_log[saveindex].params[3] = d; - sctp_log[saveindex].params[4] = e; - sctp_log[saveindex].params[5] = f; + sctp_log.entry[saveindex].timestamp = SCTP_GET_CYCLECOUNT; + sctp_log.entry[saveindex].subsys = subsys; + sctp_log.entry[saveindex].params[0] = a; + sctp_log.entry[saveindex].params[1] = b; + sctp_log.entry[saveindex].params[2] = c; + sctp_log.entry[saveindex].params[3] = d; + sctp_log.entry[saveindex].params[4] = e; + sctp_log.entry[saveindex].params[5] = f; } #endif |