Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F139418386
D22497.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
9 KB
Referenced Files
None
Subscribers
None
D22497.diff
View Options
Index: head/sys/netinet/cc/cc_dctcp.c
===================================================================
--- head/sys/netinet/cc/cc_dctcp.c
+++ head/sys/netinet/cc/cc_dctcp.c
@@ -109,7 +109,7 @@
dctcp_data = ccv->cc_data;
- if (CCV(ccv, t_flags) & TF_ECN_PERMIT) {
+ if (CCV(ccv, t_flags2) & TF2_ECN_PERMIT) {
/*
* DCTCP doesn't treat receipt of ECN marked packet as a
* congestion event. Thus, DCTCP always executes the ACK
@@ -168,7 +168,7 @@
{
struct dctcp *dctcp_data;
- if (CCV(ccv, t_flags) & TF_ECN_PERMIT) {
+ if (CCV(ccv, t_flags2) & TF2_ECN_PERMIT) {
dctcp_data = ccv->cc_data;
/* Initialize internal parameters after idle time */
@@ -234,7 +234,7 @@
struct dctcp *dctcp_data;
u_int cwin, mss;
- if (CCV(ccv, t_flags) & TF_ECN_PERMIT) {
+ if (CCV(ccv, t_flags2) & TF2_ECN_PERMIT) {
dctcp_data = ccv->cc_data;
cwin = CCV(ccv, snd_cwnd);
mss = CCV(ccv, t_maxseg);
@@ -284,7 +284,7 @@
dctcp_data->ece_curr = 1;
break;
case CC_RTO:
- CCV(ccv, t_flags) |= TF_ECN_SND_CWR;
+ CCV(ccv, t_flags2) |= TF2_ECN_SND_CWR;
dctcp_update_alpha(ccv);
dctcp_data->save_sndnxt += CCV(ccv, t_maxseg);
dctcp_data->num_cong_events++;
@@ -301,7 +301,7 @@
dctcp_data = ccv->cc_data;
- if (CCV(ccv, t_flags) & TF_ECN_PERMIT)
+ if (CCV(ccv, t_flags2) & TF2_ECN_PERMIT)
dctcp_data->save_sndnxt = CCV(ccv, snd_nxt);
}
@@ -313,7 +313,7 @@
{
newreno_cc_algo.post_recovery(ccv);
- if (CCV(ccv, t_flags) & TF_ECN_PERMIT)
+ if (CCV(ccv, t_flags2) & TF2_ECN_PERMIT)
dctcp_update_alpha(ccv);
}
@@ -344,12 +344,12 @@
if (!dctcp_data->ce_prev && (ccflag & CCF_DELACK))
delay_ack = 0;
dctcp_data->ce_prev = 1;
- CCV(ccv, t_flags) |= TF_ECN_SND_ECE;
+ CCV(ccv, t_flags2) |= TF2_ECN_SND_ECE;
} else {
if (dctcp_data->ce_prev && (ccflag & CCF_DELACK))
delay_ack = 0;
dctcp_data->ce_prev = 0;
- CCV(ccv, t_flags) &= ~TF_ECN_SND_ECE;
+ CCV(ccv, t_flags2) &= ~TF2_ECN_SND_ECE;
}
/* DCTCP sets delayed ack when this segment sets the CWR flag. */
Index: head/sys/netinet/tcp_input.c
===================================================================
--- head/sys/netinet/tcp_input.c
+++ head/sys/netinet/tcp_input.c
@@ -397,16 +397,16 @@
case CC_NDUPACK:
if (!IN_FASTRECOVERY(tp->t_flags)) {
tp->snd_recover = tp->snd_max;
- if (tp->t_flags & TF_ECN_PERMIT)
- tp->t_flags |= TF_ECN_SND_CWR;
+ if (tp->t_flags2 & TF2_ECN_PERMIT)
+ tp->t_flags2 |= TF2_ECN_SND_CWR;
}
break;
case CC_ECN:
if (!IN_CONGRECOVERY(tp->t_flags)) {
TCPSTAT_INC(tcps_ecn_rcwnd);
tp->snd_recover = tp->snd_max;
- if (tp->t_flags & TF_ECN_PERMIT)
- tp->t_flags |= TF_ECN_SND_CWR;
+ if (tp->t_flags2 & TF2_ECN_PERMIT)
+ tp->t_flags2 |= TF2_ECN_SND_CWR;
}
break;
case CC_RTO:
@@ -1500,12 +1500,12 @@
/*
* TCP ECN processing.
*/
- if (tp->t_flags & TF_ECN_PERMIT) {
+ if (tp->t_flags2 & TF2_ECN_PERMIT) {
if (thflags & TH_CWR)
- tp->t_flags &= ~TF_ECN_SND_ECE;
+ tp->t_flags2 &= ~TF2_ECN_SND_ECE;
switch (iptos & IPTOS_ECN_MASK) {
case IPTOS_ECN_CE:
- tp->t_flags |= TF_ECN_SND_ECE;
+ tp->t_flags2 |= TF2_ECN_SND_ECE;
TCPSTAT_INC(tcps_ecn_ce);
break;
case IPTOS_ECN_ECT0:
@@ -1934,7 +1934,7 @@
if (((thflags & (TH_CWR | TH_ECE)) == TH_ECE) &&
V_tcp_do_ecn) {
- tp->t_flags |= TF_ECN_PERMIT;
+ tp->t_flags2 |= TF2_ECN_PERMIT;
TCPSTAT_INC(tcps_ecn_shs);
}
Index: head/sys/netinet/tcp_output.c
===================================================================
--- head/sys/netinet/tcp_output.c
+++ head/sys/netinet/tcp_output.c
@@ -1135,7 +1135,7 @@
}
if (tp->t_state == TCPS_ESTABLISHED &&
- (tp->t_flags & TF_ECN_PERMIT)) {
+ (tp->t_flags2 & TF2_ECN_PERMIT)) {
/*
* If the peer has ECN, mark data packets with
* ECN capable transmission (ECT).
@@ -1155,11 +1155,11 @@
/*
* Reply with proper ECN notifications.
*/
- if (tp->t_flags & TF_ECN_SND_CWR) {
+ if (tp->t_flags2 & TF2_ECN_SND_CWR) {
flags |= TH_CWR;
- tp->t_flags &= ~TF_ECN_SND_CWR;
+ tp->t_flags2 &= ~TF2_ECN_SND_CWR;
}
- if (tp->t_flags & TF_ECN_SND_ECE)
+ 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
@@ -1811,16 +1811,16 @@
rack_log_to_prr(rack, 2);
rack->r_ctl.rc_prr_recovery_fs = tp->snd_max - tp->snd_una;
tp->snd_recover = tp->snd_max;
- if (tp->t_flags & TF_ECN_PERMIT)
- tp->t_flags |= TF_ECN_SND_CWR;
+ if (tp->t_flags2 & TF2_ECN_PERMIT)
+ tp->t_flags2 |= TF2_ECN_SND_CWR;
}
break;
case CC_ECN:
if (!IN_CONGRECOVERY(tp->t_flags)) {
TCPSTAT_INC(tcps_ecn_rcwnd);
tp->snd_recover = tp->snd_max;
- if (tp->t_flags & TF_ECN_PERMIT)
- tp->t_flags |= TF_ECN_SND_CWR;
+ if (tp->t_flags2 & TF2_ECN_PERMIT)
+ tp->t_flags2 |= TF2_ECN_SND_CWR;
}
break;
case CC_RTO:
@@ -6309,7 +6309,7 @@
if (((thflags & (TH_CWR | TH_ECE)) == TH_ECE) &&
V_tcp_do_ecn) {
- tp->t_flags |= TF_ECN_PERMIT;
+ tp->t_flags2 |= TF2_ECN_PERMIT;
TCPSTAT_INC(tcps_ecn_shs);
}
if (SEQ_GT(th->th_ack, tp->snd_una)) {
@@ -7710,12 +7710,12 @@
* TCP ECN processing. XXXJTL: If we ever use ECN, we need to move
* this to occur after we've validated the segment.
*/
- if (tp->t_flags & TF_ECN_PERMIT) {
+ if (tp->t_flags2 & TF2_ECN_PERMIT) {
if (thflags & TH_CWR)
- tp->t_flags &= ~TF_ECN_SND_ECE;
+ tp->t_flags2 &= ~TF2_ECN_SND_ECE;
switch (iptos & IPTOS_ECN_MASK) {
case IPTOS_ECN_CE:
- tp->t_flags |= TF_ECN_SND_ECE;
+ tp->t_flags2 |= TF2_ECN_SND_ECE;
TCPSTAT_INC(tcps_ecn_ce);
break;
case IPTOS_ECN_ECT0:
@@ -9472,7 +9472,7 @@
flags |= TH_ECE | TH_CWR;
}
if (tp->t_state == TCPS_ESTABLISHED &&
- (tp->t_flags & TF_ECN_PERMIT)) {
+ (tp->t_flags2 & TF2_ECN_PERMIT)) {
/*
* If the peer has ECN, mark data packets with ECN capable
* transmission (ECT). Ignore pure ack packets,
@@ -9491,11 +9491,11 @@
/*
* Reply with proper ECN notifications.
*/
- if (tp->t_flags & TF_ECN_SND_CWR) {
+ if (tp->t_flags2 & TF2_ECN_SND_CWR) {
flags |= TH_CWR;
- tp->t_flags &= ~TF_ECN_SND_CWR;
+ tp->t_flags2 &= ~TF2_ECN_SND_CWR;
}
- if (tp->t_flags & TF_ECN_SND_ECE)
+ if (tp->t_flags2 & TF2_ECN_SND_ECE)
flags |= TH_ECE;
}
/*
Index: head/sys/netinet/tcp_syncache.c
===================================================================
--- head/sys/netinet/tcp_syncache.c
+++ head/sys/netinet/tcp_syncache.c
@@ -1023,7 +1023,7 @@
}
if (sc->sc_flags & SCF_ECN)
- tp->t_flags |= TF_ECN_PERMIT;
+ tp->t_flags2 |= TF2_ECN_PERMIT;
/*
* Set up MSS and get cached values from tcp_hostcache.
Index: head/sys/netinet/tcp_usrreq.c
===================================================================
--- head/sys/netinet/tcp_usrreq.c
+++ head/sys/netinet/tcp_usrreq.c
@@ -1572,7 +1572,7 @@
ti->tcpi_snd_wscale = tp->snd_scale;
ti->tcpi_rcv_wscale = tp->rcv_scale;
}
- if (tp->t_flags & TF_ECN_PERMIT)
+ if (tp->t_flags2 & TF2_ECN_PERMIT)
ti->tcpi_options |= TCPI_OPT_ECN;
ti->tcpi_rto = tp->t_rxtcur * tick;
@@ -2610,10 +2610,6 @@
db_printf("%sTF_TSO", comma ? ", " : "");
comma = 1;
}
- if (t_flags & TF_ECN_PERMIT) {
- db_printf("%sTF_ECN_PERMIT", comma ? ", " : "");
- comma = 1;
- }
if (t_flags & TF_FASTOPEN) {
db_printf("%sTF_FASTOPEN", comma ? ", " : "");
comma = 1;
@@ -2621,6 +2617,19 @@
}
static void
+db_print_tflags2(u_int t_flags2)
+{
+ int comma;
+
+ comma = 0;
+ if (t_flags2 & TF2_ECN_PERMIT) {
+ db_printf("%sTF2_ECN_PERMIT", comma ? ", " : "");
+ comma = 1;
+ }
+}
+
+
+static void
db_print_toobflags(char t_oobflags)
{
int comma;
@@ -2665,6 +2674,11 @@
db_print_indent(indent);
db_printf("t_flags: 0x%x (", tp->t_flags);
db_print_tflags(tp->t_flags);
+ db_printf(")\n");
+
+ db_print_indent(indent);
+ db_printf("t_flags2: 0x%x (", tp->t_flags2);
+ db_print_tflags2(tp->t_flags2);
db_printf(")\n");
db_print_indent(indent);
Index: head/sys/netinet/tcp_var.h
===================================================================
--- head/sys/netinet/tcp_var.h
+++ head/sys/netinet/tcp_var.h
@@ -326,6 +326,8 @@
#define TF_NEEDFIN 0x00000800 /* send FIN (implicit state) */
#define TF_NOPUSH 0x00001000 /* don't push */
#define TF_PREVVALID 0x00002000 /* saved values for bad rxmit valid */
+#define TF_UNUSED1 0x00004000 /* unused */
+#define TF_UNUSED2 0x00008000 /* unused */
#define TF_MORETOCOME 0x00010000 /* More data to be appended to sock */
#define TF_LQ_OVERFLOW 0x00020000 /* listen queue overflow */
#define TF_LASTIDLE 0x00040000 /* connection was previously idle */
@@ -336,9 +338,9 @@
#define TF_FORCEDATA 0x00800000 /* force out a byte */
#define TF_TSO 0x01000000 /* TSO enabled on this connection */
#define TF_TOE 0x02000000 /* this connection is offloaded */
-#define TF_ECN_PERMIT 0x04000000 /* connection ECN-ready */
-#define TF_ECN_SND_CWR 0x08000000 /* ECN CWR in queue */
-#define TF_ECN_SND_ECE 0x10000000 /* ECN ECE in queue */
+#define TF_UNUSED3 0x04000000 /* unused */
+#define TF_UNUSED4 0x08000000 /* unused */
+#define TF_UNUSED5 0x10000000 /* unused */
#define TF_CONGRECOVERY 0x20000000 /* congestion recovery mode */
#define TF_WASCRECOVERY 0x40000000 /* was in congestion recovery */
#define TF_FASTOPEN 0x80000000 /* TCP Fast Open indication */
@@ -377,6 +379,10 @@
#define TF2_PLPMTU_MAXSEGSNT 0x00000004 /* Last seg sent was full seg. */
#define TF2_LOG_AUTO 0x00000008 /* Session is auto-logging. */
#define TF2_DROP_AF_DATA 0x00000010 /* Drop after all data ack'd */
+#define TF2_ECN_PERMIT 0x00000020 /* connection ECN-ready */
+#define TF2_ECN_SND_CWR 0x00000040 /* ECN CWR in queue */
+#define TF2_ECN_SND_ECE 0x00000080 /* ECN ECE in queue */
+#define TF2_ACE_PERMIT 0x00000100 /* Accurate ECN mode */
/*
* Structure to hold TCP options that are only used during segment
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 12, 8:54 PM (2 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26912330
Default Alt Text
D22497.diff (9 KB)
Attached To
Mode
D22497: Moving all ECN related flags to flags2
Attached
Detach File
Event Timeline
Log In to Comment