X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=net%2Fsctp%2Foutput.c;h=3ef4351dd956ad95649afd568b3a91381a86e730;hb=edc6afc5496875a640bef0913604be7550c1795d;hp=cdc5a393676657691a2421b573235fde8318b0f8;hpb=4854c7b27f0975a2b629f35ea3996d2968eb7c4f;p=linux-2.6-omap-h63xx.git diff --git a/net/sctp/output.c b/net/sctp/output.c index cdc5a393676..3ef4351dd95 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