On Tue, Dec 11, 2018 at 3:31 PM Deepa Dinamani <deepa.ker...@gmail.com> wrote: > > With the new y2038 safe timestamping options added, update the > documentation to reflect the changes. > > Signed-off-by: Deepa Dinamani <deepa.ker...@gmail.com>
Thanks for adding documentation. Acked-by: Willem de Bruijn <will...@google.com> One suggestion below if this patchset is respun. > --- > 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.