]> Git Repo - linux.git/commit
tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING
authorFrancis Yan <[email protected]>
Mon, 28 Nov 2016 07:07:18 +0000 (23:07 -0800)
committerDavid S. Miller <[email protected]>
Wed, 30 Nov 2016 15:04:25 +0000 (10:04 -0500)
commit1c885808e45601b2b6f68b30ac1d999e10b6f606
tree4878c60feb2769477239b63194ce5946129bcd75
parentefd90174167530c67a54273fd5d8369c87f9bd32
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 <[email protected]>
Signed-off-by: Yuchung Cheng <[email protected]>
Signed-off-by: Soheil Hassas Yeganeh <[email protected]>
Acked-by: Neal Cardwell <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
20 files changed:
Documentation/networking/timestamping.txt
arch/alpha/include/uapi/asm/socket.h
arch/frv/include/uapi/asm/socket.h
arch/ia64/include/uapi/asm/socket.h
arch/m32r/include/uapi/asm/socket.h
arch/mips/include/uapi/asm/socket.h
arch/mn10300/include/uapi/asm/socket.h
arch/parisc/include/uapi/asm/socket.h
arch/powerpc/include/uapi/asm/socket.h
arch/s390/include/uapi/asm/socket.h
arch/sparc/include/uapi/asm/socket.h
arch/xtensa/include/uapi/asm/socket.h
include/linux/tcp.h
include/uapi/asm-generic/socket.h
include/uapi/linux/net_tstamp.h
include/uapi/linux/tcp.h
net/core/skbuff.c
net/core/sock.c
net/ipv4/tcp.c
net/socket.c
This page took 0.076674 seconds and 4 git commands to generate.