Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109269506
D37280.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D37280.diff
View Options
diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h
--- a/sys/netinet/tcp.h
+++ b/sys/netinet/tcp.h
@@ -390,7 +390,8 @@
u_int32_t tcpi_snd_zerowin; /* Zero-sized windows sent */
/* Accurate ECN counters. */
- u_int32_t __tcpi_received_ce; /* # of CE marks received */
+ u_int32_t tcpi_delivered_ce;
+ u_int32_t tcpi_received_ce; /* # of CE marks received */
u_int32_t __tcpi_delivered_e1_bytes;
u_int32_t __tcpi_delivered_e0_bytes;
u_int32_t __tcpi_delivered_ce_bytes;
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
@@ -325,8 +325,10 @@
}
} else {
/* RFC3168 ECN handling */
- if ((thflags & (TH_SYN | TH_ECE)) == TH_ECE)
+ if ((thflags & (TH_SYN | TH_ECE)) == TH_ECE) {
delta_ace = 1;
+ tp->t_scep++;
+ }
if (thflags & TH_CWR) {
tp->t_flags2 &= ~TF2_ECN_SND_ECE;
tp->t_flags |= TF_ACKNOW;
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1640,6 +1640,19 @@
tcp_offload_tcp_info(tp, ti);
}
#endif
+ /*
+ * AccECN related counters.
+ */
+ if ((tp->t_flags2 & (TF2_ECN_PERMIT | TF2_ACE_PERMIT)) ==
+ (TF2_ECN_PERMIT | TF2_ACE_PERMIT))
+ /*
+ * Internal counter starts at 5 for AccECN
+ * but 0 for RFC3168 ECN.
+ */
+ ti->tcpi_delivered_ce = tp->t_scep - 5;
+ else
+ ti->tcpi_delivered_ce = tp->t_scep;
+ ti->tcpi_received_ce = tp->t_rcep;
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 3, 8:32 PM (21 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16442120
Default Alt Text
D37280.diff (1 KB)
Attached To
Mode
D37280: tcp: add AccECN CE packet counter to tcpinfo
Attached
Detach File
Event Timeline
Log In to Comment