aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/networking
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2014-07-25 18:01:32 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-29 14:39:50 -0400
commit4d276eb6a478307a28ae843836c455bf04b37a3c (patch)
tree2915bc3a3e8ea825e7b02349b05915aaff8a91eb /Documentation/networking
parent68a360e82e55c9b35097e7be7f7991d8f401032f (diff)
net: remove deprecated syststamp timestamp
The SO_TIMESTAMPING API defines three types of timestamps: software, hardware in raw format (hwtstamp) and hardware converted to system format (syststamp). The last has been deprecated in favor of combining hwtstamp with a PTP clock driver. There are no active users in the kernel. The option was device driver dependent. If set, but without hardware support, the correct behavior is to return zero in the relevant field in the SCM_TIMESTAMPING ancillary message. Without device drivers implementing the option, this field is effectively always zero. Remove the internal plumbing to dissuage new drivers from implementing the feature. Keep the SOF_TIMESTAMPING_SYS_HARDWARE flag, however, to avoid breaking existing applications that request the timestamp. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking')
-rw-r--r--Documentation/networking/timestamping.txt12
-rw-r--r--Documentation/networking/timestamping/timestamping.c7
2 files changed, 3 insertions, 16 deletions
diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt
index 8b4ad809df27..897f942b976b 100644
--- a/Documentation/networking/timestamping.txt
+++ b/Documentation/networking/timestamping.txt
@@ -88,15 +88,8 @@ hwtimeraw is the original hardware time stamp. Filled in if
88SOF_TIMESTAMPING_RAW_HARDWARE is set. No assumptions about its 88SOF_TIMESTAMPING_RAW_HARDWARE is set. No assumptions about its
89relation to system time should be made. 89relation to system time should be made.
90 90
91hwtimetrans is the hardware time stamp transformed so that it 91hwtimetrans is always zero. This field is deprecated. It used to hold
92corresponds as good as possible to system time. This correlation is 92hw timestamps converted to system time. Instead, expose the hardware
93not perfect; as a consequence, sorting packets received via different
94NICs by their hwtimetrans may differ from the order in which they were
95received. hwtimetrans may be non-monotonic even for the same NIC.
96Filled in if SOF_TIMESTAMPING_SYS_HARDWARE is set. Requires support
97by the network device and will be empty without that support. This
98field is DEPRECATED. Only one driver computes this value. New device
99drivers must leave this zero. Instead, they can expose the hardware
100clock device on the NIC directly as a HW PTP clock source, to allow 93clock device on the NIC directly as a HW PTP clock source, to allow
101time conversion in userspace and optionally synchronize system time 94time conversion in userspace and optionally synchronize system time
102with a userspace PTP stack such as linuxptp. For the PTP clock API, 95with a userspace PTP stack such as linuxptp. For the PTP clock API,
@@ -191,7 +184,6 @@ struct skb_shared_hwtstamps {
191 * since arbitrary point in time 184 * since arbitrary point in time
192 */ 185 */
193 ktime_t hwtstamp; 186 ktime_t hwtstamp;
194 ktime_t syststamp; /* hwtstamp transformed to system time base */
195}; 187};
196 188
197Time stamps for outgoing packets are to be generated as follows: 189Time stamps for outgoing packets are to be generated as follows:
diff --git a/Documentation/networking/timestamping/timestamping.c b/Documentation/networking/timestamping/timestamping.c
index 8ba82bfe6a33..5cdfd743447b 100644
--- a/Documentation/networking/timestamping/timestamping.c
+++ b/Documentation/networking/timestamping/timestamping.c
@@ -76,7 +76,6 @@ static void usage(const char *error)
76 " SOF_TIMESTAMPING_RX_HARDWARE - hardware time stamping of incoming packets\n" 76 " SOF_TIMESTAMPING_RX_HARDWARE - hardware time stamping of incoming packets\n"
77 " SOF_TIMESTAMPING_RX_SOFTWARE - software fallback for incoming packets\n" 77 " SOF_TIMESTAMPING_RX_SOFTWARE - software fallback for incoming packets\n"
78 " SOF_TIMESTAMPING_SOFTWARE - request reporting of software time stamps\n" 78 " SOF_TIMESTAMPING_SOFTWARE - request reporting of software time stamps\n"
79 " SOF_TIMESTAMPING_SYS_HARDWARE - request reporting of transformed HW time stamps\n"
80 " SOF_TIMESTAMPING_RAW_HARDWARE - request reporting of raw HW time stamps\n" 79 " SOF_TIMESTAMPING_RAW_HARDWARE - request reporting of raw HW time stamps\n"
81 " SIOCGSTAMP - check last socket time stamp\n" 80 " SIOCGSTAMP - check last socket time stamp\n"
82 " SIOCGSTAMPNS - more accurate socket time stamp\n"); 81 " SIOCGSTAMPNS - more accurate socket time stamp\n");
@@ -202,9 +201,7 @@ static void printpacket(struct msghdr *msg, int res,
202 (long)stamp->tv_sec, 201 (long)stamp->tv_sec,
203 (long)stamp->tv_nsec); 202 (long)stamp->tv_nsec);
204 stamp++; 203 stamp++;
205 printf("HW transformed %ld.%09ld ", 204 /* skip deprecated HW transformed */
206 (long)stamp->tv_sec,
207 (long)stamp->tv_nsec);
208 stamp++; 205 stamp++;
209 printf("HW raw %ld.%09ld", 206 printf("HW raw %ld.%09ld",
210 (long)stamp->tv_sec, 207 (long)stamp->tv_sec,
@@ -361,8 +358,6 @@ int main(int argc, char **argv)
361 so_timestamping_flags |= SOF_TIMESTAMPING_RX_SOFTWARE; 358 so_timestamping_flags |= SOF_TIMESTAMPING_RX_SOFTWARE;
362 else if (!strcasecmp(argv[i], "SOF_TIMESTAMPING_SOFTWARE")) 359 else if (!strcasecmp(argv[i], "SOF_TIMESTAMPING_SOFTWARE"))
363 so_timestamping_flags |= SOF_TIMESTAMPING_SOFTWARE; 360 so_timestamping_flags |= SOF_TIMESTAMPING_SOFTWARE;
364 else if (!strcasecmp(argv[i], "SOF_TIMESTAMPING_SYS_HARDWARE"))
365 so_timestamping_flags |= SOF_TIMESTAMPING_SYS_HARDWARE;
366 else if (!strcasecmp(argv[i], "SOF_TIMESTAMPING_RAW_HARDWARE")) 361 else if (!strcasecmp(argv[i], "SOF_TIMESTAMPING_RAW_HARDWARE"))
367 so_timestamping_flags |= SOF_TIMESTAMPING_RAW_HARDWARE; 362 so_timestamping_flags |= SOF_TIMESTAMPING_RAW_HARDWARE;
368 else 363 else