($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz at gmail.com>
To: ell at lists.01.org
Subject: Re: [PATCH] dhcp,dhcp6,icmp6,time: Convert timestamps to CLOCK_BOOTTIME
Date: Wed, 18 May 2022 09:19:30 -0500	[thread overview]
Message-ID: <11b132ac-4069-88a6-ddfb-e68a570b810f@gmail.com> (raw)
In-Reply-To: 20220518003523.1717565-1-andrew.zaborowski@intel.com

[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]

Hi Andrew,

On 5/17/22 19:35, Andrew Zaborowski wrote:
> The frame reception timestamps obtained for DHCPv4, DHCPv6 and ICMPv6
> frames from the kernel are based on CLOCK_REALTIME, there's no option to
> switch them to CLOCK_BOOTTIME, which we use across our retransmission and
> renew logic.  Add a time-private.h utility to convert the timestamps
> right where we read them from recvmsg() to produce CLOCK_BOOTTIME based
> times.  This isn't 100% bulletproof because the offset between the two
> clocks can vary between the time the frame was received by the kernel and
> the time we read the offset.  The probability is very low though and we
> have no better solution at this time other than fixing it in the kernel.
> Using CLOCK_REALTIME for frame reception timestamps seems to mainly
> create potential for problems in the common usages.
> 
> Fixes: c78ad1bb6d7e ("dhcp: Set lease expiry based on frame reception times")
> ---
>   ell/dhcp-transport.c  |  3 ++-
>   ell/dhcp6-transport.c |  5 +++--
>   ell/icmp6.c           |  2 +-
>   ell/time-private.h    |  1 +
>   ell/time.c            | 34 ++++++++++++++++++++++++++++++++++
>   6 files changed, 44 insertions(+), 6 deletions(-)
> 

Applied, thanks.

Regards,
-Denis

             reply	other threads:[~2022-05-18 14:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18 14:19 Denis Kenzior [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-05-18 14:22 [PATCH] dhcp,dhcp6,icmp6,time: Convert timestamps to CLOCK_BOOTTIME Denis Kenzior
2022-05-18  0:35 Andrew Zaborowski
2022-05-18  0:22 [PATCH] dhcp, dhcp6, icmp6, time: " Andrew Zaborowski
2022-05-17 23:29 Andrew Zaborowski
2022-05-17 14:37 [PATCH] dhcp,dhcp6,icmp6,time: " Denis Kenzior
2022-05-16 21:31 Andrew Zaborowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11b132ac-4069-88a6-ddfb-e68a570b810f@gmail.com \
    --to=ell@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).