svn commit: r310218 - in stable/11/sys: netinet netinet6
Michael Tuexen
tuexen at FreeBSD.org
Sun Dec 18 13:00:13 UTC 2016
Author: tuexen
Date: Sun Dec 18 13:00:11 2016
New Revision: 310218
URL: https://svnweb.freebsd.org/changeset/base/310218
Log:
MFC r309607:
Whitespace changes.
The tools using to generate the sources has been updated and produces
different whitespaces. Commit this seperately to avoid intermixing
these with real code changes.
Modified:
stable/11/sys/netinet/sctp_asconf.c
stable/11/sys/netinet/sctp_asconf.h
stable/11/sys/netinet/sctp_bsd_addr.h
stable/11/sys/netinet/sctp_cc_functions.c
stable/11/sys/netinet/sctp_crc32.c
stable/11/sys/netinet/sctp_crc32.h
stable/11/sys/netinet/sctp_header.h
stable/11/sys/netinet/sctp_indata.c
stable/11/sys/netinet/sctp_input.c
stable/11/sys/netinet/sctp_os_bsd.h
stable/11/sys/netinet/sctp_pcb.h
stable/11/sys/netinet/sctp_peeloff.h
stable/11/sys/netinet/sctp_ss_functions.c
stable/11/sys/netinet/sctp_structs.h
stable/11/sys/netinet/sctp_sysctl.c
stable/11/sys/netinet/sctp_timer.c
stable/11/sys/netinet/sctp_uio.h
stable/11/sys/netinet/sctp_usrreq.c
stable/11/sys/netinet/sctp_var.h
stable/11/sys/netinet/sctputil.c
stable/11/sys/netinet/sctputil.h
stable/11/sys/netinet6/sctp6_usrreq.c
stable/11/sys/netinet6/sctp6_var.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/netinet/sctp_asconf.c
==============================================================================
--- stable/11/sys/netinet/sctp_asconf.c Sun Dec 18 12:56:14 2016 (r310217)
+++ stable/11/sys/netinet/sctp_asconf.c Sun Dec 18 13:00:11 2016 (r310218)
@@ -151,24 +151,19 @@ sctp_process_asconf_add_ip(struct sockad
union sctp_sockstore store;
struct sctp_paramhdr *ph;
uint16_t param_type, aparam_length;
-
#if defined(INET) || defined(INET6)
uint16_t param_length;
-
#endif
struct sockaddr *sa;
int zero_address = 0;
int bad_address = 0;
-
#ifdef INET
struct sockaddr_in *sin;
struct sctp_ipv4addr_param *v4addr;
-
#endif
#ifdef INET6
struct sockaddr_in6 *sin6;
struct sctp_ipv6addr_param *v6addr;
-
#endif
aparam_length = ntohs(aph->ph.param_length);
@@ -306,24 +301,19 @@ sctp_process_asconf_delete_ip(struct soc
union sctp_sockstore store;
struct sctp_paramhdr *ph;
uint16_t param_type, aparam_length;
-
#if defined(INET) || defined(INET6)
uint16_t param_length;
-
#endif
struct sockaddr *sa;
int zero_address = 0;
int result;
-
#ifdef INET
struct sockaddr_in *sin;
struct sctp_ipv4addr_param *v4addr;
-
#endif
#ifdef INET6
struct sockaddr_in6 *sin6;
struct sctp_ipv6addr_param *v6addr;
-
#endif
aparam_length = ntohs(aph->ph.param_length);
@@ -441,23 +431,18 @@ sctp_process_asconf_set_primary(struct s
union sctp_sockstore store;
struct sctp_paramhdr *ph;
uint16_t param_type, aparam_length;
-
#if defined(INET) || defined(INET6)
uint16_t param_length;
-
#endif
struct sockaddr *sa;
int zero_address = 0;
-
#ifdef INET
struct sockaddr_in *sin;
struct sctp_ipv4addr_param *v4addr;
-
#endif
#ifdef INET6
struct sockaddr_in6 *sin6;
struct sctp_ipv6addr_param *v6addr;
-
#endif
aparam_length = ntohs(aph->ph.param_length);
@@ -1785,7 +1770,7 @@ sctp_handle_asconf_ack(struct mbuf *m, i
* if there are any "sent" params still on the queue, these are
* implicitly "success", or "failed" (if we got an error back) ...
* so process these appropriately
- *
+ *
* we assume that the correlation_id's are monotonically increasing
* beginning from 1 and that we don't have *that* many outstanding
* at any given time
@@ -1861,7 +1846,6 @@ sctp_is_scopeid_in_nets(struct sctp_tcb
/* didn't find one */
return (0);
}
-
#endif
/*
@@ -2435,10 +2419,8 @@ sctp_is_addr_pending(struct sctp_tcb *st
}
}
- /*
- * we want to find the sequences which consist of ADD -> DEL -> ADD
- * or DEL -> ADD
- */
+ /* we want to find the sequences which consist of ADD -> DEL -> ADD
+ * or DEL -> ADD */
if (add_cnt > del_cnt ||
(add_cnt == del_cnt && last_param_type == SCTP_ADD_IP_ADDRESS)) {
return (1);
@@ -2490,10 +2472,8 @@ sctp_find_valid_localaddr(struct sctp_tc
if (sctp_is_addr_restricted(stcb, sctp_ifa) &&
(!sctp_is_addr_pending(stcb, sctp_ifa)))
continue;
- /*
- * found a valid local v4 address to
- * use
- */
+ /* found a valid local v4 address to
+ * use */
if (addr_locked == SCTP_ADDR_NOT_LOCKED)
SCTP_IPI_ADDR_RUNLOCK();
return (&sctp_ifa->address.sa);
@@ -2510,10 +2490,8 @@ sctp_find_valid_localaddr(struct sctp_tc
}
sin6 = &sctp_ifa->address.sin6;
if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
- /*
- * we skip unspecifed
- * addresses
- */
+ /* we skip unspecifed
+ * addresses */
continue;
}
if (prison_check_ip6(stcb->sctp_ep->ip_inp.inp.inp_cred,
@@ -2530,10 +2508,8 @@ sctp_find_valid_localaddr(struct sctp_tc
if (sctp_is_addr_restricted(stcb, sctp_ifa) &&
(!sctp_is_addr_pending(stcb, sctp_ifa)))
continue;
- /*
- * found a valid local v6 address to
- * use
- */
+ /* found a valid local v6 address to
+ * use */
if (addr_locked == SCTP_ADDR_NOT_LOCKED)
SCTP_IPI_ADDR_RUNLOCK();
return (&sctp_ifa->address.sa);
@@ -2781,14 +2757,11 @@ sctp_process_initack_addresses(struct sc
uint16_t plen, ptype;
struct sctp_ifa *sctp_ifa;
union sctp_sockstore store;
-
#ifdef INET6
struct sctp_ipv6addr_param addr6_store;
-
#endif
#ifdef INET
struct sctp_ipv4addr_param addr4_store;
-
#endif
SCTPDBG(SCTP_DEBUG_ASCONF2, "processing init-ack addresses\n");
@@ -2915,19 +2888,16 @@ sctp_addr_in_initack(struct mbuf *m, uin
{
struct sctp_paramhdr tmp_param, *ph;
uint16_t plen, ptype;
-
#ifdef INET
struct sockaddr_in *sin;
struct sctp_ipv4addr_param *a4p;
struct sctp_ipv6addr_param addr4_store;
-
#endif
#ifdef INET6
struct sockaddr_in6 *sin6;
struct sctp_ipv6addr_param *a6p;
struct sctp_ipv6addr_param addr6_store;
struct sockaddr_in6 sin6_tmp;
-
#endif
switch (sa->sa_family) {
@@ -3079,14 +3049,11 @@ sctp_check_address_list_all(struct sctp_
struct sctp_ifn *sctp_ifn;
struct sctp_ifa *sctp_ifa;
uint32_t vrf_id;
-
#ifdef INET
struct sockaddr_in *sin;
-
#endif
#ifdef INET6
struct sockaddr_in6 *sin6;
-
#endif
if (stcb) {
@@ -3301,14 +3268,11 @@ sctp_asconf_send_nat_state_update(struct
struct sctp_asconf_addr *aa;
struct sctp_ifa *sctp_ifap;
struct sctp_asconf_tag_param *vtag;
-
#ifdef INET
struct sockaddr_in *to;
-
#endif
#ifdef INET6
struct sockaddr_in6 *to6;
-
#endif
if (net == NULL) {
SCTPDBG(SCTP_DEBUG_ASCONF1, "sctp_asconf_send_nat_state_update: Missing net\n");
Modified: stable/11/sys/netinet/sctp_asconf.h
==============================================================================
--- stable/11/sys/netinet/sctp_asconf.h Sun Dec 18 12:56:14 2016 (r310217)
+++ stable/11/sys/netinet/sctp_asconf.h Sun Dec 18 13:00:11 2016 (r310218)
@@ -90,7 +90,6 @@ sctp_asconf_send_nat_state_update(struct
extern int
sctp_is_addr_pending(struct sctp_tcb *, struct sctp_ifa *);
-
#endif /* _KERNEL */
#endif /* !_NETINET_SCTP_ASCONF_H_ */
Modified: stable/11/sys/netinet/sctp_bsd_addr.h
==============================================================================
--- stable/11/sys/netinet/sctp_bsd_addr.h Sun Dec 18 12:56:14 2016 (r310217)
+++ stable/11/sys/netinet/sctp_bsd_addr.h Sun Dec 18 13:00:11 2016 (r310218)
@@ -48,7 +48,6 @@ void sctp_startup_iterator(void);
#ifdef INET6
void sctp_gather_internal_ifa_flags(struct sctp_ifa *ifa);
-
#endif
#ifdef SCTP_PACKET_LOGGING
Modified: stable/11/sys/netinet/sctp_cc_functions.c
==============================================================================
--- stable/11/sys/netinet/sctp_cc_functions.c Sun Dec 18 12:56:14 2016 (r310217)
+++ stable/11/sys/netinet/sctp_cc_functions.c Sun Dec 18 13:00:11 2016 (r310218)
@@ -160,17 +160,13 @@ sctp_cwnd_update_after_fr(struct sctp_tc
uint32_t srtt;
srtt = net->lastsa;
- /*
- * lastsa>>3; we don't need
- * to devide ...
- */
+ /* lastsa>>3; we don't need
+ * to devide ... */
if (srtt == 0) {
srtt = 1;
}
- /*
- * Short Version => Equal to
- * Contel Version MBe
- */
+ /* Short Version => Equal to
+ * Contel Version MBe */
net->ssthresh = (uint32_t) (((uint64_t) 4 *
(uint64_t) net->mtu *
(uint64_t) net->cwnd) /
@@ -405,10 +401,8 @@ cc_bw_decrease(struct sctp_tcb *stcb, st
net->flight_size,
probepoint);
if (net->cc_mod.rtcc.ret_from_eq) {
- /*
- * Switch over to CA if we are less
- * aggressive
- */
+ /* Switch over to CA if we are less
+ * aggressive */
net->ssthresh = net->cwnd - 1;
net->partial_bytes_acked = 0;
}
@@ -784,9 +778,9 @@ sctp_cwnd_update_after_sack_common(struc
/*
* At this point our bw_bytes has been updated by
* incoming sack information.
- *
+ *
* But our bw may not yet be set.
- *
+ *
*/
if ((net->cc_mod.rtcc.new_tot_time / 1000) > 0) {
nbw = net->cc_mod.rtcc.bw_bytes / (net->cc_mod.rtcc.new_tot_time / 1000);
@@ -851,10 +845,8 @@ sctp_cwnd_update_after_sack_common(struc
}
break;
case SCTP_CMT_RPV2:
- /*
- * lastsa>>3; we don't need
- * to divide ...
- */
+ /* lastsa>>3; we don't need
+ * to divide ... */
srtt = net->lastsa;
if (srtt == 0) {
srtt = 1;
@@ -938,10 +930,8 @@ sctp_cwnd_update_after_sack_common(struc
}
break;
case SCTP_CMT_RPV2:
- /*
- * lastsa>>3; we don't need
- * to divide ...
- */
+ /* lastsa>>3; we don't need
+ * to divide ... */
srtt = net->lastsa;
if (srtt == 0) {
srtt = 1;
@@ -1108,10 +1098,8 @@ sctp_cwnd_update_after_ecn_echo_common(s
sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_SAT);
}
} else {
- /*
- * Further tuning down required over the drastic
- * original cut
- */
+ /* Further tuning down required over the drastic
+ * original cut */
net->ssthresh -= (net->mtu * num_pkt_lost);
net->cwnd -= (net->mtu * num_pkt_lost);
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) {
@@ -1125,10 +1113,8 @@ sctp_cwnd_update_after_ecn_echo_common(s
net->ssthresh = net->cwnd / 2;
if (net->ssthresh < net->mtu) {
net->ssthresh = net->mtu;
- /*
- * here back off the timer as well, to slow
- * us down
- */
+ /* here back off the timer as well, to slow
+ * us down */
net->RTO <<= 1;
}
net->cwnd = net->ssthresh;
@@ -1375,10 +1361,8 @@ sctp_cwnd_new_rtcc_transmission_begins(s
cwnd_in_mtu = SCTP_BASE_SYSCTL(sctp_initial_cwnd);
if (cwnd_in_mtu == 0) {
- /*
- * Using 0 means that the value of RFC 4960
- * is used.
- */
+ /* Using 0 means that the value of RFC 4960
+ * is used. */
cwnd = min((net->mtu * 4), max((2 * net->mtu), SCTP_INITIAL_CWND));
} else {
/*
@@ -1390,10 +1374,8 @@ sctp_cwnd_new_rtcc_transmission_begins(s
cwnd = (net->mtu - sizeof(struct sctphdr)) * cwnd_in_mtu;
}
if (net->cwnd > cwnd) {
- /*
- * Only set if we are not a timeout (i.e.
- * down to 1 mtu)
- */
+ /* Only set if we are not a timeout (i.e.
+ * down to 1 mtu) */
net->cwnd = cwnd;
}
}
@@ -2023,10 +2005,8 @@ htcp_param_update(struct sctp_nets *net)
htcp_beta_update(&net->cc_mod.htcp_ca, minRTT, maxRTT);
htcp_alpha_update(&net->cc_mod.htcp_ca);
- /*
- * add slowly fading memory for maxRTT to accommodate routing
- * changes etc
- */
+ /* add slowly fading memory for maxRTT to accommodate routing
+ * changes etc */
if (minRTT > 0 && maxRTT > minRTT)
net->cc_mod.htcp_ca.maxRTT = minRTT + ((maxRTT - minRTT) * 95) / 100;
}
@@ -2109,7 +2089,6 @@ htcp_min_cwnd(struct sctp_tcb *stcb, str
{
return (net->ssthresh);
}
-
#endif
static void
Modified: stable/11/sys/netinet/sctp_crc32.c
==============================================================================
--- stable/11/sys/netinet/sctp_crc32.c Sun Dec 18 12:56:14 2016 (r310217)
+++ stable/11/sys/netinet/sctp_crc32.c Sun Dec 18 13:00:11 2016 (r310218)
@@ -113,7 +113,6 @@ sctp_calculate_cksum(struct mbuf *m, uin
base = sctp_finalize_crc32c(base);
return (base);
}
-
#endif /* !defined(SCTP_WITH_NO_CSUM) */
Modified: stable/11/sys/netinet/sctp_crc32.h
==============================================================================
--- stable/11/sys/netinet/sctp_crc32.h Sun Dec 18 12:56:14 2016 (r310217)
+++ stable/11/sys/netinet/sctp_crc32.h Sun Dec 18 13:00:11 2016 (r310218)
@@ -39,9 +39,7 @@ __FBSDID("$FreeBSD$");
#if defined(_KERNEL)
#if !defined(SCTP_WITH_NO_CSUM)
uint32_t sctp_calculate_cksum(struct mbuf *, uint32_t);
-
#endif
void sctp_delayed_cksum(struct mbuf *, uint32_t offset);
-
#endif /* _KERNEL */
#endif /* __crc32c_h__ */
Modified: stable/11/sys/netinet/sctp_header.h
==============================================================================
--- stable/11/sys/netinet/sctp_header.h Sun Dec 18 12:56:14 2016 (r310217)
+++ stable/11/sys/netinet/sctp_header.h Sun Dec 18 13:00:11 2016 (r310218)
@@ -182,7 +182,6 @@ struct sctp_init {
uint32_t initial_tsn; /* I-TSN */
/* optional param's follow */
} SCTP_PACKED;
-
#define SCTP_IDENTIFICATION_SIZE 16
#define SCTP_ADDRESS_SIZE 4
#define SCTP_RESERVE_SPACE 6
Modified: stable/11/sys/netinet/sctp_indata.c
==============================================================================
--- stable/11/sys/netinet/sctp_indata.c Sun Dec 18 12:56:14 2016 (r310217)
+++ stable/11/sys/netinet/sctp_indata.c Sun Dec 18 13:00:11 2016 (r310218)
@@ -341,10 +341,8 @@ sctp_place_control_in_stream(struct sctp
q = &strm->uno_inqueue;
if (asoc->idata_supported == 0) {
if (!TAILQ_EMPTY(q)) {
- /*
- * Only one stream can be here in old style
- * -- abort
- */
+ /* Only one stream can be here in old style
+ * -- abort */
return (-1);
}
TAILQ_INSERT_TAIL(q, control, next_instrm);
@@ -487,13 +485,13 @@ sctp_queue_data_to_stream(struct sctp_tc
* has wrapped but not in the stream. Is this worth worrying about
* or should we just change our queue sort at the bottom to be by
* TSN.
- *
- * Could it also be legal for a peer to send ssn 1 with TSN 2 and ssn 2
- * with TSN 1? If the peer is doing some sort of funky TSN/SSN
+ *
+ * Could it also be legal for a peer to send ssn 1 with TSN 2 and
+ * ssn 2 with TSN 1? If the peer is doing some sort of funky TSN/SSN
* assignment this could happen... and I don't see how this would be
* a violation. So for now I am undecided an will leave the sort by
* SSN alone. Maybe a hybred approach is the answer
- *
+ *
*/
struct sctp_queued_to_read *at;
int queue_needed;
@@ -828,10 +826,8 @@ restart:
TAILQ_INSERT_TAIL(&nc->reasm, tchk, sctp_next);
tchk = TAILQ_FIRST(&control->reasm);
}
- /*
- * Now lets add it to the queue
- * after removing control
- */
+ /* Now lets add it to the queue
+ * after removing control */
TAILQ_INSERT_TAIL(&strm->uno_inqueue, nc, next_instrm);
nc->on_strm_q = SCTP_ON_UNORDERED;
if (control->on_strm_q) {
@@ -855,10 +851,8 @@ restart:
}
sctp_wakeup_the_read_socket(stcb->sctp_ep, stcb, SCTP_SO_NOT_LOCKED);
if ((nc->first_frag_seen) && !TAILQ_EMPTY(&nc->reasm)) {
- /*
- * Switch to the new guy and
- * continue
- */
+ /* Switch to the new guy and
+ * continue */
control = nc;
goto restart;
} else {
@@ -918,10 +912,8 @@ sctp_inject_old_unordered_data(struct sc
uint32_t tmp;
if (SCTP_TSN_GT(chk->rec.data.fsn_num, control->fsn_included)) {
- /*
- * Easy way the start of a new guy beyond
- * the lowest
- */
+ /* Easy way the start of a new guy beyond
+ * the lowest */
goto place_chunk;
}
if ((chk->rec.data.fsn_num == control->fsn_included) ||
@@ -931,10 +923,10 @@ sctp_inject_old_unordered_data(struct sc
* started the pd-api on the higher TSN
* (since the equals part is a TSN failure
* it must be that).
- *
- * We are completly hosed in that case since I
- * have no way to recover. This really will
- * only happen if we can get more TSN's
+ *
+ * We are completly hosed in that case since
+ * I have no way to recover. This really
+ * will only happen if we can get more TSN's
* higher before the pd-api-point.
*/
sctp_abort_in_reasm(stcb, control, chk,
@@ -1136,10 +1128,8 @@ done_un:
}
}
if (strm->pd_api_started) {
- /*
- * Can't add more must have gotten an un-ordered above being
- * partially delivered.
- */
+ /* Can't add more must have gotten an un-ordered above being
+ * partially delivered. */
return (0);
}
deliver_more:
@@ -1171,21 +1161,15 @@ deliver_more:
ret++;
}
if (((control->sinfo_flags >> 8) & SCTP_DATA_NOT_FRAG) == SCTP_DATA_NOT_FRAG) {
- /*
- * A singleton now slipping through - mark
- * it non-revokable too
- */
+ /* A singleton now slipping through - mark
+ * it non-revokable too */
sctp_mark_non_revokable(asoc, control->sinfo_tsn);
} else if (control->end_added == 0) {
- /*
- * Check if we can defer adding until its
- * all there
- */
+ /* Check if we can defer adding until its
+ * all there */
if ((control->length < pd_point) || (strm->pd_api_started)) {
- /*
- * Don't need it or cannot add more
- * (one being delivered that way)
- */
+ /* Don't need it or cannot add more
+ * (one being delivered that way) */
goto out;
}
}
@@ -1387,10 +1371,8 @@ sctp_queue_data_for_reasm(struct sctp_tc
* we know the first FSN (which is the TSN).
*/
if (SCTP_TSN_GE(control->fsn_included, chk->rec.data.fsn_num)) {
- /*
- * We have already delivered up to
- * this so its a dup
- */
+ /* We have already delivered up to
+ * this so its a dup */
sctp_abort_in_reasm(stcb, control, chk,
abort_flag,
SCTP_FROM_SCTP_INDATA + SCTP_LOC_9);
@@ -1417,10 +1399,8 @@ sctp_queue_data_for_reasm(struct sctp_tc
*/
if (SCTP_TSN_GE(control->fsn_included, chk->rec.data.fsn_num)) {
- /*
- * We have already delivered up to
- * this so its a dup
- */
+ /* We have already delivered up to
+ * this so its a dup */
SCTPDBG(SCTP_DEBUG_XXX,
"New fsn: %u is already seen in included_fsn: %u -- abort\n",
chk->rec.data.fsn_num, control->fsn_included);
@@ -1430,10 +1410,8 @@ sctp_queue_data_for_reasm(struct sctp_tc
return;
}
}
- /*
- * validate not beyond top FSN if we have seen last
- * one
- */
+ /* validate not beyond top FSN if we have seen last
+ * one */
if (SCTP_TSN_GT(chk->rec.data.fsn_num, control->top_fsn)) {
SCTPDBG(SCTP_DEBUG_XXX,
"New fsn: %u is beyond or at top_fsn: %u -- abort\n",
@@ -1467,10 +1445,8 @@ sctp_queue_data_for_reasm(struct sctp_tc
inserted = 1;
break;
} else if (at->rec.data.fsn_num == chk->rec.data.fsn_num) {
- /*
- * Gak, He sent me a duplicate str seq
- * number
- */
+ /* Gak, He sent me a duplicate str seq
+ * number */
/*
* foo bar, I guess I will just free this
* new guy, should we abort too? FIX ME
@@ -1778,19 +1754,15 @@ sctp_process_a_data_chunk(struct sctp_tc
return (0);
}
if (ordered && ((control->sinfo_flags >> 8) & SCTP_DATA_UNORDERED)) {
- /*
- * We can't have a switched order with an
- * unordered chunk
- */
+ /* We can't have a switched order with an
+ * unordered chunk */
snprintf(msg, sizeof(msg), "All fragments of a user message must be ordered or unordered (TSN=%8.8x)",
tsn);
goto err_out;
}
if (!ordered && (((control->sinfo_flags >> 8) & SCTP_DATA_UNORDERED) == 0)) {
- /*
- * We can't have a switched unordered with a
- * ordered chunk
- */
+ /* We can't have a switched unordered with a
+ * ordered chunk */
snprintf(msg, sizeof(msg), "All fragments of a user message must be ordered or unordered (TSN=%8.8x)",
tsn);
goto err_out;
@@ -2086,7 +2058,7 @@ sctp_process_a_data_chunk(struct sctp_tc
* if it is not being reset.. that way we would not create a
* HOLB when amongst streams being reset and those not being
* reset.
- *
+ *
*/
if (((liste = TAILQ_FIRST(&asoc->resetHead)) != NULL) &&
SCTP_TSN_GT(tsn, liste->tsn)) {
@@ -2284,10 +2256,10 @@ sctp_slide_mapping_arrays(struct sctp_tc
/*
* Now we also need to check the mapping array in a couple of ways.
* 1) Did we move the cum-ack point?
- *
- * When you first glance at this you might think that all entries that
- * 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
+ *
+ * When you first glance at this you might think that all entries
+ * that 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
* of it) is in place. So we must OR the nr_mapping_array and
@@ -2346,10 +2318,8 @@ sctp_slide_mapping_arrays(struct sctp_tc
/* The complete array was completed by a single FR */
/* highest becomes the cum-ack */
int clr;
-
#ifdef INVARIANTS
unsigned int i;
-
#endif
/* clear the array */
@@ -2497,8 +2467,7 @@ sctp_sack_check(struct sctp_tcb *stcb, i
(stcb->asoc.numduptsns) || /* we have dup's */
(is_a_gap) || /* is still a gap */
(stcb->asoc.delayed_ack == 0) || /* Delayed sack disabled */
- (stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) /* hit limit of pkts */
- ) {
+ (stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) /* hit limit of pkts */ ) {
if ((stcb->asoc.sctp_cmt_on_off > 0) &&
(SCTP_BASE_SYSCTL(sctp_cmt_use_dac)) &&
@@ -2510,9 +2479,9 @@ sctp_sack_check(struct sctp_tcb *stcb, i
/*
* CMT DAC algorithm: With CMT, delay acks
* even in the face of
- *
- * reordering. Therefore, if acks that do not
- * have to be sent because of the above
+ *
+ * reordering. Therefore, if acks that do
+ * not have to be sent because of the above
* reasons, will be delayed. That is, acks
* that would have been sent due to gap
* reports will be delayed with DAC. Start
@@ -2719,7 +2688,7 @@ sctp_process_data(struct mbuf **mm, int
* Now, what do we do with KNOWN
* chunks that are NOT in the right
* place?
- *
+ *
* For now, I do nothing but ignore
* them. We may later want to add
* sysctl stuff to switch out and do
@@ -2761,8 +2730,7 @@ sctp_process_data(struct mbuf **mm, int
/* discard the rest of this packet */
stop_proc = 1;
} /* else skip this bad chunk and
- * continue... */
- break;
+ * continue... */ break;
} /* switch of chunk type */
}
*offset += SCTP_SIZE32(chk_length);
@@ -3019,10 +2987,8 @@ sctp_process_segment_range(struct sctp_t
}
tp1->sent = SCTP_DATAGRAM_NR_ACKED;
if (tp1->data) {
- /*
- * sa_ignore
- * NO_NULL_CHK
- */
+ /* sa_ignore
+ * NO_NULL_CHK */
sctp_free_bufspace(stcb, &stcb->asoc, tp1, 1);
sctp_m_freem(tp1->data);
tp1->data = NULL;
@@ -3031,8 +2997,7 @@ sctp_process_segment_range(struct sctp_t
}
}
break;
- } /* if (tp1->TSN_seq == theTSN) */
- if (SCTP_TSN_GT(tp1->rec.data.TSN_seq, theTSN)) {
+ } /* if (tp1->TSN_seq == theTSN) */ if (SCTP_TSN_GT(tp1->rec.data.TSN_seq, theTSN)) {
break;
}
tp1 = TAILQ_NEXT(tp1, sctp_next);
@@ -3483,10 +3448,8 @@ sctp_strike_gap_ack_chunks(struct sctp_t
if ((stcb->asoc.prsctp_supported) &&
(PR_SCTP_RTX_ENABLED(tp1->flags))) {
- /*
- * Has it been retransmitted tv_sec times? -
- * we store the retran count there.
- */
+ /* Has it been retransmitted tv_sec times? -
+ * we store the retran count there. */
if (tp1->snd_count > tp1->rec.data.timetodrop.tv_sec) {
/* Yes, so drop it */
if (tp1->data != NULL) {
@@ -3498,10 +3461,8 @@ sctp_strike_gap_ack_chunks(struct sctp_t
continue;
}
}
- /*
- * SCTP_PRINTF("OK, we are now ready to FR this
- * guy\n");
- */
+ /* SCTP_PRINTF("OK, we are now ready to FR this
+ * guy\n"); */
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FR_LOGGING_ENABLE) {
sctp_log_fr(tp1->rec.data.TSN_seq, tp1->snd_count,
0, SCTP_FR_MARKED);
@@ -3521,18 +3482,14 @@ sctp_strike_gap_ack_chunks(struct sctp_t
alt = tp1->whoTo;
/* sa_ignore NO_NULL_CHK */
if (asoc->sctp_cmt_pf > 0) {
- /*
- * JRS 5/18/07 - If CMT PF is on,
+ /* JRS 5/18/07 - If CMT PF is on,
* use the PF version of
- * find_alt_net()
- */
+ * find_alt_net() */
alt = sctp_find_alternate_net(stcb, alt, 2);
} else {
- /*
- * JRS 5/18/07 - If only CMT is on,
+ /* JRS 5/18/07 - If only CMT is on,
* use the CMT version of
- * find_alt_net()
- */
+ * find_alt_net() */
/* sa_ignore NO_NULL_CHK */
alt = sctp_find_alternate_net(stcb, alt, 1);
}
@@ -3713,10 +3670,8 @@ sctp_fs_audit(struct sctp_association *a
struct sctp_tmit_chunk *chk;
int inflight = 0, resend = 0, inbetween = 0, acked = 0, above = 0;
int ret;
-
#ifndef INVARIANTS
int entry_flight, entry_cnt;
-
#endif
ret = 0;
@@ -3933,8 +3888,7 @@ sctp_express_handle_sack(struct sctp_tcb
tp1->whoTo->RTO =
/*
* sa_ignore
- * NO_NULL_CH
- * K
+ * NO_NULL_CHK
*/
sctp_calculate_rto(stcb,
asoc, tp1->whoTo,
@@ -4066,10 +4020,8 @@ sctp_express_handle_sack(struct sctp_tcb
}
if (net == stcb->asoc.primary_destination) {
if (stcb->asoc.alternate) {
- /*
- * release the alternate,
- * primary is good
- */
+ /* release the alternate,
+ * primary is good */
sctp_free_remote_addr(stcb->asoc.alternate);
stcb->asoc.alternate = NULL;
}
@@ -4152,10 +4104,8 @@ again:
}
} else {
if (net->window_probe) {
- /*
- * In window probes we must assure a timer
- * is still running there
- */
+ /* In window probes we must assure a timer
+ * is still running there */
net->window_probe = 0;
if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) {
SCTP_OS_TIMER_START(&net->rxt_timer.timer, to_ticks,
@@ -4775,7 +4725,7 @@ hopeless_peer:
}
/*
* Check for revoked fragments:
- *
+ *
* if Previous sack - Had no frags then we can't have any revoked if
* Previous sack - Had frag's then - If we now have frags aka
* num_seg > 0 call sctp_check_for_revoked() to tell if peer revoked
@@ -4840,10 +4790,8 @@ hopeless_peer:
}
if (net == stcb->asoc.primary_destination) {
if (stcb->asoc.alternate) {
- /*
- * release the alternate,
- * primary is good
- */
+ /* release the alternate,
+ * primary is good */
sctp_free_remote_addr(stcb->asoc.alternate);
stcb->asoc.alternate = NULL;
}
@@ -5054,10 +5002,8 @@ again:
}
} else {
if (net->window_probe) {
- /*
- * In window probes we must assure a timer
- * is still running there
- */
+ /* In window probes we must assure a timer
+ * is still running there */
if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) {
sctp_timer_start(SCTP_TIMER_TYPE_SEND,
stcb->sctp_ep, stcb, net);
@@ -5213,10 +5159,8 @@ sctp_kick_prsctp_reorder_queue(struct sc
} else {
/* Its a fragmented message */
if (ctl->first_frag_seen) {
- /*
- * Make it so this is next to
- * deliver, we restore later
- */
+ /* Make it so this is next to
+ * deliver, we restore later */
strmin->last_sequence_delivered = ctl->sinfo_ssn - 1;
need_reasm_check = 1;
break;
@@ -5280,10 +5224,8 @@ sctp_kick_prsctp_reorder_queue(struct sc
} else {
/* Its a fragmented message */
if (ctl->first_frag_seen) {
- /*
- * Make it so this is next to
- * deliver
- */
+ /* Make it so this is next to
+ * deliver */
strmin->last_sequence_delivered = ctl->sinfo_ssn - 1;
need_reasm_check = 1;
break;
@@ -5392,11 +5334,11 @@ sctp_handle_forward_tsn(struct sctp_tcb
/*
* here we will perform all the data receiver side steps for
* processing FwdTSN, as required in by pr-sctp draft:
- *
+ *
* Assume we get FwdTSN(x):
- *
- * 1) update local cumTSN to x 2) try to further advance cumTSN to x +
- * others we have 3) examine and update re-ordering queue on
+ *
+ * 1) update local cumTSN to x 2) try to further advance cumTSN to x
+ * + others we have 3) examine and update re-ordering queue on
* pr-in-streams 4) clean up re-assembly queue 5) Send a sack to
* report where we are.
*/
Modified: stable/11/sys/netinet/sctp_input.c
==============================================================================
--- stable/11/sys/netinet/sctp_input.c Sun Dec 18 12:56:14 2016 (r310217)
+++ stable/11/sys/netinet/sctp_input.c Sun Dec 18 13:00:11 2016 (r310218)
@@ -161,10 +161,8 @@ sctp_handle_init(struct mbuf *m, int iph
*abort_no_unlock = 1;
goto outnow;
}
- /*
- * We are only accepting if we have a socket with positive
- * so_qlimit.
- */
+ /* We are only accepting if we have a socket with positive
+ * so_qlimit. */
if ((stcb == NULL) &&
((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) ||
(inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) ||
@@ -709,10 +707,8 @@ sctp_handle_nat_colliding_state(struct s
LIST_REMOVE(stcb, sctp_asocs);
stcb->asoc.my_vtag = sctp_select_a_tag(stcb->sctp_ep, stcb->sctp_ep->sctp_lport, stcb->rport, 1);
head = &SCTP_BASE_INFO(sctp_asochash)[SCTP_PCBHASH_ASOC(stcb->asoc.my_vtag, SCTP_BASE_INFO(hashasocmark))];
- /*
- * put it in the bucket in the vtag hash of assoc's for the
- * system
- */
+ /* put it in the bucket in the vtag hash of assoc's for the
+ * system */
LIST_INSERT_HEAD(head, stcb, sctp_asocs);
sctp_send_initiate(stcb->sctp_ep, stcb, SCTP_SO_NOT_LOCKED);
return (1);
@@ -730,10 +726,8 @@ sctp_handle_nat_colliding_state(struct s
sctp_toss_old_cookies(stcb, &stcb->asoc);
stcb->asoc.my_vtag = sctp_select_a_tag(stcb->sctp_ep, stcb->sctp_ep->sctp_lport, stcb->rport, 1);
head = &SCTP_BASE_INFO(sctp_asochash)[SCTP_PCBHASH_ASOC(stcb->asoc.my_vtag, SCTP_BASE_INFO(hashasocmark))];
- /*
- * put it in the bucket in the vtag hash of assoc's for the
- * system
- */
+ /* put it in the bucket in the vtag hash of assoc's for the
+ * system */
LIST_INSERT_HEAD(head, stcb, sctp_asocs);
sctp_send_initiate(stcb->sctp_ep, stcb, SCTP_SO_NOT_LOCKED);
return (1);
@@ -764,7 +758,6 @@ sctp_handle_abort(struct sctp_abort_chun
{
#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
struct socket *so;
-
#endif
uint16_t len;
uint16_t error;
@@ -866,10 +859,8 @@ sctp_handle_shutdown(struct sctp_shutdow
struct sctp_association *asoc;
int some_on_streamwheel;
int old_state;
-
#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
struct socket *so;
-
#endif
SCTPDBG(SCTP_DEBUG_INPUT2,
@@ -946,10 +937,8 @@ sctp_handle_shutdown(struct sctp_shutdow
(SCTP_GET_STATE(asoc) != SCTP_STATE_SHUTDOWN_SENT)) {
SCTP_SET_STATE(asoc, SCTP_STATE_SHUTDOWN_RECEIVED);
SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING);
- /*
- * notify upper layer that peer has initiated a
- * shutdown
- */
+ /* notify upper layer that peer has initiated a
+ * shutdown */
sctp_ulp_notify(SCTP_NOTIFY_PEER_SHUTDOWN, stcb, 0, NULL, SCTP_SO_NOT_LOCKED);
/* reset time */
@@ -999,7 +988,6 @@ sctp_handle_shutdown_ack(struct sctp_shu
struct sctp_nets *net)
{
struct sctp_association *asoc;
-
#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
struct socket *so;
@@ -1169,10 +1157,8 @@ sctp_handle_error(struct sctp_chunkhdr *
uint16_t error_len;
struct sctp_association *asoc;
int adjust;
-
#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
struct socket *so;
-
#endif
/* parse through all of the errors and process */
@@ -1492,10 +1478,8 @@ sctp_process_cookie_existing(struct mbuf
int retval;
int spec_flag = 0;
uint32_t how_indx;
-
#if defined(SCTP_DETAILED_STR_STATS)
int j;
-
#endif
net = *netp;
@@ -1619,7 +1603,6 @@ sctp_process_cookie_existing(struct mbuf
) {
#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
struct socket *so;
-
#endif
/*
* Here is where collision would go if we
@@ -1820,7 +1803,6 @@ sctp_process_cookie_existing(struct mbuf
(inp->sctp_socket->so_qlimit == 0)) {
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-stable-11
mailing list