[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53BBA0F6.3090003@caviumnetworks.com>
Date: Tue, 08 Jul 2014 00:42:46 -0700
From: Chad Reese <kreese@...iumnetworks.com>
To: Richard Cochran <richardcochran@...il.com>,
Chad Reese <kreese@...ium.com>
CC: Willem de Bruijn <willemb@...gle.com>, netdev@...r.kernel.org,
David Miller <davem@...emloft.net>,
Eric Dumazet <eric.dumazet@...il.com>,
Stephen Hemminger <stephen@...workplumber.org>,
David Daney <david.daney@...ium.com>
Subject: Re: [PATCH net-next v2 1/8] net-timestamp: explicit SO_TIMESTAMPING
ancillary data struct
On 07/07/2014 11:04 PM, Richard Cochran wrote:
> On Mon, Jul 07, 2014 at 02:03:38PM -0700, Chad Reese wrote:
>> On 07/07/2014 01:11 PM, Richard Cochran wrote:
>>> Don't reimplement clock servos in your driver. Instead, leave that to
>>> the PTP stack (like using linuxptp's phc2sys).
>>
>> I obviously did it wrong. The one line comment in
>> Documentation/networking/timestamping.txt was not enough for me to
>> figure out the proper usage of syststamp.
>
> Sorry about not having clearly deprecated syststamp. We'll do that now.
> Next time, putting the PTP maintainer on CC will help catch such things.
>
>> I was trying to stick with standard linux userspace APIs.
>
> There is a standard PTP hardware clock subsystem and API, as explained
> in Documentation/ptp/ptp.txt.
>
>> People
>> have no interest in the PTP clock at all. All they want is for the
>> standard system time to be correct.
>
> You can't have the time correct unless you synchronize it to
> something. That is what NTP and PTP are all about. When using a PTP
> hardware clock, it is necessary to synchronize the Linux system time
> to it. The right way to accomplish this is using a userland PTP
> stack, and the wrong way is to implement a servo in every last MAC
> driver.
You keep saying I implemented a clock servo in the MAC driver. I didn't,
as is apparent in the code. The only kludge was a conversion from the
PTP clock to system time with a simple offset function. I will fully
admit it wasn't great, but it was good enough.
> What I don't understand is, how does your device get the PTP time
> without running the PTP protocol?
I wrote a PTPv2 daemon for Cavium that ran in userspace. It implemented
all the v2 spec with support for both IP and 802.3 transport. This was
done from scratch as there wasn't an opensource PTPv2 daemon at the
time. All this work actually started before there was any PTP timestamp
support in the kernel. I originally started writing PTP to run on bare
metal.
> How can your device work without implementing a PTP clock? What am I
> missing?
I'm guessing the details of our PTP implementation are not available to
the opensource community. It was packaged as a product by Cavium's
marketing along with other software to support base stations.
Chad
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists