mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +00:00
tcp: allow window scale and timestamps to be toggled individually
Simple change to allow for the individual toggling of RFC7323 window scaling and timestamp option. Reviewed By: rrs, tuexen, glebius, guest-ccui, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D36863
This commit is contained in:
parent
3a91cecea4
commit
0924ae8f47
@ -892,7 +892,18 @@ minimum, which gives us an effective minimum of 200ms (similar to
|
|||||||
The initial value is used before an RTT measurement has been performed.
|
The initial value is used before an RTT measurement has been performed.
|
||||||
.It Va rfc1323
|
.It Va rfc1323
|
||||||
Implement the window scaling and timestamp options of RFC 1323/RFC 7323
|
Implement the window scaling and timestamp options of RFC 1323/RFC 7323
|
||||||
(default is true).
|
(default is 1).
|
||||||
|
Settings:
|
||||||
|
.Bl -tag -compact
|
||||||
|
.It 0
|
||||||
|
Disable window scaling and timestamp option.
|
||||||
|
.It 1
|
||||||
|
Enable window scaling and timestamp option.
|
||||||
|
.It 2
|
||||||
|
Enable only window scaling.
|
||||||
|
.It 3
|
||||||
|
Enable only timestamp option.
|
||||||
|
.El
|
||||||
.It Va rfc3042
|
.It Va rfc3042
|
||||||
Enable the Limited Transmit algorithm as described in RFC 3042.
|
Enable the Limited Transmit algorithm as described in RFC 3042.
|
||||||
It helps avoid timeouts on lossy links and also when the congestion window
|
It helps avoid timeouts on lossy links and also when the congestion window
|
||||||
|
@ -2280,8 +2280,20 @@ tcp_newtcpcb(struct inpcb *inp)
|
|||||||
callout_init(&tp->t_timers->tt_2msl, 1);
|
callout_init(&tp->t_timers->tt_2msl, 1);
|
||||||
callout_init(&tp->t_timers->tt_delack, 1);
|
callout_init(&tp->t_timers->tt_delack, 1);
|
||||||
|
|
||||||
if (V_tcp_do_rfc1323)
|
switch (V_tcp_do_rfc1323) {
|
||||||
|
case 0:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
case 1:
|
||||||
tp->t_flags = (TF_REQ_SCALE|TF_REQ_TSTMP);
|
tp->t_flags = (TF_REQ_SCALE|TF_REQ_TSTMP);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
tp->t_flags = TF_REQ_SCALE;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
tp->t_flags = TF_REQ_TSTMP;
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (V_tcp_do_sack)
|
if (V_tcp_do_sack)
|
||||||
tp->t_flags |= TF_SACK_PERMIT;
|
tp->t_flags |= TF_SACK_PERMIT;
|
||||||
TAILQ_INIT(&tp->snd_holes);
|
TAILQ_INIT(&tp->snd_holes);
|
||||||
|
Loading…
Reference in New Issue
Block a user