summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorRoamer <Roamer@Sun.COM>2009-05-08 17:32:21 -0700
committerRoamer <Roamer@Sun.COM>2009-05-08 17:32:21 -0700
commit0713d8384469050bf98a5ea31ba12a91d290d21c (patch)
tree3c8e8c33c6f72d67ea0fac2abcf2919a4fa40346 /usr/src
parent72cf314316bed51cd2e5fd0cb021a9725316a6b0 (diff)
downloadillumos-joyent-0713d8384469050bf98a5ea31ba12a91d290d21c.tar.gz
6837719 TCP tx might hang when tcp_cork option is set
6822045 FTP hangs when enabling Jumbo Frame
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/inet/tcp/tcp.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/usr/src/uts/common/inet/tcp/tcp.c b/usr/src/uts/common/inet/tcp/tcp.c
index 82447ff69f..547e4471ce 100644
--- a/usr/src/uts/common/inet/tcp/tcp.c
+++ b/usr/src/uts/common/inet/tcp/tcp.c
@@ -9051,6 +9051,12 @@ tcp_mss_set(tcp_t *tcp, uint32_t mss, boolean_t do_ss)
if ((mss << 2) > tcp->tcp_xmit_hiwater)
tcp->tcp_xmit_hiwater = mss << 2;
+ /*
+ * Set the xmit_lowater to at least twice of MSS.
+ */
+ if ((mss << 1) > tcp->tcp_xmit_lowater)
+ tcp->tcp_xmit_lowater = mss << 1;
+
if (do_ss) {
/*
* Either the tcp_cwnd is as yet uninitialized, or mss is
@@ -18843,13 +18849,15 @@ data_null:
goto done;
}
- if (tcp->tcp_cork) {
- /*
- * if the tcp->tcp_cork option is set, then we have to force
- * TCP not to send partial segment (smaller than MSS bytes).
- * We are calculating the usable now based on full mss and
- * will save the rest of remaining data for later.
- */
+ /*
+ * If tcp_zero_win_probe is not set and the tcp->tcp_cork option
+ * is set, then we have to force TCP not to send partial segment
+ * (smaller than MSS bytes). We are calculating the usable now
+ * based on full mss and will save the rest of remaining data for
+ * later. When tcp_zero_win_probe is set, TCP needs to send out
+ * something to do zero window probe.
+ */
+ if (tcp->tcp_cork && !tcp->tcp_zero_win_probe) {
if (usable < mss)
goto done;
usable = (usable / mss) * mss;