diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2009-11-23 15:53:57 -0500 |
---|---|---|
committer | Vlad Yasevich <vladislav.yasevich@hp.com> | 2009-11-23 15:53:57 -0500 |
commit | 90f2f5318b3a5b0898fef0fec9b91376c7de7a2c (patch) | |
tree | 33622d2b9e2064c36c17cd108c9b3a23af1fd6a4 /net/sctp/associola.c | |
parent | e0e9db178a5ba4dbb5f16f958f1affbdc63d2cc4 (diff) |
sctp: Update SWS avaoidance receiver side algorithm
We currently send window update SACKs every time we free up 1 PMTU
worth of data. That a lot more SACKs then necessary. Instead, we'll
now send back the actuall window every time we send a sack, and do
window-update SACKs when a fraction of the receive buffer has been
opened. The fraction is controlled with a sysctl.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Diffstat (limited to 'net/sctp/associola.c')
-rw-r--r-- | net/sctp/associola.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 8e755ebff3b8..37e982510bea 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -1383,8 +1383,9 @@ static inline int sctp_peer_needs_update(struct sctp_association *asoc) | |||
1383 | case SCTP_STATE_SHUTDOWN_RECEIVED: | 1383 | case SCTP_STATE_SHUTDOWN_RECEIVED: |
1384 | case SCTP_STATE_SHUTDOWN_SENT: | 1384 | case SCTP_STATE_SHUTDOWN_SENT: |
1385 | if ((asoc->rwnd > asoc->a_rwnd) && | 1385 | if ((asoc->rwnd > asoc->a_rwnd) && |
1386 | ((asoc->rwnd - asoc->a_rwnd) >= | 1386 | ((asoc->rwnd - asoc->a_rwnd) >= max_t(__u32, |
1387 | min_t(__u32, (asoc->base.sk->sk_rcvbuf >> 1), asoc->pathmtu))) | 1387 | (asoc->base.sk->sk_rcvbuf >> sctp_rwnd_upd_shift), |
1388 | asoc->pathmtu))) | ||
1388 | return 1; | 1389 | return 1; |
1389 | break; | 1390 | break; |
1390 | default: | 1391 | default: |