Thread (23 messages) 23 messages, 4 authors, 2018-12-18

Re: [PATCH v2 8/8] socket: Update timestamping Documentation

From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date: 2018-12-12 15:07:56
Also in: lkml

On Tue, Dec 11, 2018 at 3:31 PM Deepa Dinamani [off-list ref] wrote:
With the new y2038 safe timestamping options added, update the
documentation to reflect the changes.

Signed-off-by: Deepa Dinamani <redacted>
Thanks for adding documentation.

Acked-by: Willem de Bruijn <willemb@google.com>

One suggestion below if this patchset is respun.
quoted hunk ↗ jump to hunk
---
 Documentation/networking/timestamping.txt | 43 ++++++++++++++++++++---
 1 file changed, 38 insertions(+), 5 deletions(-)
diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt
index 1be0b6f9e0cb..67e4ab3cdb86 100644
--- a/Documentation/networking/timestamping.txt
+++ b/Documentation/networking/timestamping.txt
@@ -6,11 +6,21 @@ The interfaces for receiving network packages timestamps are:
 * SO_TIMESTAMP
   Generates a timestamp for each incoming packet in (not necessarily
   monotonic) system time. Reports the timestamp via recvmsg() in a
-  control message as struct timeval (usec resolution).
+  control message in usec resolution.
+  SO_TIMESTAMP is defined as SO_TIMESTAMP_NEW or SO_TIMESTAMP_OLD
+  based on the architecture type and time_t representation of libc.
+  Control message format is in struct __kernel_old_timeval for
+  SO_TIMESTAMP_OLD and in struct __kernel_sock_timeval for
+  SO_TIMESTAMP_NEW options respectively.
Perhaps add one sentence to explain why this matters and how the
sizeof(time_t) trick works:

on 64-bit old and new are the same. All fields are 64-bit wide. On
32-bit the old variant uses a signed  32-bit integer for time_t that
will overflow in 2038.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help