On Mon, Jan 01, 2018 at 08:05:31PM -0800, Richard Cochran wrote: > This series adds support for Meinberg Funkuhren's NetSync Monitor > (NSM) protocol. NSM allows a node with a local time reference (like a > GM using GPS) to measure the offset of a given clock. In a nutshell, > NSM works by having the node to be measured act like a unicast master > clock on demand.
Very interesting! It looks a bit like an NTP client/server exchange over PTP. > One the nice features of NSM is that, when used from the GM, it allows > one to empirically determine the end to end asymmetry in the network. You mean asymmetry added by boundary clocks on the path to the grandmaster? > The details of the protocol are described in a brief PDF published by > Meinberg. If anyone would like a copy, please contact me off list. One thing I find odd is that the sync message doesn't have a TLV attached too. Does the specification say anything about that? The asymmetric length of the delay request and sync message will make the delay asymmetric in networks with non-TC switches (using store and forward) and add an error to the measured offset (e.g. 16 nanoseconds per switch on 1Gb network). Are transparent clocks expected to update the correction field in messages with TLVs? > Patches 1-3 fix trivial issues found along the way. > Patches 4-9 add various background support bits. > Patches 10-13 implement NSM in the ptp4l program. On first look these all seem good to me. > Patches 14-18 implement monitor support in the pmc program. This didn't work for me with HW timestamping. I had to modify also pmc_create() to change the timestamping mode in the transport_open() call and set the ts_label in the interface struct. With that, it worked as expected. The offset reported by the NSM command between two machines connected directly and synchronized by ptp4l was very close to zero. Nice! However, is pmc the right place for this functionality? As the exchange does not use any management messages, it would probably make more sense to me if it was in a separate binary, or maybe it could be a special query mode of ptp4l which would just print the offset and exit (with the possibility that it could be later used for normal synchronization of the clock). > The last patch breaks linuxptp-testsuite test 20-pmc. The pmc program > exits immediately with no output at all. When I test pmc outside of > the clknetsim it behaves as expected, but I didn't look into why > clknetsim case fails. Maybe you have an idea? There is a hack which detects that pmc is trying to send a message by checking for POLLOUT in events[1] and nfds == 2. It needs to be updated if the number of descriptors is increased. -- Miroslav Lichvar ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel