Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/tcp_input.c
Show First 20 Lines • Show All 1,850 Lines • ▼ Show 20 Lines | #endif | ||||
* we receive a bulk stream w/o packet losses or reorderings. | * we receive a bulk stream w/o packet losses or reorderings. | ||||
* Shrinking the buffer during idle times is not necessary as | * Shrinking the buffer during idle times is not necessary as | ||||
* it doesn't consume any memory when idle. | * it doesn't consume any memory when idle. | ||||
* | * | ||||
* TODO: Only step up if the application is actually serving | * TODO: Only step up if the application is actually serving | ||||
* the buffer to better manage the socket buffer resources. | * the buffer to better manage the socket buffer resources. | ||||
*/ | */ | ||||
if (V_tcp_do_autorcvbuf && | if (V_tcp_do_autorcvbuf && | ||||
(to.to_flags & TOF_TS) && | |||||
to.to_tsecr && | to.to_tsecr && | ||||
(so->so_rcv.sb_flags & SB_AUTOSIZE)) { | (so->so_rcv.sb_flags & SB_AUTOSIZE)) { | ||||
if (TSTMP_GT(to.to_tsecr, tp->rfbuf_ts) && | if (TSTMP_GT(to.to_tsecr, tp->rfbuf_ts) && | ||||
to.to_tsecr - tp->rfbuf_ts < hz) { | to.to_tsecr - tp->rfbuf_ts < hz) { | ||||
if (tp->rfbuf_cnt > | if (tp->rfbuf_cnt > | ||||
(so->so_rcv.sb_hiwat / 8 * 7) && | (so->so_rcv.sb_hiwat / 8 * 7) && | ||||
so->so_rcv.sb_hiwat < | so->so_rcv.sb_hiwat < | ||||
V_tcp_autorcvbuf_max) { | V_tcp_autorcvbuf_max) { | ||||
▲ Show 20 Lines • Show All 1,849 Lines • Show Last 20 Lines |