Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37213
b: refs/heads/master
c: cd49788
h: refs/heads/master
i:
  37211: 765545d
v: v3
  • Loading branch information
Sridhar Samudrala authored and David S. Miller committed Sep 30, 2006
1 parent 4730218 commit 36728c9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 208edef6a5b6c50363c77efcf34c4b4020681029
refs/heads/master: cd49788563d3b9e2ec0b316fa57aef1c0cb3bd4b
10 changes: 8 additions & 2 deletions trunk/net/sctp/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ static sctp_xmit_t sctp_packet_append_data(struct sctp_packet *packet,
* data will fit or delay in hopes of bundling a full
* sized packet.
*/
if (len < asoc->pathmtu - packet->overhead) {
if (len < asoc->frag_point) {
retval = SCTP_XMIT_NAGLE_DELAY;
goto finish;
}
Expand All @@ -645,7 +645,13 @@ static sctp_xmit_t sctp_packet_append_data(struct sctp_packet *packet,
/* Keep track of how many bytes are in flight to the receiver. */
asoc->outqueue.outstanding_bytes += datasize;

/* Update our view of the receiver's rwnd. */
/* Update our view of the receiver's rwnd. Include sk_buff overhead
* while updating peer.rwnd so that it reduces the chances of a
* receiver running out of receive buffer space even when receive
* window is still open. This can happen when a sender is sending
* sending small messages.
*/
datasize += sizeof(struct sk_buff);
if (datasize < rwnd)
rwnd -= datasize;
else
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/sctp/outqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 36728c9

Please sign in to comment.