diff options
author | tuexen <tuexen@FreeBSD.org> | 2011-01-26 19:49:03 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2011-01-26 19:49:03 +0000 |
commit | 32d6ca8049fbb8a10025514c617cdb69a8587599 (patch) | |
tree | 02e607e5fd74fe72bfdc2bd3c9950cf26394faf3 /sys/netinet/sctp_cc_functions.c | |
parent | 01fe299cac3b9daad269499d2ee48f089ac7d782 (diff) | |
download | FreeBSD-src-32d6ca8049fbb8a10025514c617cdb69a8587599.zip FreeBSD-src-32d6ca8049fbb8a10025514c617cdb69a8587599.tar.gz |
Change infrastructure for SCTP_MAX_BURST to allow compliance
with the latest socket API ID. Especially it can be disabled.
Full compliance needs changing the structure used in the
socket option. Since this breaks the API, it will be a
seperate commit which will not be MFCed to stable/8.
MFC after: 3 months.
Diffstat (limited to 'sys/netinet/sctp_cc_functions.c')
-rw-r--r-- | sys/netinet/sctp_cc_functions.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/netinet/sctp_cc_functions.c b/sys/netinet/sctp_cc_functions.c index 272e05b..28bbe5a 100644 --- a/sys/netinet/sctp_cc_functions.c +++ b/sys/netinet/sctp_cc_functions.c @@ -601,8 +601,11 @@ sctp_cwnd_update_after_packet_dropped(struct sctp_tcb *stcb, * Take 1/4 of the space left or max burst up .. whichever * is less. */ - incr = min((bw_avail - *on_queue) >> 2, - stcb->asoc.max_burst * net->mtu); + incr = (bw_avail - *on_queue) >> 2; + if ((stcb->asoc.max_burst > 0) && + (stcb->asoc.max_burst * net->mtu < incr)) { + incr = stcb->asoc.max_burst * net->mtu; + } net->cwnd += incr; } if (net->cwnd > bw_avail) { |