aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2013-11-13 20:19:29 -0500
committerBen Hutchings <bhutchings@solarflare.com>2013-11-19 14:07:21 -0500
commitfd468c74bd4d6949736810a80d6ca05eb20fba84 (patch)
treec68b11620237ba704b740827ce952409b5666231 /Documentation
parent590d4693fb1c96ce441d11c6d1acb413a90b62e5 (diff)
net_tstamp: Add SIOCGHWTSTAMP ioctl to match SIOCSHWTSTAMP
SIOCSHWTSTAMP returns the real configuration to the application using it, but there is currently no way for any other application to find out the configuration non-destructively. Add a new ioctl for this, making it unprivileged. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/networking/timestamping.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt
index 98097d8cb910..661d3c316a17 100644
--- a/Documentation/networking/timestamping.txt
+++ b/Documentation/networking/timestamping.txt
@@ -85,7 +85,7 @@ Filled in if SOF_TIMESTAMPING_SYS_HARDWARE is set. Requires support
85by the network device and will be empty without that support. 85by the network device and will be empty without that support.
86 86
87 87
88SIOCSHWTSTAMP: 88SIOCSHWTSTAMP, SIOCGHWTSTAMP:
89 89
90Hardware time stamping must also be initialized for each device driver 90Hardware time stamping must also be initialized for each device driver
91that is expected to do hardware time stamping. The parameter is defined in 91that is expected to do hardware time stamping. The parameter is defined in
@@ -115,6 +115,10 @@ Only a processes with admin rights may change the configuration. User
115space is responsible to ensure that multiple processes don't interfere 115space is responsible to ensure that multiple processes don't interfere
116with each other and that the settings are reset. 116with each other and that the settings are reset.
117 117
118Any process can read the actual configuration by passing this
119structure to ioctl(SIOCGHWTSTAMP) in the same way. However, this has
120not been implemented in all drivers.
121
118/* possible values for hwtstamp_config->tx_type */ 122/* possible values for hwtstamp_config->tx_type */
119enum { 123enum {
120 /* 124 /*
@@ -157,7 +161,8 @@ DEVICE IMPLEMENTATION
157 161
158A driver which supports hardware time stamping must support the 162A driver which supports hardware time stamping must support the
159SIOCSHWTSTAMP ioctl and update the supplied struct hwtstamp_config with 163SIOCSHWTSTAMP ioctl and update the supplied struct hwtstamp_config with
160the actual values as described in the section on SIOCSHWTSTAMP. 164the actual values as described in the section on SIOCSHWTSTAMP. It
165should also support SIOCGHWTSTAMP.
161 166
162Time stamps for received packets must be stored in the skb. To get a pointer 167Time stamps for received packets must be stored in the skb. To get a pointer
163to the shared time stamp structure of the skb call skb_hwtstamps(). Then 168to the shared time stamp structure of the skb call skb_hwtstamps(). Then