diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2009-09-04 18:20:59 -0400 |
---|---|---|
committer | Vlad Yasevich <vladislav.yasevich@hp.com> | 2009-09-04 18:20:59 -0400 |
commit | cb95ea32a457871f72752164de8d94fa20f4703c (patch) | |
tree | 0a419cdc3fe5e7e2d5fa5036a40d93a4bb6aac42 /net/sctp/output.c | |
parent | b29e7907288554db9c987c36facfd0304ee8ff5a (diff) | |
download | op-kernel-dev-cb95ea32a457871f72752164de8d94fa20f4703c.zip op-kernel-dev-cb95ea32a457871f72752164de8d94fa20f4703c.tar.gz |
sctp: Don't do NAGLE delay on large writes that were fragmented small
SCTP will delay the last part of a large write due to NAGLE, if that
part is smaller then MTU. Since we are doing large writes, we might
as well send the last portion now instead of waiting untill the next
large write happens. The small portion will be sent as is regardless,
so it's better to not delay it.
This is a result of much discussions with Wei Yongjun <yjwei@cn.fujitsu.com>
and Doug Graham <dgraham@nortel.com>. Many thanks go out to them.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Diffstat (limited to 'net/sctp/output.c')
-rw-r--r-- | net/sctp/output.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c index d0b84f6..b801bc9 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c @@ -703,8 +703,10 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet, /* Check whether this chunk and all the rest of pending * data will fit or delay in hopes of bundling a full * sized packet. + * Don't delay large message writes that may have been + * fragmeneted into small peices. */ - if (len < max) { + if ((len < max) && (chunk->msg->msg_size < max)) { retval = SCTP_XMIT_NAGLE_DELAY; goto finish; } |