sctp_indata.c (163953) | sctp_indata.c (163996) |
---|---|
1/*- 2 * Copyright (c) 2001-2006, Cisco Systems, Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are met: 6 * 7 * a) Redistributions of source code must retain the above copyright notice, 8 * this list of conditions and the following disclaimer. --- 17 unchanged lines hidden (view full) --- 26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 28 * THE POSSIBILITY OF SUCH DAMAGE. 29 */ 30 31/* $kejKAME: sctp_indata.c,v 1.36 2005/03/06 16:04:17 itojun Exp $ */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001-2006, Cisco Systems, Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are met: 6 * 7 * a) Redistributions of source code must retain the above copyright notice, 8 * this list of conditions and the following disclaimer. --- 17 unchanged lines hidden (view full) --- 26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 28 * THE POSSIBILITY OF SUCH DAMAGE. 29 */ 30 31/* $kejKAME: sctp_indata.c,v 1.36 2005/03/06 16:04:17 itojun Exp $ */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_indata.c 163953 2006-11-03 15:23:16Z rrs $"); | 34__FBSDID("$FreeBSD: head/sys/netinet/sctp_indata.c 163996 2006-11-05 13:25:18Z rrs $"); |
35 36 37#include "opt_ipsec.h" 38#include "opt_inet6.h" 39#include "opt_inet.h" 40 41#include "opt_sctp.h" 42 --- 3712 unchanged lines hidden (view full) --- 3755 {75401, 69, 10}, /* 68 */ 3756 {79517, 70, 10}, /* 69 */ 3757 {84035, 71, 10}, /* 70 */ 3758 {89053, 72, 10}, /* 71 */ 3759 {94717, 73, 9} /* 72 */ 3760}; 3761 3762static void | 35 36 37#include "opt_ipsec.h" 38#include "opt_inet6.h" 39#include "opt_inet.h" 40 41#include "opt_sctp.h" 42 --- 3712 unchanged lines hidden (view full) --- 3755 {75401, 69, 10}, /* 68 */ 3756 {79517, 70, 10}, /* 69 */ 3757 {84035, 71, 10}, /* 70 */ 3758 {89053, 72, 10}, /* 71 */ 3759 {94717, 73, 9} /* 72 */ 3760}; 3761 3762static void |
3763sctp_hs_cwnd_increase(struct sctp_nets *net) | 3763sctp_hs_cwnd_increase(struct sctp_tcb *stcb, struct sctp_nets *net) |
3764{ 3765 int cur_val, i, indx, incr; 3766 3767 cur_val = net->cwnd >> 10; 3768 indx = SCTP_HS_TABLE_SIZE - 1; 3769 3770 if (cur_val < sctp_cwnd_adjust[0].cwnd) { 3771 /* normal mode */ --- 20 unchanged lines hidden (view full) --- 3792 net->cwnd += incr; 3793#ifdef SCTP_CWND_MONITOR 3794 sctp_log_cwnd(stcb, net, incr, SCTP_CWND_LOG_FROM_SS); 3795#endif 3796 } 3797} 3798 3799static void | 3764{ 3765 int cur_val, i, indx, incr; 3766 3767 cur_val = net->cwnd >> 10; 3768 indx = SCTP_HS_TABLE_SIZE - 1; 3769 3770 if (cur_val < sctp_cwnd_adjust[0].cwnd) { 3771 /* normal mode */ --- 20 unchanged lines hidden (view full) --- 3792 net->cwnd += incr; 3793#ifdef SCTP_CWND_MONITOR 3794 sctp_log_cwnd(stcb, net, incr, SCTP_CWND_LOG_FROM_SS); 3795#endif 3796 } 3797} 3798 3799static void |
3800sctp_hs_cwnd_decrease(struct sctp_nets *net) | 3800sctp_hs_cwnd_decrease(struct sctp_tcb *stcb, struct sctp_nets *net) |
3801{ 3802 int cur_val, i, indx; 3803 3804#ifdef SCTP_CWND_MONITOR 3805 int old_cwnd = net->cwnd; 3806 3807#endif 3808 --- 144 unchanged lines hidden (view full) --- 3953 */ 3954 if (accum_moved || (sctp_cmt_on_off && net->new_pseudo_cumack)) { 3955 /* If the cumulative ack moved we can proceed */ 3956 if (net->cwnd <= net->ssthresh) { 3957 /* We are in slow start */ 3958 if (net->flight_size + net->net_ack >= 3959 net->cwnd) { 3960#ifdef SCTP_HIGH_SPEED | 3801{ 3802 int cur_val, i, indx; 3803 3804#ifdef SCTP_CWND_MONITOR 3805 int old_cwnd = net->cwnd; 3806 3807#endif 3808 --- 144 unchanged lines hidden (view full) --- 3953 */ 3954 if (accum_moved || (sctp_cmt_on_off && net->new_pseudo_cumack)) { 3955 /* If the cumulative ack moved we can proceed */ 3956 if (net->cwnd <= net->ssthresh) { 3957 /* We are in slow start */ 3958 if (net->flight_size + net->net_ack >= 3959 net->cwnd) { 3960#ifdef SCTP_HIGH_SPEED |
3961 sctp_hs_cwnd_increase(net); | 3961 sctp_hs_cwnd_increase(stcb, net); |
3962#else 3963 if (net->net_ack > (net->mtu * sctp_L2_abc_variable)) { 3964 net->cwnd += (net->mtu * sctp_L2_abc_variable); 3965#ifdef SCTP_CWND_MONITOR 3966 sctp_log_cwnd(stcb, net, net->mtu, 3967 SCTP_CWND_LOG_FROM_SS); 3968#endif 3969 --- 1087 unchanged lines hidden (view full) --- 5057 * per section 7.2.3, are there any 5058 * destinations that had a fast retransmit 5059 * to them. If so what we need to do is 5060 * adjust ssthresh and cwnd. 5061 */ 5062 struct sctp_tmit_chunk *lchk; 5063 5064#ifdef SCTP_HIGH_SPEED | 3962#else 3963 if (net->net_ack > (net->mtu * sctp_L2_abc_variable)) { 3964 net->cwnd += (net->mtu * sctp_L2_abc_variable); 3965#ifdef SCTP_CWND_MONITOR 3966 sctp_log_cwnd(stcb, net, net->mtu, 3967 SCTP_CWND_LOG_FROM_SS); 3968#endif 3969 --- 1087 unchanged lines hidden (view full) --- 5057 * per section 7.2.3, are there any 5058 * destinations that had a fast retransmit 5059 * to them. If so what we need to do is 5060 * adjust ssthresh and cwnd. 5061 */ 5062 struct sctp_tmit_chunk *lchk; 5063 5064#ifdef SCTP_HIGH_SPEED |
5065 sctp_hs_cwnd_decrease(net); | 5065 sctp_hs_cwnd_decrease(stcb, net); |
5066#else 5067#ifdef SCTP_CWND_MONITOR 5068 int old_cwnd = net->cwnd; 5069 5070#endif 5071 net->ssthresh = net->cwnd / 2; 5072 if (net->ssthresh < (net->mtu * 2)) { 5073 net->ssthresh = 2 * net->mtu; --- 515 unchanged lines hidden --- | 5066#else 5067#ifdef SCTP_CWND_MONITOR 5068 int old_cwnd = net->cwnd; 5069 5070#endif 5071 net->ssthresh = net->cwnd / 2; 5072 if (net->ssthresh < (net->mtu * 2)) { 5073 net->ssthresh = 2 * net->mtu; --- 515 unchanged lines hidden --- |