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>
This commit is contained in:
@@ -1383,8 +1383,9 @@ static inline int sctp_peer_needs_update(struct sctp_association *asoc)
|
||||
case SCTP_STATE_SHUTDOWN_RECEIVED:
|
||||
case SCTP_STATE_SHUTDOWN_SENT:
|
||||
if ((asoc->rwnd > asoc->a_rwnd) &&
|
||||
((asoc->rwnd - asoc->a_rwnd) >=
|
||||
min_t(__u32, (asoc->base.sk->sk_rcvbuf >> 1), asoc->pathmtu)))
|
||||
((asoc->rwnd - asoc->a_rwnd) >= max_t(__u32,
|
||||
(asoc->base.sk->sk_rcvbuf >> sctp_rwnd_upd_shift),
|
||||
asoc->pathmtu)))
|
||||
return 1;
|
||||
break;
|
||||
default:
|
||||
|
Reference in New Issue
Block a user