diff options
author | Willem de Bruijn <willemb@google.com> | 2014-11-30 22:22:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-08 20:20:48 -0500 |
commit | cbd3aad5ce66f5a266a185aa37e0eb9be9ba4154 (patch) | |
tree | b0adfab040099b369f38ebe9a19df9632f85ded8 /Documentation/networking/timestamping.txt | |
parent | 829ae9d611651467fe6cd7be834bd33ca6b28dfe (diff) |
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: | |||
130 | have multiple concurrent timestamping requests outstanding. Packets | 130 | have multiple concurrent timestamping requests outstanding. Packets |
131 | can be reordered in the transmit path, for instance in the packet | 131 | can be reordered in the transmit path, for instance in the packet |
132 | scheduler. In that case timestamps will be queued onto the error | 132 | scheduler. In that case timestamps will be queued onto the error |
133 | queue out of order from the original send() calls. This option | 133 | queue out of order from the original send() calls. It is not always |
134 | embeds a counter that is incremented at send() time, to order | 134 | possible to uniquely match timestamps to the original send() calls |
135 | timestamps within a flow. | 135 | based on timestamp order or payload inspection alone, then. |
136 | |||
137 | This option associates each packet at send() with a unique | ||
138 | identifier and returns that along with the timestamp. The identifier | ||
139 | is derived from a per-socket u32 counter (that wraps). For datagram | ||
140 | sockets, the counter increments with each sent packet. For stream | ||
141 | sockets, it increments with every byte. | ||
142 | |||
143 | The counter starts at zero. It is initialized the first time that | ||
144 | the socket option is enabled. It is reset each time the option is | ||
145 | enabled after having been disabled. Resetting the counter does not | ||
146 | change the identifiers of existing packets in the system. | ||
136 | 147 | ||
137 | This option is implemented only for transmit timestamps. There, the | 148 | This option is implemented only for transmit timestamps. There, the |
138 | timestamp is always looped along with a struct sock_extended_err. | 149 | timestamp is always looped along with a struct sock_extended_err. |
139 | The option modifies field ee_data to pass an id that is unique | 150 | The option modifies field ee_data to pass an id that is unique |
140 | among all possibly concurrently outstanding timestamp requests for | 151 | among all possibly concurrently outstanding timestamp requests for |
141 | that socket. In practice, it is a monotonically increasing u32 | 152 | that socket. |
142 | (that wraps). | ||
143 | |||
144 | In datagram sockets, the counter increments on each send call. In | ||
145 | stream sockets, it increments with every byte. | ||
146 | 153 | ||
147 | 154 | ||
148 | SOF_TIMESTAMPING_OPT_CMSG: | 155 | SOF_TIMESTAMPING_OPT_CMSG: |