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

- From: Willem de Bruijn \<willemdebruijn.kernel@gmail.com\>
- Date: 2018-12-12 15:07:56 
- List: netdev
- Page: https://ratatoskr.run/netdev/2018/12/5461278
- Thread: https://ratatoskr.run/netdev/2018/12/5460443/t.md

```text
On Tue, Dec 11, 2018 at 3:31 PM Deepa Dinamani [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.

> ---
>  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.
```
