[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210525124848.GC27498@hoboy.vegasvil.org>
Date: Tue, 25 May 2021 05:48:48 -0700
From: Richard Cochran <richardcochran@...il.com>
To: Yangbo Lu <yangbo.lu@....com>
Cc: netdev@...r.kernel.org, "David S . Miller" <davem@...emloft.net>,
Claudiu Manoil <claudiu.manoil@....com>,
Jakub Kicinski <kuba@...nel.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.
Thanks,
Richard
Powered by blists - more mailing lists