netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Y.b. Lu" <yangbo.lu@nxp.com>
To: Richard Cochran <richardcochran@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Jakub Kicinski <kuba@kernel.org>
Subject: RE: [net-next, v2, 7/7] enetc: support PTP domain timestamp conversion
Date: Mon, 31 May 2021 11:26:18 +0000	[thread overview]
Message-ID: <DB7PR04MB5017E8CEA0DA148A4EB1EAF9F83F9@DB7PR04MB5017.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20210525124848.GC27498@hoboy.vegasvil.org>

> -----Original Message-----
> From: Richard Cochran <richardcochran@gmail.com>
> Sent: 2021年5月25日 20:49
> To: Y.b. Lu <yangbo.lu@nxp.com>
> Cc: netdev@vger.kernel.org; David S . Miller <davem@davemloft.net>; Claudiu
> Manoil <claudiu.manoil@nxp.com>; Jakub Kicinski <kuba@kernel.org>
> Subject: Re: [net-next, v2, 7/7] enetc: support PTP domain timestamp
> conversion
> 
> On Tue, May 25, 2021 at 05:37:11AM -0700, Richard Cochran wrote:
> > Instead, the conversion from raw time stamp to vclock time stamp
> > should happen in the core infrastructure.  That way, no driver hacks
> > will be needed, and it will "just work" everywhere.
> 
> For transmit time stamps, we have skb_complete_tx_timestamp().
> 
> For receive, most drivers use the following cliche:
> 
> 	shwt = skb_hwtstamps(skb);
> 	memset(shwt, 0, sizeof(*shwt));
> 	shwt->hwtstamp = ns_to_ktime(ns);
> 
> So the first step will be to introduce a helper function for that, and then
> re-factor the drivers to use the helper.

So, the timestamp conversion could be in skbuff.c.
That's good to do this. But there are quite a lot of drivers using timestamping.
Should we convert all drivers to use the helper, or let others do this when they need?
Thanks.


> 
> Thanks,
> Richard
> 
> 

  reply	other threads:[~2021-05-31 11:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21  4:36 [net-next, v2, 0/7] ptp: support virtual clocks for multiple Yangbo Lu
2021-05-21  4:36 ` [net-next, v2, 1/7] ptp: add ptp virtual clock driver framework Yangbo Lu
2021-05-23 21:24   ` Richard Cochran
2021-05-31 10:38     ` Y.b. Lu
2021-05-21  4:36 ` [net-next, v2, 2/7] ptp: support ptp physical/virtual clocks conversion Yangbo Lu
2021-05-25 11:33   ` Richard Cochran
2021-05-31 10:39     ` Y.b. Lu
2021-05-25 12:28   ` Richard Cochran
2021-05-31 10:40     ` Y.b. Lu
2021-05-21  4:36 ` [net-next, v2, 3/7] ptp: support domains and timestamp conversion Yangbo Lu
2021-05-21  4:36 ` [net-next, v2, 4/7] ptp_qoriq: export ptp clock reading function for cyclecounter Yangbo Lu
2021-05-21  4:36 ` [net-next, v2, 5/7] enetc_ptp: support ptp virtual clock Yangbo Lu
2021-05-21  4:36 ` [net-next, v2, 6/7] enetc: store ptp device pointer Yangbo Lu
2021-05-21  4:36 ` [net-next, v2, 7/7] enetc: support PTP domain timestamp conversion Yangbo Lu
2021-05-22 20:46   ` Claudiu Manoil
2021-05-25 12:37   ` Richard Cochran
2021-05-25 12:48     ` Richard Cochran
2021-05-31 11:26       ` Y.b. Lu [this message]
2021-05-31 13:49         ` Richard Cochran
2021-06-15  9:44           ` Y.b. Lu
2021-05-31 10:51     ` Y.b. Lu
2021-05-31 11:31       ` Y.b. Lu
2021-05-31 13:54         ` Richard Cochran

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=DB7PR04MB5017E8CEA0DA148A4EB1EAF9F83F9@DB7PR04MB5017.eurprd04.prod.outlook.com \
    --to=yangbo.lu@nxp.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.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 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 NNTP newsgroup(s).