Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F97642495
D34376.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D34376.diff
View Options
diff --git a/sys/netinet/tcp_ecn.h b/sys/netinet/tcp_ecn.h
--- a/sys/netinet/tcp_ecn.h
+++ b/sys/netinet/tcp_ecn.h
@@ -45,7 +45,7 @@
void tcp_ecn_input_parallel_syn(struct tcpcb *, uint16_t, int);
int tcp_ecn_input_segment(struct tcpcb *, uint16_t, int);
uint16_t tcp_ecn_output_syn_sent(struct tcpcb *);
-int tcp_ecn_output_established(struct tcpcb *, uint16_t *, int);
+int tcp_ecn_output_established(struct tcpcb *, uint16_t *, int, bool);
void tcp_ecn_syncache_socket(struct tcpcb *, struct syncache *);
int tcp_ecn_syncache_add(uint16_t, int);
uint16_t tcp_ecn_syncache_respond(uint16_t, struct syncache *);
diff --git a/sys/netinet/tcp_ecn.c b/sys/netinet/tcp_ecn.c
--- a/sys/netinet/tcp_ecn.c
+++ b/sys/netinet/tcp_ecn.c
@@ -201,7 +201,7 @@
* returning IP ECN header codepoint
*/
int
-tcp_ecn_output_established(struct tcpcb *tp, uint16_t *thflags, int len)
+tcp_ecn_output_established(struct tcpcb *tp, uint16_t *thflags, int len, bool rxmit)
{
int ipecn = IPTOS_ECN_NOTECT;
bool newdata;
@@ -213,6 +213,7 @@
* and window probes.
*/
newdata = (len > 0 && SEQ_GEQ(tp->snd_nxt, tp->snd_max) &&
+ !rxmit &&
!((tp->t_flags & TF_FORCEDATA) && len == 1));
if (newdata) {
ipecn = IPTOS_ECN_ECT0;
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1206,7 +1206,7 @@
/* Also handle parallel SYN for ECN */
if ((TCPS_HAVERCVDSYN(tp->t_state)) &&
(tp->t_flags2 & TF2_ECN_PERMIT)) {
- int ect = tcp_ecn_output_established(tp, &flags, len);
+ int ect = tcp_ecn_output_established(tp, &flags, len, sack_rxmit);
if ((tp->t_state == TCPS_SYN_RECEIVED) &&
(tp->t_flags2 & TF2_ECN_SND_ECE))
tp->t_flags2 &= ~TF2_ECN_SND_ECE;
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
@@ -15742,7 +15742,7 @@
m->m_pkthdr.rcvif = (struct ifnet *)0;
if (TCPS_HAVERCVDSYN(tp->t_state) &&
(tp->t_flags2 & TF2_ECN_PERMIT)) {
- int ect = tcp_ecn_output_established(tp, &flags, len);
+ int ect = tcp_ecn_output_established(tp, &flags, len, true);
if ((tp->t_state == TCPS_SYN_RECEIVED) &&
(tp->t_flags2 & TF2_ECN_SND_ECE))
tp->t_flags2 &= ~TF2_ECN_SND_ECE;
@@ -16233,7 +16233,7 @@
m->m_pkthdr.rcvif = (struct ifnet *)0;
if (TCPS_HAVERCVDSYN(tp->t_state) &&
(tp->t_flags2 & TF2_ECN_PERMIT)) {
- int ect = tcp_ecn_output_established(tp, &flags, len);
+ int ect = tcp_ecn_output_established(tp, &flags, len, false);
if ((tp->t_state == TCPS_SYN_RECEIVED) &&
(tp->t_flags2 & TF2_ECN_SND_ECE))
tp->t_flags2 &= ~TF2_ECN_SND_ECE;
@@ -18278,7 +18278,7 @@
/* Also handle parallel SYN for ECN */
if (TCPS_HAVERCVDSYN(tp->t_state) &&
(tp->t_flags2 & TF2_ECN_PERMIT)) {
- int ect = tcp_ecn_output_established(tp, &flags, len);
+ int ect = tcp_ecn_output_established(tp, &flags, len, sack_rxmit);
if ((tp->t_state == TCPS_SYN_RECEIVED) &&
(tp->t_flags2 & TF2_ECN_SND_ECE))
tp->t_flags2 &= ~TF2_ECN_SND_ECE;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 1, 1:24 PM (22 h, 21 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13252956
Default Alt Text
D34376.diff (3 KB)
Attached To
Mode
D34376: tcp: Restore correct ECT marking behavior on SACK retransmissions
Attached
Detach File
Event Timeline
Log In to Comment