Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106145803
D11016.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D11016.diff
View Options
Index: head/sys/netinet/tcp_output.c
===================================================================
--- head/sys/netinet/tcp_output.c
+++ head/sys/netinet/tcp_output.c
@@ -130,6 +130,12 @@
&VNET_NAME(tcp_autosndbuf_max), 0,
"Max size of automatic send buffer");
+VNET_DEFINE(int, tcp_sendbuf_auto_lowat) = 0;
+#define V_tcp_sendbuf_auto_lowat VNET(tcp_sendbuf_auto_lowat)
+SYSCTL_INT(_net_inet_tcp, OID_AUTO, sendbuf_auto_lowat, CTLFLAG_VNET | CTLFLAG_RW,
+ &VNET_NAME(tcp_sendbuf_auto_lowat), 0,
+ "Modify threshold for auto send buffer growth to account for SO_SNDLOWAT");
+
/*
* Make sure that either retransmit or persist timer is set for SYN, FIN and
* non-ACK.
@@ -521,8 +527,12 @@
* XXXGL: should there be used sbused() or sbavail()?
*/
if (V_tcp_do_autosndbuf && so->so_snd.sb_flags & SB_AUTOSIZE) {
- if ((tp->snd_wnd / 4 * 5) >= so->so_snd.sb_hiwat &&
- sbused(&so->so_snd) >= (so->so_snd.sb_hiwat / 8 * 7) &&
+ int autosndbuf_mod = 0;
+ if (V_tcp_sendbuf_auto_lowat)
+ autosndbuf_mod = so->so_snd.sb_lowat;
+
+ if ((tp->snd_wnd / 4 * 5) >= so->so_snd.sb_hiwat - autosndbuf_mod &&
+ sbused(&so->so_snd) >= (so->so_snd.sb_hiwat / 8 * 7) - autosndbuf_mod &&
sbused(&so->so_snd) < V_tcp_autosndbuf_max &&
sendwin >= (sbused(&so->so_snd) -
(tp->snd_nxt - tp->snd_una))) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 27, 3:52 AM (10 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15610911
Default Alt Text
D11016.diff (1 KB)
Attached To
Mode
D11016: Add a sysctl to toggle the use of the sockets LOWAT when calculating auto window growth
Attached
Detach File
Event Timeline
Log In to Comment