summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorFrancis Yan <francisyyan@gmail.com>2016-11-28 02:07:18 -0500
committerDavid S. Miller <davem@davemloft.net>2016-11-30 10:04:25 -0500
commit1c885808e45601b2b6f68b30ac1d999e10b6f606 (patch)
tree4878c60feb2769477239b63194ce5946129bcd75 /arch
parentefd90174167530c67a54273fd5d8369c87f9bd32 (diff)
tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING
This patch exports the sender chronograph stats via the socket SO_TIMESTAMPING channel. Currently we can instrument how long a particular application unit of data was queued in TCP by tracking SOF_TIMESTAMPING_TX_SOFTWARE and SOF_TIMESTAMPING_TX_SCHED. Having these sender chronograph stats exported simultaneously along with these timestamps allow further breaking down the various sender limitation. For example, a video server can tell if a particular chunk of video on a connection takes a long time to deliver because TCP was experiencing small receive window. It is not possible to tell before this patch without packet traces. To prepare these stats, the user needs to set SOF_TIMESTAMPING_OPT_STATS and SOF_TIMESTAMPING_OPT_TSONLY flags while requesting other SOF_TIMESTAMPING TX timestamps. When the timestamps are available in the error queue, the stats are returned in a separate control message of type SCM_TIMESTAMPING_OPT_STATS, in a list of TLVs (struct nlattr) of types: TCP_NLA_BUSY_TIME, TCP_NLA_RWND_LIMITED, TCP_NLA_SNDBUF_LIMITED. Unit is microsecond. Signed-off-by: Francis Yan <francisyyan@gmail.com> Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/include/uapi/asm/socket.h2
-rw-r--r--arch/frv/include/uapi/asm/socket.h2
-rw-r--r--arch/ia64/include/uapi/asm/socket.h2
-rw-r--r--arch/m32r/include/uapi/asm/socket.h2
-rw-r--r--arch/mips/include/uapi/asm/socket.h2
-rw-r--r--arch/mn10300/include/uapi/asm/socket.h2
-rw-r--r--arch/parisc/include/uapi/asm/socket.h2
-rw-r--r--arch/powerpc/include/uapi/asm/socket.h2
-rw-r--r--arch/s390/include/uapi/asm/socket.h2
-rw-r--r--arch/sparc/include/uapi/asm/socket.h2
-rw-r--r--arch/xtensa/include/uapi/asm/socket.h2
11 files changed, 22 insertions, 0 deletions
diff --git a/arch/alpha/include/uapi/asm/socket.h b/arch/alpha/include/uapi/asm/socket.h
index 9e46d6e656d9..afc901b7a6f6 100644
--- a/arch/alpha/include/uapi/asm/socket.h
+++ b/arch/alpha/include/uapi/asm/socket.h
@@ -97,4 +97,6 @@
97 97
98#define SO_CNX_ADVICE 53 98#define SO_CNX_ADVICE 53
99 99
100#define SCM_TIMESTAMPING_OPT_STATS 54
101
100#endif /* _UAPI_ASM_SOCKET_H */ 102#endif /* _UAPI_ASM_SOCKET_H */
diff --git a/arch/frv/include/uapi/asm/socket.h b/arch/frv/include/uapi/asm/socket.h
index afbc98f02d27..81e03530ed39 100644
--- a/arch/frv/include/uapi/asm/socket.h
+++ b/arch/frv/include/uapi/asm/socket.h
@@ -90,5 +90,7 @@
90 90
91#define SO_CNX_ADVICE 53 91#define SO_CNX_ADVICE 53
92 92
93#define SCM_TIMESTAMPING_OPT_STATS 54
94
93#endif /* _ASM_SOCKET_H */ 95#endif /* _ASM_SOCKET_H */
94 96
diff --git a/arch/ia64/include/uapi/asm/socket.h b/arch/ia64/include/uapi/asm/socket.h
index 0018fad9039f..57feb0c1f7d7 100644
--- a/arch/ia64/include/uapi/asm/socket.h
+++ b/arch/ia64/include/uapi/asm/socket.h
@@ -99,4 +99,6 @@
99 99
100#define SO_CNX_ADVICE 53 100#define SO_CNX_ADVICE 53
101 101
102#define SCM_TIMESTAMPING_OPT_STATS 54
103
102#endif /* _ASM_IA64_SOCKET_H */ 104#endif /* _ASM_IA64_SOCKET_H */
diff --git a/arch/m32r/include/uapi/asm/socket.h b/arch/m32r/include/uapi/asm/socket.h
index 5fe42fc7b6c5..5853f8e92c20 100644
--- a/arch/m32r/include/uapi/asm/socket.h
+++ b/arch/m32r/include/uapi/asm/socket.h
@@ -90,4 +90,6 @@
90 90
91#define SO_CNX_ADVICE 53 91#define SO_CNX_ADVICE 53
92 92
93#define SCM_TIMESTAMPING_OPT_STATS 54
94
93#endif /* _ASM_M32R_SOCKET_H */ 95#endif /* _ASM_M32R_SOCKET_H */
diff --git a/arch/mips/include/uapi/asm/socket.h b/arch/mips/include/uapi/asm/socket.h
index 2027240aafbb..566ecdcb5b4b 100644
--- a/arch/mips/include/uapi/asm/socket.h
+++ b/arch/mips/include/uapi/asm/socket.h
@@ -108,4 +108,6 @@
108 108
109#define SO_CNX_ADVICE 53 109#define SO_CNX_ADVICE 53
110 110
111#define SCM_TIMESTAMPING_OPT_STATS 54
112
111#endif /* _UAPI_ASM_SOCKET_H */ 113#endif /* _UAPI_ASM_SOCKET_H */
diff --git a/arch/mn10300/include/uapi/asm/socket.h b/arch/mn10300/include/uapi/asm/socket.h
index 5129f23a9ee1..0e12527c4b0e 100644
--- a/arch/mn10300/include/uapi/asm/socket.h
+++ b/arch/mn10300/include/uapi/asm/socket.h
@@ -90,4 +90,6 @@
90 90
91#define SO_CNX_ADVICE 53 91#define SO_CNX_ADVICE 53
92 92
93#define SCM_TIMESTAMPING_OPT_STATS 54
94
93#endif /* _ASM_SOCKET_H */ 95#endif /* _ASM_SOCKET_H */
diff --git a/arch/parisc/include/uapi/asm/socket.h b/arch/parisc/include/uapi/asm/socket.h
index 9c935d717df9..7a109b73ddf7 100644
--- a/arch/parisc/include/uapi/asm/socket.h
+++ b/arch/parisc/include/uapi/asm/socket.h
@@ -89,4 +89,6 @@
89 89
90#define SO_CNX_ADVICE 0x402E 90#define SO_CNX_ADVICE 0x402E
91 91
92#define SCM_TIMESTAMPING_OPT_STATS 0x402F
93
92#endif /* _UAPI_ASM_SOCKET_H */ 94#endif /* _UAPI_ASM_SOCKET_H */
diff --git a/arch/powerpc/include/uapi/asm/socket.h b/arch/powerpc/include/uapi/asm/socket.h
index 1672e3398270..44583a52f882 100644
--- a/arch/powerpc/include/uapi/asm/socket.h
+++ b/arch/powerpc/include/uapi/asm/socket.h
@@ -97,4 +97,6 @@
97 97
98#define SO_CNX_ADVICE 53 98#define SO_CNX_ADVICE 53
99 99
100#define SCM_TIMESTAMPING_OPT_STATS 54
101
100#endif /* _ASM_POWERPC_SOCKET_H */ 102#endif /* _ASM_POWERPC_SOCKET_H */
diff --git a/arch/s390/include/uapi/asm/socket.h b/arch/s390/include/uapi/asm/socket.h
index 41b51c2f4f1b..b24a64cbfeb1 100644
--- a/arch/s390/include/uapi/asm/socket.h
+++ b/arch/s390/include/uapi/asm/socket.h
@@ -96,4 +96,6 @@
96 96
97#define SO_CNX_ADVICE 53 97#define SO_CNX_ADVICE 53
98 98
99#define SCM_TIMESTAMPING_OPT_STATS 54
100
99#endif /* _ASM_SOCKET_H */ 101#endif /* _ASM_SOCKET_H */
diff --git a/arch/sparc/include/uapi/asm/socket.h b/arch/sparc/include/uapi/asm/socket.h
index 31aede3af088..a25dc32f5d6a 100644
--- a/arch/sparc/include/uapi/asm/socket.h
+++ b/arch/sparc/include/uapi/asm/socket.h
@@ -86,6 +86,8 @@
86 86
87#define SO_CNX_ADVICE 0x0037 87#define SO_CNX_ADVICE 0x0037
88 88
89#define SCM_TIMESTAMPING_OPT_STATS 0x0038
90
89/* Security levels - as per NRL IPv6 - don't actually do anything */ 91/* Security levels - as per NRL IPv6 - don't actually do anything */
90#define SO_SECURITY_AUTHENTICATION 0x5001 92#define SO_SECURITY_AUTHENTICATION 0x5001
91#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 93#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002
diff --git a/arch/xtensa/include/uapi/asm/socket.h b/arch/xtensa/include/uapi/asm/socket.h
index 81435d995e11..9fdbe1fe0473 100644
--- a/arch/xtensa/include/uapi/asm/socket.h
+++ b/arch/xtensa/include/uapi/asm/socket.h
@@ -101,4 +101,6 @@
101 101
102#define SO_CNX_ADVICE 53 102#define SO_CNX_ADVICE 53
103 103
104#define SCM_TIMESTAMPING_OPT_STATS 54
105
104#endif /* _XTENSA_SOCKET_H */ 106#endif /* _XTENSA_SOCKET_H */