Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107293494
D23364.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D23364.diff
View Options
Index: head/sys/netinet/tcp_input.c
===================================================================
--- head/sys/netinet/tcp_input.c
+++ head/sys/netinet/tcp_input.c
@@ -447,9 +447,15 @@
}
break;
case CC_ECN:
- if (!IN_CONGRECOVERY(tp->t_flags)) {
+ if (!IN_CONGRECOVERY(tp->t_flags) ||
+ /*
+ * Allow ECN reaction on ACK to CWR, if
+ * that data segment was also CE marked.
+ */
+ SEQ_GEQ(th->th_ack, tp->snd_recover)) {
+ EXIT_CONGRECOVERY(tp->t_flags);
TCPSTAT_INC(tcps_ecn_rcwnd);
- tp->snd_recover = tp->snd_max;
+ tp->snd_recover = tp->snd_max + 1;
if (tp->t_flags2 & TF2_ECN_PERMIT)
tp->t_flags2 |= TF2_ECN_SND_CWR;
}
Index: head/sys/netinet/tcp_output.c
===================================================================
--- head/sys/netinet/tcp_output.c
+++ head/sys/netinet/tcp_output.c
@@ -1170,7 +1170,8 @@
*/
if (len > 0 && SEQ_GEQ(tp->snd_nxt, tp->snd_max) &&
(sack_rxmit == 0) &&
- !((tp->t_flags & TF_FORCEDATA) && len == 1)) {
+ !((tp->t_flags & TF_FORCEDATA) && len == 1 &&
+ SEQ_LT(tp->snd_una, tp->snd_max))) {
#ifdef INET6
if (isipv6)
ip6->ip6_flow |= htonl(IPTOS_ECN_ECT0 << 20);
@@ -1178,14 +1179,14 @@
#endif
ip->ip_tos |= IPTOS_ECN_ECT0;
TCPSTAT_INC(tcps_ecn_ect0);
- }
-
- /*
- * Reply with proper ECN notifications.
- */
- if (tp->t_flags2 & TF2_ECN_SND_CWR) {
- flags |= TH_CWR;
- tp->t_flags2 &= ~TF2_ECN_SND_CWR;
+ /*
+ * Reply with proper ECN notifications.
+ * Only set CWR on new data segments.
+ */
+ if (tp->t_flags2 & TF2_ECN_SND_CWR) {
+ flags |= TH_CWR;
+ tp->t_flags2 &= ~TF2_ECN_SND_CWR;
+ }
}
if (tp->t_flags2 & TF2_ECN_SND_ECE)
flags |= TH_ECE;
Index: head/sys/netinet/tcp_stacks/rack.c
===================================================================
--- head/sys/netinet/tcp_stacks/rack.c
+++ head/sys/netinet/tcp_stacks/rack.c
@@ -4095,9 +4095,15 @@
}
break;
case CC_ECN:
- if (!IN_CONGRECOVERY(tp->t_flags)) {
+ if (!IN_CONGRECOVERY(tp->t_flags) ||
+ /*
+ * Allow ECN reaction on ACK to CWR, if
+ * that data segment was also CE marked.
+ */
+ SEQ_GEQ(th->th_ack, tp->snd_recover)) {
+ EXIT_CONGRECOVERY(tp->t_flags);
KMOD_TCPSTAT_INC(tcps_ecn_rcwnd);
- tp->snd_recover = tp->snd_max;
+ tp->snd_recover = tp->snd_max + 1;
if (tp->t_flags2 & TF2_ECN_PERMIT)
tp->t_flags2 |= TF2_ECN_SND_CWR;
}
@@ -13556,13 +13562,14 @@
#endif
ip->ip_tos |= IPTOS_ECN_ECT0;
KMOD_TCPSTAT_INC(tcps_ecn_ect0);
- }
- /*
- * Reply with proper ECN notifications.
- */
- if (tp->t_flags2 & TF2_ECN_SND_CWR) {
- flags |= TH_CWR;
- tp->t_flags2 &= ~TF2_ECN_SND_CWR;
+ /*
+ * Reply with proper ECN notifications.
+ * Only set CWR on new data segments.
+ */
+ if (tp->t_flags2 & TF2_ECN_SND_CWR) {
+ flags |= TH_CWR;
+ tp->t_flags2 &= ~TF2_ECN_SND_CWR;
+ }
}
if (tp->t_flags2 & TF2_ECN_SND_ECE)
flags |= TH_ECE;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 13, 2:53 AM (21 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15775447
Default Alt Text
D23364.diff (2 KB)
Attached To
Mode
D23364: Send CWR only on new data, as per sec. 6.1.2 of RFC3168
Attached
Detach File
Event Timeline
Log In to Comment