aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2014-08-04 22:11:50 -0400
committerDavid S. Miller <davem@davemloft.net>2014-08-05 19:35:54 -0400
commite1c8a607b28190cd09a271508aa3025d3c2f312e (patch)
tree83f4b5e777a13535434be99bee2e764a6677e647 /include
parent4ed2d765dfaccff5ebdac68e2064b59125033a3b (diff)
net-timestamp: ACK timestamp for bytestreams
Add SOF_TIMESTAMPING_TX_ACK, a request for a tstamp when the last byte in the send() call is acknowledged. It implements the feature for TCP. The timestamp is generated when the TCP socket cumulative ACK is moved beyond the tracked seqno for the first time. The feature ignores SACK and FACK, because those acknowledge the specific byte, but not necessarily the entire contents of the buffer up to that byte. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/skbuff.h7
-rw-r--r--include/uapi/linux/errqueue.h1
-rw-r--r--include/uapi/linux/net_tstamp.h3
3 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 50e1e9b3a5a5..11c270551d25 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -250,9 +250,14 @@ enum {
250 250
251 /* generate software time stamp when entering packet scheduling */ 251 /* generate software time stamp when entering packet scheduling */
252 SKBTX_SCHED_TSTAMP = 1 << 6, 252 SKBTX_SCHED_TSTAMP = 1 << 6,
253
254 /* generate software timestamp on peer data acknowledgment */
255 SKBTX_ACK_TSTAMP = 1 << 7,
253}; 256};
254 257
255#define SKBTX_ANY_SW_TSTAMP (SKBTX_SW_TSTAMP | SKBTX_SCHED_TSTAMP) 258#define SKBTX_ANY_SW_TSTAMP (SKBTX_SW_TSTAMP | \
259 SKBTX_SCHED_TSTAMP | \
260 SKBTX_ACK_TSTAMP)
256#define SKBTX_ANY_TSTAMP (SKBTX_HW_TSTAMP | SKBTX_ANY_SW_TSTAMP) 261#define SKBTX_ANY_TSTAMP (SKBTX_HW_TSTAMP | SKBTX_ANY_SW_TSTAMP)
257 262
258/* 263/*
diff --git a/include/uapi/linux/errqueue.h b/include/uapi/linux/errqueue.h
index 17437cf297b7..07bdce1f444a 100644
--- a/include/uapi/linux/errqueue.h
+++ b/include/uapi/linux/errqueue.h
@@ -40,6 +40,7 @@ struct scm_timestamping {
40enum { 40enum {
41 SCM_TSTAMP_SND, /* driver passed skb to NIC, or HW */ 41 SCM_TSTAMP_SND, /* driver passed skb to NIC, or HW */
42 SCM_TSTAMP_SCHED, /* data entered the packet scheduler */ 42 SCM_TSTAMP_SCHED, /* data entered the packet scheduler */
43 SCM_TSTAMP_ACK, /* data acknowledged by peer */
43}; 44};
44 45
45#endif /* _UAPI_LINUX_ERRQUEUE_H */ 46#endif /* _UAPI_LINUX_ERRQUEUE_H */
diff --git a/include/uapi/linux/net_tstamp.h b/include/uapi/linux/net_tstamp.h
index 60733845fcdd..ff354021bb69 100644
--- a/include/uapi/linux/net_tstamp.h
+++ b/include/uapi/linux/net_tstamp.h
@@ -22,8 +22,9 @@ enum {
22 SOF_TIMESTAMPING_RAW_HARDWARE = (1<<6), 22 SOF_TIMESTAMPING_RAW_HARDWARE = (1<<6),
23 SOF_TIMESTAMPING_OPT_ID = (1<<7), 23 SOF_TIMESTAMPING_OPT_ID = (1<<7),
24 SOF_TIMESTAMPING_TX_SCHED = (1<<8), 24 SOF_TIMESTAMPING_TX_SCHED = (1<<8),
25 SOF_TIMESTAMPING_TX_ACK = (1<<9),
25 26
26 SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPING_TX_SCHED, 27 SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPING_TX_ACK,
27 SOF_TIMESTAMPING_MASK = (SOF_TIMESTAMPING_LAST - 1) | 28 SOF_TIMESTAMPING_MASK = (SOF_TIMESTAMPING_LAST - 1) |
28 SOF_TIMESTAMPING_LAST 29 SOF_TIMESTAMPING_LAST
29}; 30};