Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162633319
D54072.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D54072.diff
View Options
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -2535,8 +2535,7 @@
}
if (th->th_ack == tp->snd_una) {
/* Check if this is a duplicate ACK. */
- if ((tp->t_flags & TF_SACK_PERMIT) &&
- V_tcp_do_newsack) {
+ if (tp->t_flags & TF_SACK_PERMIT) {
/*
* If SEG.ACK == SND.UNA, RFC 6675 requires a
* duplicate ACK to selectively acknowledge
@@ -2613,7 +2612,6 @@
goto drop;
} else if (tp->t_dupacks == tcprexmtthresh ||
(tp->t_flags & TF_SACK_PERMIT &&
- V_tcp_do_newsack &&
tp->sackhint.sacked_bytes >
(tcprexmtthresh - 1) * maxseg)) {
enter_recovery:
@@ -2780,8 +2778,7 @@
* from the left side. Such partial ACKs should not be
* counted as dupacks here.
*/
- if (V_tcp_do_newsack &&
- tcp_is_sack_recovery(tp, &to) &&
+ if (tcp_is_sack_recovery(tp, &to) &&
(((tp->t_rxtshift == 0) && (sack_changed != SACK_NOCHANGE)) ||
((tp->t_rxtshift > 0) && (sack_changed == SACK_NEWLOSS))) &&
(tp->snd_nxt == tp->snd_max)) {
@@ -4120,13 +4117,11 @@
if (tp->t_fb->tfb_compute_pipe != NULL) {
pipe = (*tp->t_fb->tfb_compute_pipe)(tp);
- } else if (V_tcp_do_newsack) {
+ } else {
pipe = tp->snd_max - tp->snd_una +
tp->sackhint.sack_bytes_rexmit -
tp->sackhint.sacked_bytes -
tp->sackhint.lost_bytes;
- } else {
- pipe = tp->snd_nxt - tp->snd_fack + tp->sackhint.sack_bytes_rexmit;
}
return (imax(pipe, 0));
}
diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c
--- a/sys/netinet/tcp_sack.c
+++ b/sys/netinet/tcp_sack.c
@@ -126,28 +126,6 @@
&VNET_NAME(tcp_do_sack), 0,
"Enable/Disable TCP SACK support");
-VNET_DEFINE(int, tcp_do_newsack) = 1;
-
-static int
-sysctl_net_inet_tcp_sack_revised(SYSCTL_HANDLER_ARGS)
-{
- int error;
- int new;
-
- new = V_tcp_do_newsack;
- error = sysctl_handle_int(oidp, &new, 0, req);
- if (error == 0 && req->newptr) {
- V_tcp_do_newsack = new;
- gone_in(16, "net.inet.tcp.sack.revised will be deprecated."
- " net.inet.tcp.sack.enable will always follow RFC6675 SACK.\n");
- }
- return (error);
-}
-
-SYSCTL_PROC(_net_inet_tcp_sack, OID_AUTO, revised, CTLFLAG_VNET | CTLFLAG_RW | CTLTYPE_INT,
- &VNET_NAME(tcp_do_newsack), 0, sysctl_net_inet_tcp_sack_revised, "CU",
- "Use revised SACK loss recovery per RFC 6675");
-
VNET_DEFINE(int, tcp_do_lrd) = 1;
SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, lrd, CTLFLAG_VNET | CTLFLAG_RW,
&VNET_NAME(tcp_do_lrd), 1,
@@ -1013,8 +991,7 @@
* the trailing packets of a window are lost and no further data
* is available for sending.
*/
- if ((V_tcp_do_newsack) &&
- SEQ_LT(th->th_ack, tp->snd_recover) &&
+ if (SEQ_LT(th->th_ack, tp->snd_recover) &&
TAILQ_EMPTY(&tp->snd_holes) &&
(tp->sackhint.delivered_data > 0)) {
/*
@@ -1079,22 +1056,6 @@
}
KASSERT(SEQ_LT(hole->start, hole->end),
("%s: SEQ_GEQ(hole.start, hole.end)", __func__));
- if (!(V_tcp_do_newsack)) {
- KASSERT(SEQ_LT(hole->start, tp->snd_fack),
- ("%s: SEG_GEQ(hole.start, snd.fack)", __func__));
- KASSERT(SEQ_LT(hole->end, tp->snd_fack),
- ("%s: SEG_GEQ(hole.end, snd.fack)", __func__));
- KASSERT(SEQ_LT(hole->rxmit, tp->snd_fack),
- ("%s: SEQ_GEQ(hole.rxmit, snd.fack)", __func__));
- if (SEQ_GEQ(hole->start, hole->end) ||
- SEQ_GEQ(hole->start, tp->snd_fack) ||
- SEQ_GEQ(hole->end, tp->snd_fack) ||
- SEQ_GEQ(hole->rxmit, tp->snd_fack)) {
- log(LOG_CRIT,"tcp: invalid SACK hole (%u-%u,%u) vs fwd ack %u, ignoring.\n",
- hole->start, hole->end, hole->rxmit, tp->snd_fack);
- return (NULL);
- }
- }
return (hole);
}
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -5393,7 +5393,7 @@
log.u_bbr.flex4 = tp->t_ccv.nsegs;
log.u_bbr.flex5 = labc_to_use;
log.u_bbr.flex6 = prior_cwnd;
- log.u_bbr.flex7 = V_tcp_do_newsack;
+ log.u_bbr.flex7 = 1; /* always doing RFC6675 SACK */
log.u_bbr.flex8 = 1;
lgb = tcp_log_event(tp, NULL, NULL, NULL, BBR_LOG_CWND, 0,
0, &log, false, NULL, __func__, __LINE__,&tv);
@@ -5508,7 +5508,7 @@
log.u_bbr.flex4 = tp->t_ccv.nsegs;
log.u_bbr.flex5 = V_tcp_abc_l_var;
log.u_bbr.flex6 = orig_cwnd;
- log.u_bbr.flex7 = V_tcp_do_newsack;
+ log.u_bbr.flex7 = 1; /* always doing RFC6675 SACK */
log.u_bbr.pkts_out = rack->r_ctl.rc_prr_sndcnt;
log.u_bbr.flex8 = 2;
tcp_log_event(tp, NULL, NULL, NULL, BBR_LOG_CWND, 0,
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -1308,7 +1308,6 @@
VNET_DECLARE(int, tcp_do_rfc3042);
VNET_DECLARE(int, tcp_do_rfc3390);
VNET_DECLARE(int, tcp_do_rfc3465);
-VNET_DECLARE(int, tcp_do_newsack);
VNET_DECLARE(int, tcp_do_sack);
VNET_DECLARE(int, tcp_do_tso);
VNET_DECLARE(int, tcp_ecn_maxretries);
@@ -1359,7 +1358,6 @@
#define V_tcp_do_rfc3042 VNET(tcp_do_rfc3042)
#define V_tcp_do_rfc3390 VNET(tcp_do_rfc3390)
#define V_tcp_do_rfc3465 VNET(tcp_do_rfc3465)
-#define V_tcp_do_newsack VNET(tcp_do_newsack)
#define V_tcp_do_sack VNET(tcp_do_sack)
#define V_tcp_do_tso VNET(tcp_do_tso)
#define V_tcp_ecn_maxretries VNET(tcp_ecn_maxretries)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 16, 6:57 AM (11 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35127755
Default Alt Text
D54072.diff (5 KB)
Attached To
Mode
D54072: tcp: retire do_newsack - always adhere to RFC6675
Attached
Detach File
Event Timeline
Log In to Comment