diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-10-02 12:45:08 (GMT) |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-10-02 12:45:08 (GMT) |
commit | 59458f40e25915a355d8b1d701425fe9f4f9ea23 (patch) | |
tree | f1c9a2934df686e36d75f759ab7313b6f0e0e5f9 /net/sctp/output.c | |
parent | 825f9075d74028d11d7f5932f04e1b5db3022b51 (diff) | |
parent | d834c16516d1ebec4766fc58c059bf01311e6045 (diff) | |
download | linux-fsl-qoriq-59458f40e25915a355d8b1d701425fe9f4f9ea23.tar.xz |
Merge branch 'master' into gfs2
Diffstat (limited to 'net/sctp/output.c')
-rw-r--r-- | net/sctp/output.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c index cdc5a39..3ef4351 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c @@ -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; } @@ -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 |