From: Miroslav Lichvar <mlichvar@redhat.com>
To: Richard Cochran <richardcochran@gmail.com>
Cc: netdev@vger.kernel.org, Jiri Benc <jbenc@redhat.com>,
"Keller, Jacob E" <jacob.e.keller@intel.com>,
Denny Page <dennypage@me.com>,
Willem de Bruijn <willemb@google.com>
Subject: Re: Extending socket timestamping API for NTP
Date: Fri, 24 Mar 2017 08:25:11 +0100 [thread overview]
Message-ID: <20170324072511.GC8192@localhost> (raw)
In-Reply-To: <20170323190733.GA30056@localhost.localdomain>
On Thu, Mar 23, 2017 at 08:07:33PM +0100, Richard Cochran wrote:
> On Thu, Mar 23, 2017 at 05:21:45PM +0100, Miroslav Lichvar wrote:
> > A better approach might be a control message that would provide the
> > original interface index together with the length of the packet, so
> > the application could transpose the HW timestamp and map the HW
> > interface to the PHC.
>
> This sounds better than trying to auto-magically transpose and correct
> for link speed.
>
> BTW, isn't there already a control message for "original interface
> index"?
There is the PACKET_ORIGDEV option, but it works only with packet
sockets, and it doesn't look to me like it could be easily turned into
a SO_ORIGDEV option. If there was such an option and also a SO_ORIGLEN
option, I think that would work nicely for me.
> > The two values could be saved in the skb_shared_info structure. Now
> > my question is if they could be useful also for other things than
> > timestamping
>
> such as?
I'm not sure. What people do with PACKET_ORIGDEV and would it make
sense with other sockets? Googling "PACKET_ORIGDEV" shows
implementations of some low-level protocols.
> > and if it should be a new socket option which would work
> > on any socket independently from timestamping, or if it should rather
> > be a new flag for the SO_TIMESTAMPING option. If the latter, would it
> > make sense to put them in the skb_shared_hwtstamps structure and
> > modify all drivers to set the values when a HW timestamp is captured
> > instead of adding more code to __netif_receive_skb_core() or similar?
>
> This information is solely for a highly specialized NTP application.
> No normal program would ever need this, AFAICT. So, if possible,
> getting the original frame length should be done in a way that doesn't
> affect users that don't need it.
Ok. I'll put the two fields to skb_shared_hwtstamps, taking the place
of the old syststamp field, and try to avoid adding any code to paths
not specific to timestamping.
Thanks,
--
Miroslav Lichvar
next prev parent reply other threads:[~2017-03-24 7:25 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 14:01 Extending socket timestamping API for NTP Miroslav Lichvar
2017-02-07 17:45 ` Keller, Jacob E
2017-02-07 22:32 ` Willem de Bruijn
2017-02-08 14:18 ` Soheil Hassas Yeganeh
2017-02-27 15:23 ` Miroslav Lichvar
2017-02-28 0:01 ` Willem de Bruijn
2017-02-28 8:26 ` Miroslav Lichvar
2017-02-28 21:05 ` Willem de Bruijn
2017-02-08 1:52 ` Denny Page
2017-02-08 5:27 ` Richard Cochran
2017-02-08 5:48 ` Denny Page
2017-02-08 17:27 ` Denny Page
2017-02-07 18:54 ` Soheil Hassas Yeganeh
2017-02-08 10:14 ` Miroslav Lichvar
2017-02-07 20:37 ` sdncurious
2017-02-08 10:26 ` Miroslav Lichvar
2017-02-08 23:27 ` sdncurious
2017-02-08 23:34 ` sdncurious
2017-02-08 1:18 ` Denny Page
[not found] ` <CAHoNx58u=Fze4e5V2Wb_LiBhka1Mzny3zOVNfvuzjnmQ4wBO=Q@mail.gmail.com>
2017-02-08 3:06 ` Denny Page
2017-02-09 0:45 ` Denny Page
2017-02-09 11:15 ` Miroslav Lichvar
2017-02-09 20:25 ` Denny Page
2017-02-09 8:02 ` Richard Cochran
2017-02-09 11:09 ` Miroslav Lichvar
2017-02-09 19:42 ` sdncurious
2017-02-09 20:37 ` Denny Page
2017-02-10 0:33 ` Denny Page
2017-02-10 18:55 ` Denny Page
2017-03-23 16:21 ` Miroslav Lichvar
2017-03-23 18:54 ` Denny Page
2017-03-23 19:07 ` Richard Cochran
2017-03-24 7:25 ` Miroslav Lichvar [this message]
[not found] ` <6121D504-288F-4C9B-9AB3-D1C8292965D5@me.com>
2017-03-24 9:45 ` Miroslav Lichvar
2017-03-24 17:17 ` Denny Page
2017-03-24 18:52 ` Keller, Jacob E
2017-03-27 10:13 ` Miroslav Lichvar
2017-03-27 14:29 ` Richard Cochran
2017-03-27 16:25 ` Denny Page
2017-03-27 18:28 ` Richard Cochran
2017-03-27 19:18 ` Denny Page
2017-03-27 20:58 ` Richard Cochran
2017-03-27 21:20 ` Denny Page
2017-03-27 19:21 ` Denny Page
2017-03-27 19:21 ` Denny Page
[not found] ` <5FD283AB-39DE-4A9D-902A-BA5F0F0B62A3@me.com>
2017-03-27 21:00 ` Richard Cochran
2017-03-24 9:55 ` Jiri Benc
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=20170324072511.GC8192@localhost \
--to=mlichvar@redhat.com \
--cc=dennypage@me.com \
--cc=jacob.e.keller@intel.com \
--cc=jbenc@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=willemb@google.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.