summaryrefslogtreecommitdiff
path: root/net/socket.c
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2014-08-05 02:11:48 (GMT)
committerDavid S. Miller <davem@davemloft.net>2014-08-05 23:35:54 (GMT)
commite7fd2885385157d46c85f282fc6d7d297db43e1f (patch)
tree14e9d00ed87b2b45882c8cb8dd1b9b4d221724f8 /net/socket.c
parent09c2d251b70723650ba47e83571ff49281320f7c (diff)
downloadlinux-e7fd2885385157d46c85f282fc6d7d297db43e1f.tar.xz
net-timestamp: SCHED timestamp on entering packet scheduler
Kernel transmit latency is often incurred in the packet scheduler. Introduce a new timestamp on transmission just before entering the scheduler. When data travels through multiple devices (bonding, tunneling, ...) each device will export an individual timestamp. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c
index 255d9b8..3a2778d 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -617,6 +617,9 @@ void sock_tx_timestamp(struct sock *sk, __u8 *tx_flags)
*tx_flags |= SKBTX_HW_TSTAMP;
if (sk->sk_tsflags & SOF_TIMESTAMPING_TX_SOFTWARE)
*tx_flags |= SKBTX_SW_TSTAMP;
+ if (sk->sk_tsflags & SOF_TIMESTAMPING_TX_SCHED)
+ *tx_flags |= SKBTX_SCHED_TSTAMP;
+
if (sock_flag(sk, SOCK_WIFI_STATUS))
*tx_flags |= SKBTX_WIFI_STATUS;
}