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
276276 LINUX_MIB_TCPKEEPALIVE, /* TCPKeepAlive */
277277 LINUX_MIB_TCPMTUPFAIL, /* TCPMTUPFail */
278278 LINUX_MIB_TCPMTUPSUCCESS, /* TCPMTUPSuccess */
279+ LINUX_MIB_TCPDELIVERED, /* TCPDelivered */
280+ LINUX_MIB_TCPDELIVEREDCE, /* TCPDeliveredCE */
279281 __LINUX_MIB_MAX
280282 };
281283
include/uapi/linux/tcp.h+5−0
@@ -224,6 +224,9 @@ struct tcp_info { · 223 unmodified lines
224224 __u64 tcpi_busy_time; /* Time (usec) busy sending data */
225225 __u64 tcpi_rwnd_limited; /* Time (usec) limited by receive window */
226226 __u64 tcpi_sndbuf_limited; /* Time (usec) limited by send buffer */
227+
228+ __u32 tcpi_delivered;
229+ __u32 tcpi_delivered_ce;
227230 };
228231
229232 /* netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */
@@ -244,6 +247,8 @@ enum { · 14 unmodified lines
244247 TCP_NLA_SNDQ_SIZE, /* Data (bytes) pending in send queue */
245248 TCP_NLA_CA_STATE, /* ca_state of socket */
246249 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 */
247252
248253 };
249254