summaryrefslogtreecommitdiff
path: root/Documentation/networking/timestamping.txt
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2014-12-01 06:22:35 +0300
committerDavid S. Miller <davem@davemloft.net>2014-12-09 04:20:48 +0300
commitcbd3aad5ce66f5a266a185aa37e0eb9be9ba4154 (patch)
treeb0adfab040099b369f38ebe9a19df9632f85ded8 /Documentation/networking/timestamping.txt
parent829ae9d611651467fe6cd7be834bd33ca6b28dfe (diff)
downloadlinux-cbd3aad5ce66f5a266a185aa37e0eb9be9ba4154.tar.xz
net-timestamp: expand documentation and test
Documentation: expand explanation of timestamp counter Test: new: flag -I requests and prints PKTINFO new: flag -x prints payload (possibly truncated) fix: remove pretty print that breaks common flag '-l 1' Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking/timestamping.txt')
-rw-r--r--Documentation/networking/timestamping.txt23
1 files changed, 15 insertions, 8 deletions
diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt
index b08e27261ff9..a5c784c89312 100644
--- a/Documentation/networking/timestamping.txt
+++ b/Documentation/networking/timestamping.txt
@@ -130,19 +130,26 @@ SOF_TIMESTAMPING_OPT_ID:
have multiple concurrent timestamping requests outstanding. Packets
can be reordered in the transmit path, for instance in the packet
scheduler. In that case timestamps will be queued onto the error
- queue out of order from the original send() calls. This option
- embeds a counter that is incremented at send() time, to order
- timestamps within a flow.
+ queue out of order from the original send() calls. It is not always
+ possible to uniquely match timestamps to the original send() calls
+ based on timestamp order or payload inspection alone, then.
+
+ This option associates each packet at send() with a unique
+ identifier and returns that along with the timestamp. The identifier
+ is derived from a per-socket u32 counter (that wraps). For datagram
+ sockets, the counter increments with each sent packet. For stream
+ sockets, it increments with every byte.
+
+ The counter starts at zero. It is initialized the first time that
+ the socket option is enabled. It is reset each time the option is
+ enabled after having been disabled. Resetting the counter does not
+ change the identifiers of existing packets in the system.
This option is implemented only for transmit timestamps. There, the
timestamp is always looped along with a struct sock_extended_err.
The option modifies field ee_data to pass an id that is unique
among all possibly concurrently outstanding timestamp requests for
- that socket. In practice, it is a monotonically increasing u32
- (that wraps).
-
- In datagram sockets, the counter increments on each send call. In
- stream sockets, it increments with every byte.
+ that socket.
SOF_TIMESTAMPING_OPT_CMSG: