History

tcp: export packets delivery info

Export data delivered and delivered with CE marks to 1) SNMP TCPDelivered and TCPDeliveredCE 2) getsockopt(TCP_INFO) 3) Timestamping API SOF_TIMESTAMPING_OPT_STATS Note that for SCM_TSTAMP_ACK, the delivery info in SOF_TIMESTAMPING_OPT_STATS is reported before the info was fully updated on the ACK. These stats help application monitor TCP delivery and ECN status on per host, per connection, even per message level.

Yuchung Cheng committed 8 years ago

Commit feb5f2e1 parent e21db6f5 files · +20 −2Browse files

Showing the changes to include/uapi/linux (2 of 5 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/snmp.h +2 −0
  2. include/uapi/linux/tcp.h +5 −0
include/uapi/linux/snmp.h+2−0
@@ -276,6 +276,8 @@ enum · 275 unmodified lines
276 LINUX_MIB_TCPKEEPALIVE, /* TCPKeepAlive */276 LINUX_MIB_TCPKEEPALIVE, /* TCPKeepAlive */
277 LINUX_MIB_TCPMTUPFAIL, /* TCPMTUPFail */277 LINUX_MIB_TCPMTUPFAIL, /* TCPMTUPFail */
278 LINUX_MIB_TCPMTUPSUCCESS, /* TCPMTUPSuccess */278 LINUX_MIB_TCPMTUPSUCCESS, /* TCPMTUPSuccess */
279 LINUX_MIB_TCPDELIVERED, /* TCPDelivered */
280 LINUX_MIB_TCPDELIVEREDCE, /* TCPDeliveredCE */
279 __LINUX_MIB_MAX281 __LINUX_MIB_MAX
280};282};
281 283
include/uapi/linux/tcp.h+5−0
@@ -224,6 +224,9 @@ struct tcp_info { · 223 unmodified lines
224 __u64 tcpi_busy_time; /* Time (usec) busy sending data */224 __u64 tcpi_busy_time; /* Time (usec) busy sending data */
225 __u64 tcpi_rwnd_limited; /* Time (usec) limited by receive window */225 __u64 tcpi_rwnd_limited; /* Time (usec) limited by receive window */
226 __u64 tcpi_sndbuf_limited; /* Time (usec) limited by send buffer */226 __u64 tcpi_sndbuf_limited; /* Time (usec) limited by send buffer */
227
228 __u32 tcpi_delivered;
229 __u32 tcpi_delivered_ce;
227};230};
228 231
229/* netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */232/* netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */
@@ -244,6 +247,8 @@ enum { · 14 unmodified lines
244 TCP_NLA_SNDQ_SIZE, /* Data (bytes) pending in send queue */247 TCP_NLA_SNDQ_SIZE, /* Data (bytes) pending in send queue */
245 TCP_NLA_CA_STATE, /* ca_state of socket */248 TCP_NLA_CA_STATE, /* ca_state of socket */
246 TCP_NLA_SND_SSTHRESH, /* Slow start size threshold */249 TCP_NLA_SND_SSTHRESH, /* Slow start size threshold */
250 TCP_NLA_DELIVERED, /* Data pkts delivered incl. out-of-order */
251 TCP_NLA_DELIVERED_CE, /* Like above but only ones w/ CE marks */
247 252
248};253};
249 254