Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107176652
D29483.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
814 B
Referenced Files
None
Subscribers
None
D29483.diff
View Options
diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c
--- a/sys/netinet/tcp_hostcache.c
+++ b/sys/netinet/tcp_hostcache.c
@@ -649,12 +649,13 @@
return(error);
}
- /* Use a buffer for 16 lines */
- sbuf_new_for_sysctl(&sb, NULL, 16 * linesize, req);
+ /* Use a buffer sized for one full bucket */
+ sbuf_new_for_sysctl(&sb, NULL, V_tcp_hostcache.bucket_limit * linesize, req);
sbuf_printf(&sb,
"\nIP address MTU SSTRESH RTT RTTVAR "
" CWND SENDPIPE RECVPIPE HITS UPD EXP\n");
+ sbuf_drain(&sb);
#define msec(u) (((u) + 500) / 1000)
for (i = 0; i < V_tcp_hostcache.hashsize; i++) {
@@ -685,6 +686,7 @@
hc_entry->rmx_expire);
}
THC_UNLOCK(&V_tcp_hostcache.hashbase[i].hch_mtx);
+ sbuf_drain(&sb);
}
#undef msec
error = sbuf_finish(&sb);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 12, 6:59 AM (21 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15763146
Default Alt Text
D29483.diff (814 B)
Attached To
Mode
D29483: tcp: drain tcp_hostcache_list in between per-bucket locks
Attached
Detach File
Event Timeline
Log In to Comment