diff options
author | Willem de Bruijn <willemb@google.com> | 2015-01-30 13:29:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-02 21:46:51 -0500 |
commit | 49ca0d8bfaf3bc46d5eef60ce67b00eb195bd392 (patch) | |
tree | d2f55a32923f6d91fcb2e0d0e0b6d2d4eb6f9abd /Documentation/networking | |
parent | 9766e97af1b901ffbb36fcc648e50626d926bb24 (diff) |
net-timestamp: no-payload option
Add timestamping option SOF_TIMESTAMPING_OPT_TSONLY. For transmit
timestamps, this loops timestamps on top of empty packets.
Doing so reduces the pressure on SO_RCVBUF. Payload inspection and
cmsg reception (aside from timestamps) are no longer possible. This
works together with a follow on patch that allows administrators to
only allow tx timestamping if it does not loop payload or metadata.
Signed-off-by: Willem de Bruijn <willemb@google.com>
----
Changes (rfc -> v1)
- add documentation
- remove unnecessary skb->len test (thanks to Richard Cochran)
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking')
-rw-r--r-- | Documentation/networking/timestamping.txt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt index a5c784c89312..5f0922613f1a 100644 --- a/Documentation/networking/timestamping.txt +++ b/Documentation/networking/timestamping.txt | |||
@@ -162,6 +162,27 @@ SOF_TIMESTAMPING_OPT_CMSG: | |||
162 | option IP_PKTINFO simultaneously. | 162 | option IP_PKTINFO simultaneously. |
163 | 163 | ||
164 | 164 | ||
165 | SOF_TIMESTAMPING_OPT_TSONLY: | ||
166 | |||
167 | Applies to transmit timestamps only. Makes the kernel return the | ||
168 | timestamp as a cmsg alongside an empty packet, as opposed to | ||
169 | alongside the original packet. This reduces the amount of memory | ||
170 | charged to the socket's receive budget (SO_RCVBUF) and delivers | ||
171 | the timestamp even if sysctl net.core.tstamp_allow_data is 0. | ||
172 | This option disables SOF_TIMESTAMPING_OPT_CMSG. | ||
173 | |||
174 | |||
175 | New applications are encouraged to pass SOF_TIMESTAMPING_OPT_ID to | ||
176 | disambiguate timestamps and SOF_TIMESTAMPING_OPT_TSONLY to operate | ||
177 | regardless of the setting of sysctl net.core.tstamp_allow_data. | ||
178 | |||
179 | An exception is when a process needs additional cmsg data, for | ||
180 | instance SOL_IP/IP_PKTINFO to detect the egress network interface. | ||
181 | Then pass option SOF_TIMESTAMPING_OPT_CMSG. This option depends on | ||
182 | having access to the contents of the original packet, so cannot be | ||
183 | combined with SOF_TIMESTAMPING_OPT_TSONLY. | ||
184 | |||
185 | |||
165 | 1.4 Bytestream Timestamps | 186 | 1.4 Bytestream Timestamps |
166 | 187 | ||
167 | The SO_TIMESTAMPING interface supports timestamping of bytes in a | 188 | The SO_TIMESTAMPING interface supports timestamping of bytes in a |