diff options
author | Willem de Bruijn <willemb@google.com> | 2014-12-01 04:22:35 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-09 02:20:48 +0100 |
commit | cbd3aad5ce66f5a266a185aa37e0eb9be9ba4154 (patch) | |
tree | b0adfab040099b369f38ebe9a19df9632f85ded8 /Documentation/networking/timestamping.txt | |
parent | net-timestamp: allow reading recv cmsg on errqueue with origin tstamp (diff) | |
download | linux-cbd3aad5ce66f5a266a185aa37e0eb9be9ba4154.tar.xz linux-cbd3aad5ce66f5a266a185aa37e0eb9be9ba4154.zip |
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.txt | 23 |
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: |