From 779a64139d75af3ba91f85e989d6547871f5c86b Mon Sep 17 00:00:00 2001 From: pfg Date: Mon, 2 May 2016 20:56:11 +0000 Subject: [PATCH] netinet/sctp*: minor spelling fixes in comments. No functional change. Reviewed by: tuexen --- sys/netinet/sctp_bsd_addr.c | 2 +- sys/netinet/sctp_cc_functions.c | 14 +++++++------- sys/netinet/sctp_constants.h | 8 ++++---- sys/netinet/sctp_indata.c | 14 +++++++------- sys/netinet/sctp_input.c | 8 ++++---- sys/netinet/sctp_lock_bsd.h | 2 +- sys/netinet/sctp_output.c | 22 +++++++++++----------- sys/netinet/sctp_pcb.c | 6 +++--- sys/netinet/sctp_pcb.h | 4 ++-- sys/netinet/sctp_structs.h | 2 +- sys/netinet/sctp_timer.c | 8 ++++---- sys/netinet/sctputil.c | 2 +- 12 files changed, 46 insertions(+), 46 deletions(-) diff --git a/sys/netinet/sctp_bsd_addr.c b/sys/netinet/sctp_bsd_addr.c index af76c5480f1..deb73e7f4d6 100644 --- a/sys/netinet/sctp_bsd_addr.c +++ b/sys/netinet/sctp_bsd_addr.c @@ -298,7 +298,7 @@ sctp_addr_change(struct ifaddr *ifa, int cmd) } /* * BSD only has one VRF, if this changes we will need to hook in the - * right things here to get the id to pass to the address managment + * right things here to get the id to pass to the address management * routine. */ if (SCTP_BASE_VAR(first_time) == 0) { diff --git a/sys/netinet/sctp_cc_functions.c b/sys/netinet/sctp_cc_functions.c index 0ad3e33cee4..d5500602942 100644 --- a/sys/netinet/sctp_cc_functions.c +++ b/sys/netinet/sctp_cc_functions.c @@ -242,7 +242,7 @@ sctp_cwnd_update_after_fr(struct sctp_tcb *stcb, } /* Defines for instantaneous bw decisions */ -#define SCTP_INST_LOOSING 1 /* Loosing to other flows */ +#define SCTP_INST_LOOSING 1 /* Losing to other flows */ #define SCTP_INST_NEUTRAL 2 /* Neutral, no indication */ #define SCTP_INST_GAINING 3 /* Gaining, step down possible */ @@ -563,7 +563,7 @@ cc_bw_increase(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw, uint6 return (0); } -/* RTCC Algoritm to limit growth of cwnd, return +/* RTCC Algorithm to limit growth of cwnd, return * true if you want to NOT allow cwnd growth */ static int @@ -1110,7 +1110,7 @@ sctp_cwnd_update_after_ecn_echo_common(struct sctp_tcb *stcb, struct sctp_nets * } else { /* * Further tuning down required over the drastic - * orginal cut + * original cut */ net->ssthresh -= (net->mtu * num_pkt_lost); net->cwnd -= (net->mtu * num_pkt_lost); @@ -1290,7 +1290,7 @@ sctp_cwnd_update_after_sack(struct sctp_tcb *stcb, struct sctp_association *asoc, int accum_moved, int reneged_all, int will_exit) { - /* Passing a zero argument in last disables the rtcc algoritm */ + /* Passing a zero argument in last disables the rtcc algorithm */ sctp_cwnd_update_after_sack_common(stcb, asoc, accum_moved, reneged_all, will_exit, 0); } @@ -1298,13 +1298,13 @@ static void sctp_cwnd_update_after_ecn_echo(struct sctp_tcb *stcb, struct sctp_nets *net, int in_window, int num_pkt_lost) { - /* Passing a zero argument in last disables the rtcc algoritm */ + /* Passing a zero argument in last disables the rtcc algorithm */ sctp_cwnd_update_after_ecn_echo_common(stcb, net, in_window, num_pkt_lost, 0); } /* Here starts the RTCCVAR type CC invented by RRS which * is a slight mod to RFC2581. We reuse a common routine or - * two since these algoritms are so close and need to + * two since these algorithms are so close and need to * remain the same. */ static void @@ -1510,7 +1510,7 @@ sctp_cwnd_update_rtcc_after_sack(struct sctp_tcb *stcb, struct sctp_association *asoc, int accum_moved, int reneged_all, int will_exit) { - /* Passing a one argument at the last enables the rtcc algoritm */ + /* Passing a one argument at the last enables the rtcc algorithm */ sctp_cwnd_update_after_sack_common(stcb, asoc, accum_moved, reneged_all, will_exit, 1); } diff --git a/sys/netinet/sctp_constants.h b/sys/netinet/sctp_constants.h index 6c1a01437c7..a58c2060b2e 100644 --- a/sys/netinet/sctp_constants.h +++ b/sys/netinet/sctp_constants.h @@ -275,7 +275,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_DEFAULT_MULTIPLE_ASCONFS 0 /* - * Theshold for rwnd updates, we have to read (sb_hiwat >> + * Threshold for rwnd updates, we have to read (sb_hiwat >> * SCTP_RWND_HIWAT_SHIFT) before we will look to see if we need to send a * window update sack. When we look, we compare the last rwnd we sent vs the * current rwnd. It too must be greater than this value. Using 3 divdes the @@ -513,7 +513,7 @@ __FBSDID("$FreeBSD$"); /* Maximum the mapping array will grow to (TSN mapping array) */ #define SCTP_MAPPING_ARRAY 512 -/* size of the inital malloc on the mapping array */ +/* size of the initial malloc on the mapping array */ #define SCTP_INITIAL_MAPPING_ARRAY 16 /* how much we grow the mapping array each call */ #define SCTP_MAPPING_ARRAY_INCR 32 @@ -638,7 +638,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_DEF_PMTU_RAISE_SEC 600 /* 10 min between raise attempts */ -/* How many streams I request initally by default */ +/* How many streams I request initially by default */ #define SCTP_OSTREAM_INITIAL 10 #define SCTP_ISTREAM_INITIAL 2048 @@ -921,7 +921,7 @@ __FBSDID("$FreeBSD$"); * element. Each entry will take 2 4 byte ints (and of course the overhead * of the next pointer as well). Using 15 as an example will yield * ((8 * * 15) + 8) or 128 bytes of overhead for each timewait block that gets - * initialized. Increasing it to 31 would yeild 256 bytes per block. + * initialized. Increasing it to 31 would yield 256 bytes per block. */ #define SCTP_NUMBER_IN_VTAG_BLOCK 15 /* diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c index a6433585538..d6f582a35a9 100644 --- a/sys/netinet/sctp_indata.c +++ b/sys/netinet/sctp_indata.c @@ -481,7 +481,7 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb, * FIX-ME maybe? What happens when the ssn wraps? If we are getting * all the data in one stream this could happen quite rapidly. One * could use the TSN to keep track of things, but this scheme breaks - * down in the other type of stream useage that could occur. Send a + * down in the other type of stream usage that could occur. Send a * single msg to stream 0, send 4Billion messages to stream 1, now * send a message to stream 0. You have a situation where the TSN * has wrapped but not in the stream. Is this worth worrying about @@ -1343,7 +1343,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc, * For IDATA we always check since we know * that the first fragment is 0. For old * DATA we have to receive the first before - * we knwo the first FSN (which is the TSN). + * we know the first FSN (which is the TSN). */ if (SCTP_TSN_GE(control->fsn_included, chk->rec.data.fsn_num)) { /* @@ -1372,7 +1372,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc, * For IDATA we always check since we know * that the first fragment is 0. For old * DATA we have to receive the first before - * we knwo the first FSN (which is the TSN). + * we know the first FSN (which is the TSN). */ if (SCTP_TSN_GE(control->fsn_included, chk->rec.data.fsn_num)) { @@ -2227,7 +2227,7 @@ sctp_slide_mapping_arrays(struct sctp_tcb *stcb) * 1) Did we move the cum-ack point? * * When you first glance at this you might think that all entries that - * make up the postion of the cum-ack would be in the nr-mapping + * make up the position of the cum-ack would be in the nr-mapping * array only.. i.e. things up to the cum-ack are always * deliverable. Thats true with one exception, when its a fragmented * message we may not deliver the data until some threshold (or all @@ -2534,7 +2534,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length, /* copy the length and free up the old */ SCTP_BUF_LEN(m) = SCTP_BUF_LEN((*mm)); sctp_m_freem(*mm); - /* sucess, back copy */ + /* success, back copy */ *mm = m; } else { /* We are in trouble in the mbuf world .. yikes */ @@ -3651,7 +3651,7 @@ static int sctp_fs_audit(struct sctp_association *asoc) { struct sctp_tmit_chunk *chk; - int inflight = 0, resend = 0, inbetween = 0, acked = 0, above = 0; + int inflight = 0, resend = 0, between = 0, acked = 0, above = 0; int ret; #ifndef INVARIANTS @@ -4694,7 +4694,7 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup, } if (TAILQ_EMPTY(&asoc->sent_queue) && (asoc->total_flight > 0)) { #ifdef INVARIANTS - panic("Warning flight size is postive and should be 0"); + panic("Warning flight size is positive and should be 0"); #else SCTP_PRINTF("Warning flight size incorrect should be 0 is %d\n", asoc->total_flight); diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 56fde01e237..1fff331606a 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -616,7 +616,7 @@ sctp_handle_heartbeat_ack(struct sctp_heartbeat_chunk *cp, if (f_net != r_net) { /* * first one on the list is NOT the primary - * sctp_cmpaddr() is much more efficent if + * sctp_cmpaddr() is much more efficient if * the primary is the first on the list, * make it so. */ @@ -1082,7 +1082,7 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp SCTP_UNUSED, /* * Skip past the param header and then we will find the chunk that caused the - * problem. There are two possiblities ASCONF or FWD-TSN other than that and + * problem. There are two possibilities ASCONF or FWD-TSN other than that and * our peer must be broken. */ static void @@ -1256,7 +1256,7 @@ sctp_handle_error(struct sctp_chunkhdr *ch, * (or IPv4 for that matter) it does not matter. If * they don't support that type of address, they can * NOT possibly get that packet type... i.e. with no - * IPv6 you can't recieve a IPv6 packet. so we can + * IPv6 you can't receive a IPv6 packet. so we can * safely ignore this one. If we ever added support * for HOSTNAME Addresses, then we would need to do * something here. @@ -4470,7 +4470,7 @@ sctp_handle_packet_dropped(struct sctp_pktdrop_chunk *cp, (stcb->asoc.sat_t3_loss_recovery == 0) && (stcb->asoc.sat_network)) { /* - * This is debateable but for sat networks it makes sense + * This is debatable but for sat networks it makes sense * Note if a T3 timer has went off, we will prohibit any * changes to cwnd until we exit the t3 loss recovery. */ diff --git a/sys/netinet/sctp_lock_bsd.h b/sys/netinet/sctp_lock_bsd.h index 35cdf5f802f..96e35214594 100644 --- a/sys/netinet/sctp_lock_bsd.h +++ b/sys/netinet/sctp_lock_bsd.h @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); * Most other locks (INP and INFO) attempt to localize the locking i.e. we try * to contain the lock and unlock within the function that needs to lock it. * This sometimes mean we do extra locks and unlocks and lose a bit of - * efficency, but if the performance statements about non-recursive locks are + * efficiency, but if the performance statements about non-recursive locks are * true this should not be a problem. One issue that arises with this only * lock when needed is that if an implicit association setup is done we have * a problem. If at the time I lookup an association I have NULL in the tcb diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index e1d0be0b94c..85ec06536dd 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -3071,7 +3071,7 @@ sctp_choose_boundall(struct sctp_inpcb *inp, ifn, num_preferred); if (num_preferred == 0) { /* None on this interface. */ - SCTPDBG(SCTP_DEBUG_OUTPUT2, "No prefered -- skipping to next\n"); + SCTPDBG(SCTP_DEBUG_OUTPUT2, "No preferred -- skipping to next\n"); continue; } SCTPDBG(SCTP_DEBUG_OUTPUT2, @@ -3156,7 +3156,7 @@ sctp_choose_boundall(struct sctp_inpcb *inp, * It is restricted for some reason.. * probably not yet added. */ - SCTPDBG(SCTP_DEBUG_OUTPUT2, "Its resticted\n"); + SCTPDBG(SCTP_DEBUG_OUTPUT2, "Its restricted\n"); sifa = NULL; continue; } @@ -5390,7 +5390,7 @@ sctp_are_there_new_addresses(struct sctp_association *asoc, } } if (fnd == 0) { - /* New address added! no need to look futher. */ + /* New address added! no need to look further. */ return (1); } } @@ -5631,7 +5631,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb, stc.peerport = sh->src_port; /* - * If we wanted to honor cookie life extentions, we would add to + * If we wanted to honor cookie life extensions, we would add to * stc.cookie_life. For now we should NOT honor any extension */ stc.site_scope = stc.local_scope = stc.loopback_scope = 0; @@ -6206,7 +6206,7 @@ sctp_prune_prsctp(struct sctp_tcb *stcb, return; } } /* if chunk was present */ - } /* if of sufficent priority */ + } /* if of sufficient priority */ } /* if chunk has enabled */ } /* tailqforeach */ @@ -6564,7 +6564,7 @@ sctp_copy_mbufchain(struct mbuf *clonechain, } } /* - * save off the end and update the end-chain postion + * save off the end and update the end-chain position */ m = appendchain; while (m) { @@ -6576,7 +6576,7 @@ sctp_copy_mbufchain(struct mbuf *clonechain, } return (outchain); } else { - /* save off the end and update the end-chain postion */ + /* save off the end and update the end-chain position */ m = appendchain; while (m) { if (SCTP_BUF_NEXT(m) == NULL) { @@ -6810,7 +6810,7 @@ sctp_sendall_completes(void *ptr, uint32_t val SCTP_UNUSED) /* * Do a notify here? Kacheong suggests that the notify be done at * the send time.. so you would push up a notification if any send - * failed. Don't know if this is feasable since the only failures we + * failed. Don't know if this is feasible since the only failures we * have is "memory" related and if you cannot get an mbuf to send * the data you surely can't get an mbuf to send up to notify the * user you can't send the data :-> @@ -7468,7 +7468,7 @@ sctp_move_to_outqueue(struct sctp_tcb *stcb, chk->copy_by_ref = 0; } /* - * get last_mbuf and counts of mb useage This is ugly but hopefully + * get last_mbuf and counts of mb usage This is ugly but hopefully * its only one mbuf. */ if (chk->last_mbuf == NULL) { @@ -9537,7 +9537,7 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp, cnt_thru = 0; /* do we have control chunks to retransmit? */ if (m != NULL) { - /* Start a timer no matter if we suceed or fail */ + /* Start a timer no matter if we succeed or fail */ if (chk->rec.chunk_id.id == SCTP_COOKIE_ECHO) { sctp_timer_start(SCTP_TIMER_TYPE_COOKIE, inp, stcb, chk->whoTo); } else if (chk->rec.chunk_id.id == SCTP_ASCONF) @@ -9802,7 +9802,7 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp, /* Is there something to send for this destination? */ if (m) { /* - * No matter if we fail/or suceed we should start a + * No matter if we fail/or succeed we should start a * timer. A failure is like a lost IP packet :-) */ if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 0849bf6c50b..704e5d91204 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -330,7 +330,7 @@ sctp_mark_ifa_addr_down(uint32_t vrf_id, struct sockaddr *addr, goto out; } if (sctp_ifap->ifn_p == NULL) { - SCTPDBG(SCTP_DEBUG_PCB4, "IFA has no IFN - can't mark unuseable\n"); + SCTPDBG(SCTP_DEBUG_PCB4, "IFA has no IFN - can't mark unusable\n"); goto out; } if (if_name) { @@ -374,7 +374,7 @@ sctp_mark_ifa_addr_up(uint32_t vrf_id, struct sockaddr *addr, goto out; } if (sctp_ifap->ifn_p == NULL) { - SCTPDBG(SCTP_DEBUG_PCB4, "IFA has no IFN - can't mark unuseable\n"); + SCTPDBG(SCTP_DEBUG_PCB4, "IFA has no IFN - can't mark unusable\n"); goto out; } if (if_name) { @@ -5772,7 +5772,7 @@ sctp_pcb_init() { /* * SCTP initialization for the PCB structures should be called by - * the sctp_init() funciton. + * the sctp_init() function. */ int i; struct timeval tv; diff --git a/sys/netinet/sctp_pcb.h b/sys/netinet/sctp_pcb.h index ad4a6957f8b..98204096e7b 100644 --- a/sys/netinet/sctp_pcb.h +++ b/sys/netinet/sctp_pcb.h @@ -107,7 +107,7 @@ struct sctp_ifa { * that we MUST lock appropriate locks. This * is for V6. */ union sctp_sockstore address; - uint32_t refcount; /* number of folks refering to this */ + uint32_t refcount; /* number of folks referring to this */ uint32_t flags; uint32_t localifa_flags; uint32_t vrf_id; /* vrf_id of this addr (for deleting) */ @@ -360,7 +360,7 @@ struct sctp_pcbtsn_rlog { struct sctp_inpcb { /*- * put an inpcb in front of it all, kind of a waste but we need to - * for compatability with all the other stuff. + * for compatibility with all the other stuff. */ union { struct inpcb inp; diff --git a/sys/netinet/sctp_structs.h b/sys/netinet/sctp_structs.h index 87aa05b92b6..39fc9493787 100644 --- a/sys/netinet/sctp_structs.h +++ b/sys/netinet/sctp_structs.h @@ -971,7 +971,7 @@ struct sctp_association { uint32_t sat_t3_recovery_tsn; uint32_t tsn_last_delivered; /* - * For the pd-api we should re-write this a bit more efficent. We + * For the pd-api we should re-write this a bit more efficient. We * could have multiple sctp_queued_to_read's that we are building at * once. Now we only do this when we get ready to deliver to the * socket buffer. Note that we depend on the fact that the struct is diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c index 9fa37e7fb61..2d29fcbe817 100644 --- a/sys/netinet/sctp_timer.c +++ b/sys/netinet/sctp_timer.c @@ -1076,7 +1076,7 @@ sctp_cookie_timer(struct sctp_inpcb *inp, return (1); } /* - * cleared theshold management now lets backoff the address & select + * cleared threshold management now lets backoff the address & select * an alternate */ stcb->asoc.dropped_special_cnt = 0; @@ -1122,7 +1122,7 @@ sctp_strreset_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, return (1); } /* - * cleared theshold management now lets backoff the address & select + * cleared threshold management now lets backoff the address & select * an alternate */ sctp_backoff_on_timeout(stcb, strrst->whoTo, 1, 0, 0); @@ -1282,7 +1282,7 @@ sctp_shutdown_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, { struct sctp_nets *alt; - /* first threshold managment */ + /* first threshold management */ if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) { /* Assoc is over */ return (1); @@ -1305,7 +1305,7 @@ sctp_shutdownack_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, { struct sctp_nets *alt; - /* first threshold managment */ + /* first threshold management */ if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) { /* Assoc is over */ return (1); diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 254814699ef..b7b2c27580c 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -1616,7 +1616,7 @@ sctp_timeout_handler(void *t) return; } } - /* record in stopped what t-o occured */ + /* record in stopped what t-o occurred */ tmr->stopped_from = type; /* mark as being serviced now */ -- 2.45.2