diff options
author | Sridhar Samudrala <sri@us.ibm.com> | 2006-09-30 02:09:05 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-09-30 02:09:05 +0200 |
commit | cd49788563d3b9e2ec0b316fa57aef1c0cb3bd4b (patch) | |
tree | a05455a25c805f5ec775f730ee7cab789948649d /net/sctp/outqueue.c | |
parent | [SCTP]: Enable Nagle algorithm by default. (diff) | |
download | linux-cd49788563d3b9e2ec0b316fa57aef1c0cb3bd4b.tar.xz linux-cd49788563d3b9e2ec0b316fa57aef1c0cb3bd4b.zip |
[SCTP]: Include sk_buff overhead while updating the peer's receive window.
Currently if the sender is sending small messages, it can cause a receiver
to run out of receive buffer space even when the advertised receive window
is still open and results in packet drops and retransmissions. Including
a overhead while updating the sender's view of peer receive window will
reduce the chances of receive buffer space overshooting the receive window.
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/outqueue.c')
-rw-r--r-- | net/sctp/outqueue.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 37074a39ecbb..739582415bf6 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c @@ -416,7 +416,8 @@ void sctp_retransmit_mark(struct sctp_outq *q, * (Section 7.2.4)), add the data size of those * chunks to the rwnd. */ - q->asoc->peer.rwnd += sctp_data_size(chunk); + q->asoc->peer.rwnd += (sctp_data_size(chunk) + + sizeof(struct sk_buff)); q->outstanding_bytes -= sctp_data_size(chunk); transport->flight_size -= sctp_data_size(chunk); |