diff options
author | George Shepherd <George.Shepherd@Sun.COM> | 2010-05-24 08:39:49 -0700 |
---|---|---|
committer | George Shepherd <George.Shepherd@Sun.COM> | 2010-05-24 08:39:49 -0700 |
commit | fd7b5aedb61e21a26e69446a5708dbf5e1ceea6e (patch) | |
tree | f0f9fee170a890adb0246fe30df16534a045bd4c /usr/src/uts/common/inet | |
parent | a120541c237dc0cda26d48983b1b9e2a13577a61 (diff) | |
download | illumos-gate-fd7b5aedb61e21a26e69446a5708dbf5e1ceea6e.tar.gz |
6951733 RTO for retransmitting INIT is not capped by sinit_max_init_timeo
Diffstat (limited to 'usr/src/uts/common/inet')
-rw-r--r-- | usr/src/uts/common/inet/sctp/sctp.c | 7 | ||||
-rw-r--r-- | usr/src/uts/common/inet/sctp/sctp_asconf.c | 5 | ||||
-rw-r--r-- | usr/src/uts/common/inet/sctp/sctp_common.c | 5 | ||||
-rw-r--r-- | usr/src/uts/common/inet/sctp/sctp_impl.h | 14 | ||||
-rw-r--r-- | usr/src/uts/common/inet/sctp/sctp_opt_data.c | 7 | ||||
-rw-r--r-- | usr/src/uts/common/inet/sctp/sctp_output.c | 7 | ||||
-rw-r--r-- | usr/src/uts/common/inet/sctp/sctp_timer.c | 11 |
7 files changed, 27 insertions, 29 deletions
diff --git a/usr/src/uts/common/inet/sctp/sctp.c b/usr/src/uts/common/inet/sctp/sctp.c index 77d15a5e6d..6ded330f09 100644 --- a/usr/src/uts/common/inet/sctp/sctp.c +++ b/usr/src/uts/common/inet/sctp/sctp.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <sys/types.h> @@ -891,7 +890,7 @@ sctp_init_values(sctp_t *sctp, sctp_t *psctp, int sleep) sctp->sctp_irwnd = psctp->sctp_rwnd; sctp->sctp_pd_point = psctp->sctp_pd_point; sctp->sctp_rto_max = psctp->sctp_rto_max; - sctp->sctp_init_rto_max = psctp->sctp_init_rto_max; + sctp->sctp_rto_max_init = psctp->sctp_rto_max_init; sctp->sctp_rto_min = psctp->sctp_rto_min; sctp->sctp_rto_initial = psctp->sctp_rto_initial; sctp->sctp_pa_max_rxt = psctp->sctp_pa_max_rxt; @@ -932,7 +931,7 @@ sctp_init_values(sctp_t *sctp, sctp_t *psctp, int sleep) sctp->sctp_irwnd = sctp->sctp_rwnd; sctp->sctp_pd_point = sctp->sctp_rwnd; sctp->sctp_rto_max = MSEC_TO_TICK(sctps->sctps_rto_maxg); - sctp->sctp_init_rto_max = sctp->sctp_rto_max; + sctp->sctp_rto_max_init = sctp->sctp_rto_max; sctp->sctp_rto_min = MSEC_TO_TICK(sctps->sctps_rto_ming); sctp->sctp_rto_initial = MSEC_TO_TICK( sctps->sctps_rto_initialg); diff --git a/usr/src/uts/common/inet/sctp/sctp_asconf.c b/usr/src/uts/common/inet/sctp/sctp_asconf.c index e3f5a3c347..e0b749115a 100644 --- a/usr/src/uts/common/inet/sctp/sctp_asconf.c +++ b/usr/src/uts/common/inet/sctp/sctp_asconf.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <sys/types.h> @@ -883,7 +882,7 @@ sctp_rc_timer(sctp_t *sctp, sctp_faddr_t *fp) fp->strikes++; sctp->sctp_strikes++; - SCTP_CALC_RXT(sctp, fp); + SCTP_CALC_RXT(sctp, fp, sctp->sctp_rto_max); nfp = sctp_rotate_faddr(sctp, fp); sctp->sctp_cchunk_pend = 0; diff --git a/usr/src/uts/common/inet/sctp/sctp_common.c b/usr/src/uts/common/inet/sctp/sctp_common.c index 3bdb3368bf..61fac3c002 100644 --- a/usr/src/uts/common/inet/sctp/sctp_common.c +++ b/usr/src/uts/common/inet/sctp/sctp_common.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <sys/types.h> @@ -1783,7 +1782,7 @@ sctp_init_faddr(sctp_t *sctp, sctp_faddr_t *fp, in6_addr_t *addr, fp->ixa->ixa_flags &= ~IXAF_IS_IPV4; } fp->cwnd = sctps->sctps_slow_start_initial * fp->sfa_pmss; - fp->rto = MIN(sctp->sctp_rto_initial, sctp->sctp_init_rto_max); + fp->rto = MIN(sctp->sctp_rto_initial, sctp->sctp_rto_max_init); SCTP_MAX_RTO(sctp, fp); fp->srtt = -1; fp->rtt_updates = 0; diff --git a/usr/src/uts/common/inet/sctp/sctp_impl.h b/usr/src/uts/common/inet/sctp/sctp_impl.h index 94fb45b0a3..e093a59a4e 100644 --- a/usr/src/uts/common/inet/sctp/sctp_impl.h +++ b/usr/src/uts/common/inet/sctp/sctp_impl.h @@ -20,7 +20,7 @@ */ /* - * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. */ #ifndef _INET_SCTP_SCTP_IMPL_H @@ -166,11 +166,11 @@ typedef struct sctpt_s { sctp, struct sctp_faddr_s, fp); \ } -#define SCTP_CALC_RXT(sctp, fp) \ -{ \ - if (((fp)->rto <<= 1) > (sctp)->sctp_rto_max) \ - (fp)->rto = (sctp)->sctp_rto_max; \ - SCTP_MAX_RTO(sctp, fp); \ +#define SCTP_CALC_RXT(sctp, fp, max) \ +{ \ + if (((fp)->rto <<= 1) > (max)) \ + (fp)->rto = (max); \ + SCTP_MAX_RTO(sctp, fp); \ } @@ -766,7 +766,7 @@ typedef struct sctp_s { int32_t sctp_pa_max_rxt; /* Max per-assoc retransmit cnt */ int32_t sctp_pp_max_rxt; /* Max per-path retransmit cnt */ uint32_t sctp_rto_max; - uint32_t sctp_init_rto_max; + uint32_t sctp_rto_max_init; uint32_t sctp_rto_min; uint32_t sctp_rto_initial; diff --git a/usr/src/uts/common/inet/sctp/sctp_opt_data.c b/usr/src/uts/common/inet/sctp/sctp_opt_data.c index 3424931257..3d3d7c3891 100644 --- a/usr/src/uts/common/inet/sctp/sctp_opt_data.c +++ b/usr/src/uts/common/inet/sctp/sctp_opt_data.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <sys/types.h> @@ -336,7 +335,7 @@ sctp_get_initmsg(sctp_t *sctp, void *ptr) si->sinit_num_ostreams = sctp->sctp_num_ostr; si->sinit_max_instreams = sctp->sctp_num_istr; si->sinit_max_attempts = sctp->sctp_max_init_rxt; - si->sinit_max_init_timeo = TICK_TO_MSEC(sctp->sctp_init_rto_max); + si->sinit_max_init_timeo = TICK_TO_MSEC(sctp->sctp_rto_max_init); return (sizeof (*si)); } @@ -389,7 +388,7 @@ sctp_set_initmsg(sctp_t *sctp, const void *invalp, uint_t inlen) sctp->sctp_max_init_rxt = si->sinit_max_attempts; if (si->sinit_max_init_timeo != 0) { - sctp->sctp_init_rto_max = + sctp->sctp_rto_max_init = MSEC_TO_TICK(si->sinit_max_init_timeo); } return (0); diff --git a/usr/src/uts/common/inet/sctp/sctp_output.c b/usr/src/uts/common/inet/sctp/sctp_output.c index f2b6084c26..5b739286ac 100644 --- a/usr/src/uts/common/inet/sctp/sctp_output.c +++ b/usr/src/uts/common/inet/sctp/sctp_output.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <sys/types.h> @@ -1810,7 +1809,7 @@ out: oldfp->strikes++; sctp->sctp_strikes++; - SCTP_CALC_RXT(sctp, oldfp); + SCTP_CALC_RXT(sctp, oldfp, sctp->sctp_rto_max); if (oldfp != fp && oldfp->suna != 0) SCTP_FADDR_TIMER_RESTART(sctp, oldfp, fp->rto); SCTP_FADDR_TIMER_RESTART(sctp, fp, fp->rto); @@ -2026,7 +2025,7 @@ done_bundle: restart_timer: oldfp->strikes++; sctp->sctp_strikes++; - SCTP_CALC_RXT(sctp, oldfp); + SCTP_CALC_RXT(sctp, oldfp, sctp->sctp_rto_max); /* * If there is still some data in the oldfp, restart the * retransmission timer. If there is no data, the heartbeat will diff --git a/usr/src/uts/common/inet/sctp/sctp_timer.c b/usr/src/uts/common/inet/sctp/sctp_timer.c index 47ffe3d1fc..1bc5d66a8b 100644 --- a/usr/src/uts/common/inet/sctp/sctp_timer.c +++ b/usr/src/uts/common/inet/sctp/sctp_timer.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <sys/types.h> @@ -504,7 +503,8 @@ sctp_heartbeat_timer(sctp_t *sctp) sctp->sctp_rto_initial; goto dead_addr; } else { - SCTP_CALC_RXT(sctp, fp); + SCTP_CALC_RXT(sctp, fp, + sctp->sctp_rto_max); fp->hb_expiry = now + fp->rto; } break; @@ -568,6 +568,7 @@ void sctp_rexmit_timer(sctp_t *sctp, sctp_faddr_t *fp) { mblk_t *mp; + uint32_t rto_max = sctp->sctp_rto_max; sctp_stack_t *sctps = sctp->sctp_sctps; ASSERT(fp != NULL); @@ -646,6 +647,7 @@ rxmit_init: (void) conn_ip_output(mp, fp->ixa); BUMP_LOCAL(sctp->sctp_opkts); } + rto_max = sctp->sctp_rto_max_init; break; case SCTPS_COOKIE_ECHOED: BUMP_LOCAL(sctp->sctp_T1expire); @@ -659,6 +661,7 @@ rxmit_init: (void) conn_ip_output(mp, fp->ixa); BUMP_LOCAL(sctp->sctp_opkts); BUMP_MIB(&sctps->sctps_mib, sctpTimRetrans); + rto_max = sctp->sctp_rto_max_init; break; case SCTPS_SHUTDOWN_SENT: BUMP_LOCAL(sctp->sctp_T2expire); @@ -682,7 +685,7 @@ rxmit_init: fp->strikes++; sctp->sctp_strikes++; - SCTP_CALC_RXT(sctp, fp); + SCTP_CALC_RXT(sctp, fp, rto_max); SCTP_FADDR_TIMER_RESTART(sctp, fp, fp->rto); } |