Discussion:
[Linuxptp-devel] linuxptp on ubuntu 14.04
Andrei Perietanu
2014-06-16 11:10:50 UTC
Permalink
Hi all,
I'm trying to get ptp working on my machine (running ubuntu 14.04). I
followed the instructions on the website but must have missed something:
when running *sudo ptp4l -i eth0 -m* I get the following messages:


ptp4l[433103.118]: selected /dev/ptp0 as PTP clock
ptp4l[433103.118]: driver changed our HWTSTAMP options
ptp4l[433103.118]: tx_type 1 not 1
ptp4l[433103.118]: rx_filter 1 not 12
ptp4l[433103.118]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[433103.118]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[433110.557]: port 1: LISTENING to MASTER on
ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[433110.557]: selected best master clock 002590.fffe.f2c1e5
ptp4l[433110.557]: assuming the grand master role
ptp4l[433111.558]: timed out while polling for tx timestamp
ptp4l[433111.558]: increasing tx_timestamp_timeout may correct this issue,
but it is likely caused by a driver bug
ptp4l[433111.558]: port 1: send sync failed
ptp4l[433111.558]: port 1: MASTER to FAULTY on FAULT_DETECTED
(FT_UNSPECIFIED)
ptp4l[433127.559]: driver changed our HWTSTAMP options
ptp4l[433127.559]: tx_type 1 not 1
ptp4l[433127.559]: rx_filter 1 not 12
ptp4l[433127.559]: port 1: FAULTY to LISTENING on FAULT_CLEARED
ptp4l[433135.026]: port 1: LISTENING to MASTER on
ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES

My ethernet controller: Intel Corporation I210 Gigabit Network Connection
so it should be fine according to what I found online so far...
Any ideas?

Thanks,
AndreiP
--
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you receive
this in error please contact the sender and delete the material from any
computer immediately. It is the policy of Klas Limited to disavow the
sending of offensive material and should you consider that the material
contained in the message is offensive you should contact the sender
immediately and also your I.T. Manager.

Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.

Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish
Limited Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.
Richard Cochran
2014-06-16 16:46:07 UTC
Permalink
Post by Andrei Perietanu
Hi all,
I'm trying to get ptp working on my machine (running ubuntu 14.04). I
...
Post by Andrei Perietanu
ptp4l[433111.558]: timed out while polling for tx timestamp
ptp4l[433111.558]: increasing tx_timestamp_timeout may correct this issue,
but it is likely caused by a driver bug
...
Post by Andrei Perietanu
My ethernet controller: Intel Corporation I210 Gigabit Network Connection
so it should be fine according to what I found online so far...
Any ideas?
uname -a ?

I would expect the i210 to work out of the box. But there is no
telling how ubuntu has possibly mangled the kernel.

You can try setting tx_timestamp_timeout to 1000 and see if that
helps. (See man ptp4l).

HTH,
Richard

PS this question really belongs on the -users list.
Richard Cochran
2014-06-16 16:49:05 UTC
Permalink
Post by Richard Cochran
uname -a ?
Also,

ethtool -T eth0
ethtool -i eth0

Thanks,
Richard
Richard Cochran
2014-06-17 11:32:51 UTC
Permalink
ethtool -T eth1
hardware-transmit (SOF_TIMESTAMPING_TX_HARDWARE)
software-transmit (SOF_TIMESTAMPING_TX_SOFTWARE)
hardware-receive (SOF_TIMESTAMPING_RX_HARDWARE)
software-receive (SOF_TIMESTAMPING_RX_SOFTWARE)
software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
hardware-raw-clock (SOF_TIMESTAMPING_RAW_HARDWARE)
PTP Hardware Clock: 1
off (HWTSTAMP_TX_OFF)
on (HWTSTAMP_TX_ON)
none (HWTSTAMP_FILTER_NONE)
all (HWTSTAMP_FILTER_ALL)
ptpv1-l4-sync (HWTSTAMP_FILTER_PTP_V1_L4_SYNC)
ptpv1-l4-delay-req (HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ)
ptpv2-l4-sync (HWTSTAMP_FILTER_PTP_V2_L4_SYNC)
ptpv2-l4-delay-req (HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ)
ptpv2-l2-sync (HWTSTAMP_FILTER_PTP_V2_L2_SYNC)
ptpv2-l2-delay-req (HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ)
ptpv2-event (HWTSTAMP_FILTER_PTP_V2_EVENT)
ptpv2-sync (HWTSTAMP_FILTER_PTP_V2_SYNC)
ptpv2-delay-req (HWTSTAMP_FILTER_PTP_V2_DELAY_REQ)
You have hardware time stamping...
[global]
verbose 1
time_stamping software
^^^^^^^^

and so you should use it by saying "hardware" here. (Or just omit this
line, since HW time stamping is the default.)
tx_timestamp_timeout 1000
ptp4l[519792.941]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[519792.941]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[519799.549]: port 1: LISTENING to MASTER on
ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[519799.549]: selected best master clock 002590.fffe.f2c1e4
ptp4l[519799.549]: assuming the grand master role
After this it seams to just...hang; there no other activity. Any ideas?
This is the expected behavior when there is only on PTP node on the
network. Do you have another node to test with?

If not, you can patch your igb/eth0 to the e1000e/eth1 and run two
instances of ptp4l. Then you should see some more activity.

HTH,
Richard
Andrei Perietanu
2014-06-17 12:15:51 UTC
Permalink
I tried using two nodes, both using the same configuration file.
rand the same command on both machines *sudo ptp4l -i eth1 -f
/etc/ptp4l.conf* and got the same behaviour as before; they both seem to be
hanging...
Am I missing something?

Thanks,
Andrei
Post by Richard Cochran
ethtool -T eth1
hardware-transmit (SOF_TIMESTAMPING_TX_HARDWARE)
software-transmit (SOF_TIMESTAMPING_TX_SOFTWARE)
hardware-receive (SOF_TIMESTAMPING_RX_HARDWARE)
software-receive (SOF_TIMESTAMPING_RX_SOFTWARE)
software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
hardware-raw-clock (SOF_TIMESTAMPING_RAW_HARDWARE)
PTP Hardware Clock: 1
off (HWTSTAMP_TX_OFF)
on (HWTSTAMP_TX_ON)
none (HWTSTAMP_FILTER_NONE)
all (HWTSTAMP_FILTER_ALL)
ptpv1-l4-sync (HWTSTAMP_FILTER_PTP_V1_L4_SYNC)
ptpv1-l4-delay-req (HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ)
ptpv2-l4-sync (HWTSTAMP_FILTER_PTP_V2_L4_SYNC)
ptpv2-l4-delay-req (HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ)
ptpv2-l2-sync (HWTSTAMP_FILTER_PTP_V2_L2_SYNC)
ptpv2-l2-delay-req (HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ)
ptpv2-event (HWTSTAMP_FILTER_PTP_V2_EVENT)
ptpv2-sync (HWTSTAMP_FILTER_PTP_V2_SYNC)
ptpv2-delay-req (HWTSTAMP_FILTER_PTP_V2_DELAY_REQ)
You have hardware time stamping...
[global]
verbose 1
time_stamping software
^^^^^^^^
and so you should use it by saying "hardware" here. (Or just omit this
line, since HW time stamping is the default.)
tx_timestamp_timeout 1000
ptp4l[519792.941]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[519792.941]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[519799.549]: port 1: LISTENING to MASTER on
ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[519799.549]: selected best master clock 002590.fffe.f2c1e4
ptp4l[519799.549]: assuming the grand master role
After this it seams to just...hang; there no other activity. Any ideas?
This is the expected behavior when there is only on PTP node on the
network. Do you have another node to test with?
If not, you can patch your igb/eth0 to the e1000e/eth1 and run two
instances of ptp4l. Then you should see some more activity.
HTH,
Richard
--
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you receive
this in error please contact the sender and delete the material from any
computer immediately. It is the policy of Klas Limited to disavow the
sending of offensive material and should you consider that the material
contained in the message is offensive you should contact the sender
immediately and also your I.T. Manager.

Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.

Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish
Limited Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.
Richard Cochran
2014-06-17 12:36:23 UTC
Permalink
Post by Andrei Perietanu
I tried using two nodes, both using the same configuration file.
But this time with HW time stamping, right?
Post by Andrei Perietanu
rand the same command on both machines *sudo ptp4l -i eth1 -f
/etc/ptp4l.conf* and got the same behaviour as before; they both seem to be
hanging...
BTW you can see more output with the -l9 command line option.
Post by Andrei Perietanu
Am I missing something?
Do you see the Announce messages in wireshark?

Thanks,
Richard
Andrei Perietanu
2014-06-17 14:20:42 UTC
Permalink
I've set both nodes in private network, both using HW times stamping, but I
still don't get too much output in the console - it's the same as before
(when I said they seam to just hang...)

Here's what's going on in wireshark:

10 2.003451000 10.20.20.2 224.0.1.129 PTPv2 86 Delay_Req
Message
11 2.566179000 10.20.20.1 224.0.1.129 PTPv2 86 Follow_Up
Message
12 2.566203000 10.20.20.1 224.0.1.129 PTPv2 96 Delay_Resp
Message
13 2.566209000 10.20.20.1 224.0.1.129 PTPv2 86 Sync
Message
14 3.566285000 10.20.20.1 224.0.1.129 PTPv2 86 Follow_Up
Message
15 3.566308000 10.20.20.1 224.0.1.129 PTPv2 106 Announce
Message
16 3.566315000 10.20.20.1 224.0.1.129 PTPv2 86 Sync
Message
17 3.630542000 10.20.20.2 224.0.1.129 PTPv2 86 Delay_Req
Message
.... and the sequence keeps repeating

Does this look right to you?

Thanks,
Andrei
Post by Richard Cochran
Post by Andrei Perietanu
I tried using two nodes, both using the same configuration file.
But this time with HW time stamping, right?
Post by Andrei Perietanu
rand the same command on both machines *sudo ptp4l -i eth1 -f
/etc/ptp4l.conf* and got the same behaviour as before; they both seem to
be
Post by Andrei Perietanu
hanging...
BTW you can see more output with the -l9 command line option.
Post by Andrei Perietanu
Am I missing something?
Do you see the Announce messages in wireshark?
Thanks,
Richard
--
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you receive
this in error please contact the sender and delete the material from any
computer immediately. It is the policy of Klas Limited to disavow the
sending of offensive material and should you consider that the material
contained in the message is offensive you should contact the sender
immediately and also your I.T. Manager.

Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.

Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish
Limited Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.
Richard Cochran
2014-06-17 14:51:03 UTC
Permalink
Post by Andrei Perietanu
Does this look right to you?
Yes.

Did you use the -m and -q options? If not, then the messages are sent
to the syslog.

HTH,
Richard
Andrei Perietanu
2014-06-17 15:00:36 UTC
Permalink
I tried now *sudo ptp4l -i eth1 -i9 -f /etc/ptp4l.conf -m -q* on both
machines
and I still don't see too much output:

ptp4l[532989.495]: ioctl SIOCETHTOOL failed: No such device
ptp4l[532989.495]: selected /dev/ptp1 as PTP clock
ptp4l[532989.495]: port 2: get_ts_info not supported
ptp4l[532989.495]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[532989.497]: ioctl SIOCGIFHWADDR failed: No such device
ptp4l[532989.499]: ioctl SIOCGIFINDEX failed: No such device
ptp4l[532989.499]: port 2: INITIALIZING to FAULTY on INITIALIZE
ptp4l[532989.499]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[532990.051]: port 1: new foreign master 00e04b.fffe.3b5762-1
ptp4l[532996.749]: port 1: LISTENING to MASTER on
ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[532996.749]: selected best master clock 002590.fffe.f2c1e4
ptp4l[532996.749]: assuming the grand master role
ptp4l[532996.749]: assuming the grand master role

and on the other one:
ptp4l[371191.004]: ioctl SIOCETHTOOL failed: No such device
ptp4l[371191.005]: selected /dev/ptp0 as PTP clock
ptp4l[371191.005]: port 2: get_ts_info not supported
ptp4l[371191.005]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[371191.012]: ioctl SIOCGIFHWADDR failed: No such device
ptp4l[371191.015]: ioctl SIOCGIFINDEX failed: No such device
ptp4l[371191.015]: port 2: INITIALIZING to FAULTY on INITIALIZE
ptp4l[371191.015]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[371191.747]: port 1: new foreign master 002590.fffe.f2c1e4-1
ptp4l[371195.749]: selected best master clock 002590.fffe.f2c1e4
ptp4l[371195.749]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE

but that is about it....so I still can't tell weather it's all working fine
or not yet

Thanks,
Andrei
Post by Richard Cochran
Post by Andrei Perietanu
Does this look right to you?
Yes.
Did you use the -m and -q options? If not, then the messages are sent
to the syslog.
HTH,
Richard
--
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you receive
this in error please contact the sender and delete the material from any
computer immediately. It is the policy of Klas Limited to disavow the
sending of offensive material and should you consider that the material
contained in the message is offensive you should contact the sender
immediately and also your I.T. Manager.

Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.

Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish
Limited Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.
Miroslav Lichvar
2014-06-17 15:33:42 UTC
Permalink
Post by Andrei Perietanu
I tried now *sudo ptp4l -i eth1 -i9 -f /etc/ptp4l.conf -m -q* on both
machines
I think that should be -l9, not -i9.
--
Miroslav Lichvar
Andrei Perietanu
2014-06-17 15:39:29 UTC
Permalink
Post by Andrei Perietanu
I tried now *sudo ptp4l -i eth1 -i9 -f /etc/ptp4l.conf -m -q* on both
machines
I think that should be -l9, not -i9.
Well that's what I initially thought but there is no -l9 (1-7 are valid
values)
Post by Andrei Perietanu
Post by Andrei Perietanu
I tried now *sudo ptp4l -i eth1 -i9 -f /etc/ptp4l.conf -m -q* on both
machines
I think that should be -l9, not -i9.
--
Miroslav Lichvar
--
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you receive
this in error please contact the sender and delete the material from any
computer immediately. It is the policy of Klas Limited to disavow the
sending of offensive material and should you consider that the material
contained in the message is offensive you should contact the sender
immediately and also your I.T. Manager.

Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.

Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish
Limited Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.
Andrei Perietanu
2014-06-17 15:45:18 UTC
Permalink
anyway running the command with -l7 option *sudo ptp4l -i eth1 -l7 -f
/etc/ptp4l.conf -m -q*

I get:
ptp4l[535940.417]: selected /dev/ptp1 as PTP clock
ptp4l[535940.417]: PI servo: sync interval 1.000 kp 0.700 ki 0.300000
ptp4l[535940.417]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[535940.417]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[535942.634]: port 1: setting asCapable
ptp4l[535942.634]: port 1: new foreign master 00e04b.fffe.3b5762-1
ptp4l[535946.639]: selected best master clock 00e04b.fffe.3b5762
ptp4l[535946.639]: assuming the grand master role
ptp4l[535946.639]: port 1: LISTENING to GRAND_MASTER on RS_GRAND_MASTER
ptp4l[535946.640]: port 1: master tx announce timeout
ptp4l[535947.639]: port 1: master sync timeout
ptp4l[535948.640]: port 1: master tx announce timeout
ptp4l[535948.641]: port 1: master sync timeout
ptp4l[535949.641]: port 1: master sync timeout
ptp4l[535950.641]: port 1: master tx announce timeout
ptp4l[535950.641]: port 1: master sync timeout
ptp4l[535951.641]: port 1: master sync timeout
ptp4l[535952.642]: port 1: master tx announce timeout
ptp4l[535952.642]: port 1: master sync timeout
ptp4l[535953.642]: port 1: master sync timeout
ptp4l[535954.643]: port 1: master tx announce timeout
ptp4l[535954.643]: port 1: master sync timeout
ptp4l[535955.644]: port 1: master sync timeout


and the other node prints out "port1: delay timeout " repeatedly

So something is still no right...

Thanks for any suggestions,
Andrei





On Tue, Jun 17, 2014 at 4:39 PM, Andrei Perietanu <
Post by Andrei Perietanu
Post by Andrei Perietanu
I tried now *sudo ptp4l -i eth1 -i9 -f /etc/ptp4l.conf -m -q* on both
machines
I think that should be -l9, not -i9.
Well that's what I initially thought but there is no -l9 (1-7 are valid
values)
Post by Andrei Perietanu
Post by Andrei Perietanu
I tried now *sudo ptp4l -i eth1 -i9 -f /etc/ptp4l.conf -m -q* on both
machines
I think that should be -l9, not -i9.
--
Miroslav Lichvar
--
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you receive
this in error please contact the sender and delete the material from any
computer immediately. It is the policy of Klas Limited to disavow the
sending of offensive material and should you consider that the material
contained in the message is offensive you should contact the sender
immediately and also your I.T. Manager.

Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.

Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish
Limited Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.
Richard Cochran
2014-06-17 17:05:18 UTC
Permalink
Post by Andrei Perietanu
ptp4l[535954.643]: port 1: master sync timeout
ptp4l[535955.644]: port 1: master sync timeout
and the other node prints out "port1: delay timeout " repeatedly
So something is still no right...
Some of the messages are getting through, because the second node does
become a slave. Looks like the Sync messages are not being received by
the slave. You can check that with wireshark on the second node.

Maybe you a have a firewall that is dropping PTP event messages?

Is there a router or switch in between the two nodes?

Thanks,
Richard
Keller, Jacob E
2014-06-17 20:05:59 UTC
Permalink
Post by Andrei Perietanu
anyway running the command with -l7 option *sudo ptp4l -i eth1 -l7
-f /etc/ptp4l.conf -m -q*
ptp4l[535940.417]: selected /dev/ptp1 as PTP clock
ptp4l[535940.417]: PI servo: sync interval 1.000 kp 0.700 ki 0.300000
ptp4l[535940.417]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[535940.417]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[535942.634]: port 1: setting asCapable
ptp4l[535942.634]: port 1: new foreign master 00e04b.fffe.3b5762-1
ptp4l[535946.639]: selected best master clock 00e04b.fffe.3b5762
ptp4l[535946.639]: assuming the grand master role
ptp4l[535946.639]: port 1: LISTENING to GRAND_MASTER on
RS_GRAND_MASTER
ptp4l[535946.640]: port 1: master tx announce timeout
ptp4l[535947.639]: port 1: master sync timeout
ptp4l[535948.640]: port 1: master tx announce timeout
ptp4l[535948.641]: port 1: master sync timeout
ptp4l[535949.641]: port 1: master sync timeout
ptp4l[535950.641]: port 1: master tx announce timeout
ptp4l[535950.641]: port 1: master sync timeout
ptp4l[535951.641]: port 1: master sync timeout
ptp4l[535952.642]: port 1: master tx announce timeout
ptp4l[535952.642]: port 1: master sync timeout
ptp4l[535953.642]: port 1: master sync timeout
ptp4l[535954.643]: port 1: master tx announce timeout
ptp4l[535954.643]: port 1: master sync timeout
ptp4l[535955.644]: port 1: master sync timeout
I suggest using:

sudo ptp4l -i eth1 -l6 -f /etc/ptp4l.conf -m -q


The l7 output displays a bunch of much less useful output, which can
clutter the display.

Hopefully this helps,
Jake
Post by Andrei Perietanu
and the other node prints out "port1: delay timeout " repeatedly
So something is still no right...
Thanks for any suggestions,
Andrei
On Tue, Jun 17, 2014 at 4:39 PM, Andrei Perietanu
Post by Andrei Perietanu
I tried now *sudo ptp4l -i eth1 -i9 -f /etc/ptp4l.conf -m
-q* on both
Post by Andrei Perietanu
machines
I think that should be -l9, not -i9.
Well that's what I initially thought but there is no -l9 (1-7
are valid values)
On Tue, Jun 17, 2014 at 4:33 PM, Miroslav Lichvar
On Tue, Jun 17, 2014 at 04:00:36PM +0100, Andrei
Post by Andrei Perietanu
I tried now *sudo ptp4l -i eth1 -i9
-f /etc/ptp4l.conf -m -q* on both
Post by Andrei Perietanu
machines
I think that should be -l9, not -i9.
--
Miroslav Lichvar
The information transmitted is intended only for the person or entity
to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or
other use of or taking of any action in reliance upon this information
by persons or entities other than the intended recipient is
prohibited. If you receive this in error please contact the sender and
delete the material from any computer immediately. It is the policy of
Klas Limited to disavow the sending of offensive material and should
you consider that the material contained in the message is offensive
you should contact the sender immediately and also your I.T. Manager.
Klas Telecom Inc., a Virginia Corporation with offices at 1101
30th St. NW, Washington, DC 20007.
Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish
Limited Liability Company, with its registered office at Fourth Floor,
One Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Linuxptp-devel mailing list
https://lists.sourceforge
Richard Cochran
2014-06-18 03:35:28 UTC
Permalink
Post by Keller, Jacob E
The l7 output displays a bunch of much less useful output, which can
clutter the display.
I only suggested to run with debug logging because Andrei was
complaining that nothing was happening.

Now we see that both master and slave believe that they are sending
protocol messages.

Thanks,
Richard
Andrei Perietanu
2014-06-18 09:52:05 UTC
Permalink
My configuration right now is like this: two nodes plugged into a switch,
representing a small private Network. There is no firewall (so no ip tables
to turn off)
the two nodes are: 10.20.20.1(master) and 10.20.20.2(slave)...an the
wireshark capture looks like this:
....
559 114.507488000 10.20.20.2 224.0.1.129 PTPv2 86
Delay_Req Message
560 114.893677000 10.20.20.1 224.0.1.129 PTPv2 86
Follow_Up Message
561 114.893698000 10.20.20.1 224.0.1.129 PTPv2 96
Delay_Resp Message
562 114.893703000 10.20.20.1 224.0.1.129 PTPv2 86 Sync
Message
563 115.894749000 10.20.20.1 224.0.1.129 PTPv2 86
Follow_Up Message
564 115.894768000 10.20.20.1 224.0.1.129 PTPv2 106
Announce Message
565 115.894772000 10.20.20.1 224.0.1.129 PTPv2 86 Sync
Message
566 116.427300000 10.20.20.2 224.0.1.129 PTPv2 86
Delay_Req Message
567 116.894867000 10.20.20.1 224.0.1.129 PTPv2 86
Follow_Up Message
....

so messages seem to get through, but still something seems to be wrong
since I don't see much output on the console.
Are these all the messages I should see in wireshark or are some missing?

Thanks,
Andrei
Post by Richard Cochran
Post by Keller, Jacob E
The l7 output displays a bunch of much less useful output, which can
clutter the display.
I only suggested to run with debug logging because Andrei was
complaining that nothing was happening.
Now we see that both master and slave believe that they are sending
protocol messages.
Thanks,
Richard
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Linuxptp-devel mailing list
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel
--
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you receive
this in error please contact the sender and delete the material from any
computer immediately. It is the policy of Klas Limited to disavow the
sending of offensive material and should you consider that the material
contained in the message is offensive you should contact the sender
immediately and also your I.T. Manager.

Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.

Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish
Limited Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.
Andrei Perietanu
2014-06-18 11:12:58 UTC
Permalink
correct me if I'm wrong but isn't the master supposed to send the Announce
message only once, at initialization time, and after that just send sync
and follow-up messages? I can see a lot of Announce Messages sent by the
master:

48 11.006178000 10.20.20.1 224.0.1.129 PTPv2 106 Announce
Message
49 11.006202000 10.20.20.1 224.0.1.129 PTPv2 86 Sync
Message
50 11.823204000 10.20.20.2 224.0.1.129 PTPv2 86 Delay_Req
Message
51 12.007255000 10.20.20.1 224.0.1.129 PTPv2 86 Follow_Up
Message
52 12.007278000 10.20.20.1 224.0.1.129 PTPv2 96
Delay_Resp Message
53 12.007285000 10.20.20.1 224.0.1.129 PTPv2 86 Sync
Message
54 12.849427000 10.20.20.2 224.0.1.129 PTPv2 86 Delay_Req
Message
55 13.007375000 10.20.20.1 224.0.1.129 PTPv2 86 Follow_Up
Message
56 13.007403000 10.20.20.1 224.0.1.129 PTPv2 96
Delay_Resp Message
57 13.007412000 10.20.20.1 224.0.1.129 PTPv2 106 Announce
Message

Announce Messages are send every 7-8 messages. Is this right?

Thanks,
Andrei


On Wed, Jun 18, 2014 at 10:52 AM, Andrei Perietanu <
Post by Andrei Perietanu
My configuration right now is like this: two nodes plugged into a switch,
representing a small private Network. There is no firewall (so no ip tables
to turn off)
the two nodes are: 10.20.20.1(master) and 10.20.20.2(slave)...an the
....
559 114.507488000 10.20.20.2 224.0.1.129 PTPv2 86
Delay_Req Message
560 114.893677000 10.20.20.1 224.0.1.129 PTPv2 86
Follow_Up Message
561 114.893698000 10.20.20.1 224.0.1.129 PTPv2 96
Delay_Resp Message
562 114.893703000 10.20.20.1 224.0.1.129 PTPv2 86 Sync
Message
563 115.894749000 10.20.20.1 224.0.1.129 PTPv2 86
Follow_Up Message
564 115.894768000 10.20.20.1 224.0.1.129 PTPv2 106
Announce Message
565 115.894772000 10.20.20.1 224.0.1.129 PTPv2 86 Sync
Message
566 116.427300000 10.20.20.2 224.0.1.129 PTPv2 86
Delay_Req Message
567 116.894867000 10.20.20.1 224.0.1.129 PTPv2 86
Follow_Up Message
....
so messages seem to get through, but still something seems to be wrong
since I don't see much output on the console.
Are these all the messages I should see in wireshark or are some missing?
Thanks,
Andrei
Post by Richard Cochran
Post by Keller, Jacob E
The l7 output displays a bunch of much less useful output, which can
clutter the display.
I only suggested to run with debug logging because Andrei was
complaining that nothing was happening.
Now we see that both master and slave believe that they are sending
protocol messages.
Thanks,
Richard
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Linuxptp-devel mailing list
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel
--
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you receive
this in error please contact the sender and delete the material from any
computer immediately. It is the policy of Klas Limited to disavow the
sending of offensive material and should you consider that the material
contained in the message is offensive you should contact the sender
immediately and also your I.T. Manager.

Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.

Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish
Limited Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.
Richard Cochran
2014-06-18 11:32:19 UTC
Permalink
Post by Andrei Perietanu
Announce Messages are send every 7-8 messages. Is this right?
Yes, that is normal.

Are you running wireshark on the slave or on the master?

What is the output of the following command?

ptp4l -v

Thanks,
Richard
Andrei Perietanu
2014-06-18 11:37:46 UTC
Permalink
I'm running wireshark on the master

ptp4l -v
1.4

Regards,
Andrei
Post by Richard Cochran
Post by Andrei Perietanu
Announce Messages are send every 7-8 messages. Is this right?
Yes, that is normal.
Are you running wireshark on the slave or on the master?
What is the output of the following command?
ptp4l -v
Thanks,
Richard
--
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you receive
this in error please contact the sender and delete the material from any
computer immediately. It is the policy of Klas Limited to disavow the
sending of offensive material and should you consider that the material
contained in the message is offensive you should contact the sender
immediately and also your I.T. Manager.

Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.

Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish
Limited Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.
Richard Cochran
2014-06-18 11:51:36 UTC
Permalink
Post by Andrei Perietanu
I'm running wireshark on the master
Please try it on the slave, to see if the Sync messages are arriving.

Thanks,
Richard
Andrei Perietanu
2014-06-18 12:13:27 UTC
Permalink
I tried running wireshark on both nodes and I see the exact same wireshark
output on both of them, so sync messages are being received by the slave.
Post by Richard Cochran
Post by Andrei Perietanu
I'm running wireshark on the master
Please try it on the slave, to see if the Sync messages are arriving.
Thanks,
Richard
--
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you receive
this in error please contact the sender and delete the material from any
computer immediately. It is the policy of Klas Limited to disavow the
sending of offensive material and should you consider that the material
contained in the message is offensive you should contact the sender
immediately and also your I.T. Manager.

Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.

Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish
Limited Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.
Richard Cochran
2014-06-18 14:33:12 UTC
Permalink
Post by Andrei Perietanu
I tried running wireshark on both nodes and I see the exact same wireshark
output on both of them, so sync messages are being received by the slave.
Okay, then something very strange is happening, and I can't imagine
what is going on. The one difference between wireshark and ptp4l is
that wireshark uses promiscuous mode, while ptp4l joins the multicast
group.

Here are two things to try.

1. Easy: run ptp4l with the '-2' (L2 transport) flag
2. Harder: try a vanilla kernel

Sorry,
Richard
Andrei Perietanu
2014-06-18 15:49:38 UTC
Permalink
I tried the easy option *run ptp4l with the '-2' (L2 transport) flag* but
that changed nothing... so I tried something different: I changed
tx_timestamp_timeout from 1000 to 100 and now I get some output on the
slave node.
The output of the master node:

ptp4l[622024.340]: selected /dev/ptp1 as PTP clock
ptp4l[622024.340]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[622024.340]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[622026.448]: port 1: new foreign master 00e04b.fffe.3b5762-1
ptp4l[622030.527]: selected best master clock 00e04b.fffe.3b5762
ptp4l[622030.527]: assuming the grand master role
ptp4l[622030.527]: port 1: LISTENING to GRAND_MASTER on RS_GRAND_MASTER

and that's it..stops at that

The output of the slave node:

ptp4l[459942.424]: selected /dev/ptp0 as PTP clock
ptp4l[459942.425]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[459942.425]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[459949.497]: port 1: LISTENING to MASTER on
ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[459949.497]: selected best master clock 00e04b.fffe.3b5762
ptp4l[459949.497]: assuming the grand master role
ptp4l[459953.600]: port 1: new foreign master 002590.fffe.f2c1e4-1
ptp4l[459957.700]: selected best master clock 002590.fffe.f2c1e4
ptp4l[459957.700]: port 1: MASTER to UNCALIBRATED on RS_SLAVE
ptp4l[459959.700]: master offset 70392990950326 s0 freq +42196 path
delay 11935
ptp4l[459960.700]: master offset 70392990967298 s1 freq +59166 path
delay 11388
ptp4l[459961.700]: master offset -38681 s2 freq +20485 path delay
11388
ptp4l[459961.700]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
ptp4l[459962.700]: master offset -46656 s2 freq +905 path delay
11388
ptp4l[459963.700]: master offset -33290 s2 freq +275 path delay
11627
ptp4l[459964.700]: master offset -16728 s2 freq +6850 path delay
11234
ptp4l[459965.700]: master offset -6979 s2 freq +11580 path delay
11781
ptp4l[459966.700]: master offset -2157 s2 freq +14308 path delay
12304
ptp4l[459967.775]: master offset -297 s2 freq +15521 path delay
12947
ptp4l[459968.700]: master offset -27 s2 freq +15702 path delay
13803
ptp4l[459969.700]: master offset -16 s2 freq +15705 path delay
14554
ptp4l[459970.701]: master offset -359 s2 freq +15357 path delay
15659
ptp4l[459971.701]: master offset 706 s2 freq +16315 path delay
15659
ptp4l[459972.701]: master offset 622 s2 freq +16442 path delay
16007
ptp4l[459973.701]: master offset 614 s2 freq +16621 path delay
16076
ptp4l[459974.701]: master offset 390 s2 freq +16581 path delay
16186
ptp4l[459975.787]: master offset 281 s2 freq +16589 path delay
16186
ptp4l[459976.701]: master offset 145 s2 freq +16538 path delay
16238


now, when this happened, I noticed my system clock went rogue - for some
reason it thinks it's July 11th 12:00 am (it's configured toget time
automatically from the internet)

So, two questions come to mind:
1. is ptp working correcly now? O sould I see some messages on the master's
console as well
2. why did my system clock decide to change tu such an awkward value?


Also I tried running *sudo phc2sys -s eth1 -w -q* but this does not seem to
work; it's like phc2sys is waiting for ptp4l, even though ptp4l is already
running. any ideas on this one?

Thanks,
Andrei
Post by Richard Cochran
Post by Andrei Perietanu
I tried running wireshark on both nodes and I see the exact same
wireshark
Post by Andrei Perietanu
output on both of them, so sync messages are being received by the slave.
Okay, then something very strange is happening, and I can't imagine
what is going on. The one difference between wireshark and ptp4l is
that wireshark uses promiscuous mode, while ptp4l joins the multicast
group.
Here are two things to try.
1. Easy: run ptp4l with the '-2' (L2 transport) flag
2. Harder: try a vanilla kernel
Sorry,
Richard
--
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you receive
this in error please contact the sender and delete the material from any
computer immediately. It is the policy of Klas Limited to disavow the
sending of offensive material and should you consider that the material
contained in the message is offensive you should contact the sender
immediately and also your I.T. Manager.

Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.

Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish
Limited Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.
Richard Cochran
2014-06-18 16:10:44 UTC
Permalink
Post by Andrei Perietanu
I tried the easy option *run ptp4l with the '-2' (L2 transport) flag* but
that changed nothing... so I tried something different: I changed
tx_timestamp_timeout from 1000 to 100 and now I get some output on the
slave node.
That is really very suspicious. I think this must be a red herring,
and something *else* changed.
Post by Andrei Perietanu
ptp4l[622024.340]: selected /dev/ptp1 as PTP clock
ptp4l[622024.340]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[622024.340]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[622026.448]: port 1: new foreign master 00e04b.fffe.3b5762-1
ptp4l[622030.527]: selected best master clock 00e04b.fffe.3b5762
ptp4l[622030.527]: assuming the grand master role
ptp4l[622030.527]: port 1: LISTENING to GRAND_MASTER on RS_GRAND_MASTER
and that's it..stops at that
Normal for a master node.
Post by Andrei Perietanu
ptp4l[459942.424]: selected /dev/ptp0 as PTP clock
ptp4l[459942.425]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[459942.425]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[459949.497]: port 1: LISTENING to MASTER on
ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[459949.497]: selected best master clock 00e04b.fffe.3b5762
ptp4l[459949.497]: assuming the grand master role
ptp4l[459953.600]: port 1: new foreign master 002590.fffe.f2c1e4-1
ptp4l[459957.700]: selected best master clock 002590.fffe.f2c1e4
ptp4l[459957.700]: port 1: MASTER to UNCALIBRATED on RS_SLAVE
...
Post by Andrei Perietanu
ptp4l[459976.701]: master offset 145 s2 freq +16538 path delay 16238
This is also working.
Post by Andrei Perietanu
now, when this happened, I noticed my system clock went rogue - for some
reason it thinks it's July 11th 12:00 am (it's configured toget time
automatically from the internet)
That is strange. You must be sure to turn off NTP first, if you want
to use phc2sys (or ptp4l with SW time stamping). Otherwise, the two
programs will fight each other.
Post by Andrei Perietanu
1. is ptp working correcly now? O sould I see some messages on the master's
console as well
Yes, looks like it.
Post by Andrei Perietanu
2. why did my system clock decide to change tu such an awkward value?
Are you perhaps still using SW time stamping? That would explain it.

Thanks,
Richard
Andrei Perietanu
2014-06-19 08:23:01 UTC
Permalink
Post by Andrei Perietanu
now, when this happened, I noticed my system clock went rogue - for some
reason it thinks it's July 11th 12:00 am (it's configured toget time
automatically from the internet)
That is strange. You must be sure to turn off NTP first, if you want
to use phc2sys (or ptp4l with SW time stamping). Otherwise, the two
programs will fight each other.
I don't think I have ntp running:

sudo /etc/init.d/ntp stop
sudo: /etc/init.d/ntp: command not found

sudo service ntp stop
ntp: unrecognized service

that's what I found online about stopping ntp at least; is there some other
command I'm supposed to run?
Post by Andrei Perietanu
2. why did my system clock decide to change tu such an awkward value?
Are you perhaps still using SW time stamping? That would explain it.
I'm actually using HW timestamping and can't find anything on the internet
about this problem...

Thanks,
Andrei
Post by Andrei Perietanu
Post by Andrei Perietanu
I tried the easy option *run ptp4l with the '-2' (L2 transport) flag* but
that changed nothing... so I tried something different: I changed
tx_timestamp_timeout from 1000 to 100 and now I get some output on the
slave node.
That is really very suspicious. I think this must be a red herring,
and something *else* changed.
Post by Andrei Perietanu
ptp4l[622024.340]: selected /dev/ptp1 as PTP clock
ptp4l[622024.340]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[622024.340]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[622026.448]: port 1: new foreign master 00e04b.fffe.3b5762-1
ptp4l[622030.527]: selected best master clock 00e04b.fffe.3b5762
ptp4l[622030.527]: assuming the grand master role
ptp4l[622030.527]: port 1: LISTENING to GRAND_MASTER on RS_GRAND_MASTER
and that's it..stops at that
Normal for a master node.
Post by Andrei Perietanu
ptp4l[459942.424]: selected /dev/ptp0 as PTP clock
ptp4l[459942.425]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[459942.425]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[459949.497]: port 1: LISTENING to MASTER on
ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[459949.497]: selected best master clock 00e04b.fffe.3b5762
ptp4l[459949.497]: assuming the grand master role
ptp4l[459953.600]: port 1: new foreign master 002590.fffe.f2c1e4-1
ptp4l[459957.700]: selected best master clock 002590.fffe.f2c1e4
ptp4l[459957.700]: port 1: MASTER to UNCALIBRATED on RS_SLAVE
...
Post by Andrei Perietanu
ptp4l[459976.701]: master offset 145 s2 freq +16538 path delay
16238
This is also working.
Post by Andrei Perietanu
now, when this happened, I noticed my system clock went rogue - for some
reason it thinks it's July 11th 12:00 am (it's configured toget time
automatically from the internet)
That is strange. You must be sure to turn off NTP first, if you want
to use phc2sys (or ptp4l with SW time stamping). Otherwise, the two
programs will fight each other.
Post by Andrei Perietanu
1. is ptp working correcly now? O sould I see some messages on the
master's
Post by Andrei Perietanu
console as well
Yes, looks like it.
Post by Andrei Perietanu
2. why did my system clock decide to change tu such an awkward value?
Are you perhaps still using SW time stamping? That would explain it.
Thanks,
Richard
--
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you receive
this in error please contact the sender and delete the material from any
computer immediately. It is the policy of Klas Limited to disavow the
sending of offensive material and should you consider that the material
contained in the message is offensive you should contact the sender
immediately and also your I.T. Manager.

Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.

Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish
Limited Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.
Richard Cochran
2014-06-19 09:32:29 UTC
Permalink
Post by Andrei Perietanu
Post by Andrei Perietanu
now, when this happened, I noticed my system clock went rogue - for some
reason it thinks it's July 11th 12:00 am (it's configured toget time
automatically from the internet)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

What did you mean by this?

You must be using ntp or chrony or something.
Post by Andrei Perietanu
I'm actually using HW timestamping and can't find anything on the internet
about this problem...
If you are using HW time stamping, then ptp4l does not touch the
system clock. Therefore, some other program is causing the strange
jump in time.

Thanks,
Richard
Andrei Perietanu
2014-06-19 13:53:12 UTC
Permalink
I was running *ptp4l* and *phc2sys* this is what caused the behavior. But
as far as ntp goes I did not start anything myself and did not find any ntp
service in the backgorund...though I get your point a conflict between two
programs is likely to be the cause.

anyway once I stopped phc2sys after a while (about one hour) it went back
to normal...

Thanks for your help,
Andrei
Post by Richard Cochran
Post by Andrei Perietanu
Post by Andrei Perietanu
now, when this happened, I noticed my system clock went rogue - for
some
Post by Andrei Perietanu
Post by Andrei Perietanu
reason it thinks it's July 11th 12:00 am (it's configured toget time
automatically from the internet)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
What did you mean by this?
You must be using ntp or chrony or something.
Post by Andrei Perietanu
I'm actually using HW timestamping and can't find anything on the
internet
Post by Andrei Perietanu
about this problem...
If you are using HW time stamping, then ptp4l does not touch the
system clock. Therefore, some other program is causing the strange
jump in time.
Thanks,
Richard
--
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you receive
this in error please contact the sender and delete the material from any
computer immediately. It is the policy of Klas Limited to disavow the
sending of offensive material and should you consider that the material
contained in the message is offensive you should contact the sender
immediately and also your I.T. Manager.

Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.

Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish
Limited Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.
Richard Cochran
2014-06-22 06:16:43 UTC
Permalink
Post by Andrei Perietanu
I was running *ptp4l* and *phc2sys* this is what caused the behavior. But
as far as ntp goes I did not start anything myself and did not find any ntp
service in the backgorund...though I get your point a conflict between two
programs is likely to be the cause.
anyway once I stopped phc2sys after a while (about one hour) it went back
to normal...
Well, you did not tell us about running phc2sys before.

Now the situation is clear. It is important to remember that the Linux
system clock and your NIC's the PTP Hardware Clock (PHC) are totally
separate. When your computer boots, the PHC has some random time
value, unless you arrange to set the time on that clock. The role of
the phc2sys program is to synchronize the PHC and the Linux system
clock.

You ptp4l master node uses its PHC, and your slave node synchronizes
to the master. Now your slave PHC will have some random time from the
master's NIC. If you then run phc2sys on the slave, you synchronize
your Linux system clock to the random NIC time on the master.

So you want to ensure that the master's PHC has the correct time. You
need to synchronize it to something. You *can* use phc2sys program to
synchronize it to the master's system clock (by reversing the normal
phc2sys settings), but in a production setting you would synchronize
the PHC to a GPS clock, for example.

HTH,
Richard
Keller, Jacob E
2014-06-19 16:19:41 UTC
Permalink
Post by Andrei Perietanu
Post by Andrei Perietanu
now, when this happened, I noticed my system clock went rogue - for
some
Post by Andrei Perietanu
reason it thinks it's July 11th 12:00 am (it's configured toget time
automatically from the internet)
That is strange. You must be sure to turn off NTP first, if you want
to use phc2sys (or ptp4l with SW time stamping). Otherwise, the two
programs will fight each other.
sudo /etc/init.d/ntp stop
sudo: /etc/init.d/ntp: command not found
sudo /etc/init.d/ntpd stop
sudo /etc/init.d/ntpdate stop
Post by Andrei Perietanu
sudo service ntp stop
ntp: unrecognized service
that's what I found online about stopping ntp at least; is there some
other command I'm supposed to run?
Post by Andrei Perietanu
2. why did my system clock decide to change tu such an awkward
value?
Post by Andrei Perietanu
Are you perhaps still using SW time stamping? That would explain it.
It certainly appears like you are using software timestamps.
Post by Andrei Perietanu
I'm actually using HW timestamping and can't find anything on the
internet about this problem...
Thanks,
Andrei
Thanks,
Jake
Post by Andrei Perietanu
On Wed, Jun 18, 2014 at 5:10 PM, Richard Cochran
Post by Andrei Perietanu
I tried the easy option *run ptp4l with the '-2' (L2
transport) flag* but
Post by Andrei Perietanu
that changed nothing... so I tried something different: I
changed
Post by Andrei Perietanu
tx_timestamp_timeout from 1000 to 100 and now I get some
output on the
Post by Andrei Perietanu
slave node.
That is really very suspicious. I think this must be a red herring,
and something *else* changed.
Post by Andrei Perietanu
ptp4l[622024.340]: selected /dev/ptp1 as PTP clock
ptp4l[622024.340]: port 1: INITIALIZING to LISTENING on
INITIALIZE
Post by Andrei Perietanu
ptp4l[622024.340]: port 0: INITIALIZING to LISTENING on
INITIALIZE
Post by Andrei Perietanu
ptp4l[622026.448]: port 1: new foreign master
00e04b.fffe.3b5762-1
Post by Andrei Perietanu
ptp4l[622030.527]: selected best master clock
00e04b.fffe.3b5762
Post by Andrei Perietanu
ptp4l[622030.527]: assuming the grand master role
ptp4l[622030.527]: port 1: LISTENING to GRAND_MASTER on
RS_GRAND_MASTER
Post by Andrei Perietanu
and that's it..stops at that
Normal for a master node.
Post by Andrei Perietanu
ptp4l[459942.424]: selected /dev/ptp0 as PTP clock
ptp4l[459942.425]: port 1: INITIALIZING to LISTENING on
INITIALIZE
Post by Andrei Perietanu
ptp4l[459942.425]: port 0: INITIALIZING to LISTENING on
INITIALIZE
Post by Andrei Perietanu
ptp4l[459949.497]: port 1: LISTENING to MASTER on
ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[459949.497]: selected best master clock
00e04b.fffe.3b5762
Post by Andrei Perietanu
ptp4l[459949.497]: assuming the grand master role
ptp4l[459953.600]: port 1: new foreign master
002590.fffe.f2c1e4-1
Post by Andrei Perietanu
ptp4l[459957.700]: selected best master clock
002590.fffe.f2c1e4
Post by Andrei Perietanu
ptp4l[459957.700]: port 1: MASTER to UNCALIBRATED on
RS_SLAVE
...
Post by Andrei Perietanu
ptp4l[459976.701]: master offset 145 s2 freq +16538
path delay 16238
This is also working.
Post by Andrei Perietanu
now, when this happened, I noticed my system clock went
rogue - for some
Post by Andrei Perietanu
reason it thinks it's July 11th 12:00 am (it's configured
toget time
Post by Andrei Perietanu
automatically from the internet)
That is strange. You must be sure to turn off NTP first, if you want
to use phc2sys (or ptp4l with SW time stamping). Otherwise, the two
programs will fight each other.
Post by Andrei Perietanu
1. is ptp working correcly now? O sould I see some messages
on the master's
Post by Andrei Perietanu
console as well
Yes, looks like it.
Post by Andrei Perietanu
2. why did my system clock decide to change tu such an
awkward value?
Are you perhaps still using SW time stamping? That would explain it.
Thanks,
Richard
The information transmitted is intended only for the person or entity
to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or
other use of or taking of any action in reliance upon this information
by persons or entities other than the intended recipient is
prohibited. If you receive this in error please contact the sender and
delete the material from any computer immediately. It is the policy of
Klas Limited to disavow the sending of offensive material and should
you consider that the material contained in the message is offensive
you should contact the sender immediately and also your I.T. Manager.
Klas Telecom Inc., a Virginia Corporation with offices at 1101
30th St. NW, Washington, DC 20007.
Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish
Limited Liability Company, with its registered office at Fourth Floor,
One Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8,
Richard Cochran
2014-06-22 06:19:11 UTC
Permalink
Post by Richard Cochran
Post by Andrei Perietanu
I tried the easy option *run ptp4l with the '-2' (L2 transport) flag* but
that changed nothing... so I tried something different: I changed
tx_timestamp_timeout from 1000 to 100 and now I get some output on the
slave node.
That is really very suspicious. I think this must be a red herring,
and something *else* changed.
If you do the experiment and change the 100 back to 1000, I expect
that it will work just fine.

Thanks,
Richard
Andrei Perietanu
2014-06-23 09:02:53 UTC
Permalink
I wish this were so, phc2sys only came into the picture a a last step; I
think I saw something about it in a discussion thread and thought I'd try
it out. So changing tx_timestamp_timeout to 1000 will still not work (not
sure why).


Thanks,
Andrei
Post by Richard Cochran
Post by Richard Cochran
Post by Andrei Perietanu
I tried the easy option *run ptp4l with the '-2' (L2 transport) flag*
but
Post by Richard Cochran
Post by Andrei Perietanu
that changed nothing... so I tried something different: I changed
tx_timestamp_timeout from 1000 to 100 and now I get some output on the
slave node.
That is really very suspicious. I think this must be a red herring,
and something *else* changed.
If you do the experiment and change the 100 back to 1000, I expect
that it will work just fine.
Thanks,
Richard
--
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you receive
this in error please contact the sender and delete the material from any
computer immediately. It is the policy of Klas Limited to disavow the
sending of offensive material and should you consider that the material
contained in the message is offensive you should contact the sender
immediately and also your I.T. Manager.

Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.

Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish
Limited Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.
Andrei Perietanu
2014-06-26 13:39:54 UTC
Permalink
Hi all,

Would anyone hare have any advice about backporting this piece of
software to an older kernel (2.6.31.8 to be more exact)?

Thanks,
Andrei


On Mon, Jun 23, 2014 at 10:02 AM, Andrei Perietanu <
Post by Andrei Perietanu
I wish this were so, phc2sys only came into the picture a a last step; I
think I saw something about it in a discussion thread and thought I'd try
it out. So changing tx_timestamp_timeout to 1000 will still not work (not
sure why).
Thanks,
Andrei
Post by Richard Cochran
Post by Richard Cochran
Post by Andrei Perietanu
I tried the easy option *run ptp4l with the '-2' (L2 transport) flag*
but
Post by Richard Cochran
Post by Andrei Perietanu
that changed nothing... so I tried something different: I changed
tx_timestamp_timeout from 1000 to 100 and now I get some output on
the
Post by Richard Cochran
Post by Andrei Perietanu
slave node.
That is really very suspicious. I think this must be a red herring,
and something *else* changed.
If you do the experiment and change the 100 back to 1000, I expect
that it will work just fine.
Thanks,
Richard
--
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you receive
this in error please contact the sender and delete the material from any
computer immediately. It is the policy of Klas Limited to disavow the
sending of offensive material and should you consider that the material
contained in the message is offensive you should contact the sender
immediately and also your I.T. Manager.

Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.

Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish
Limited Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.
Richard Cochran
2014-06-26 13:49:03 UTC
Permalink
Post by Andrei Perietanu
Hi all,
Would anyone hare have any advice about backporting this piece of
software to an older kernel (2.6.31.8 to be more exact)?
This question was recently asked and answered on this list.
Check the archives.

Thanks,
Richard

Andrei Perietanu
2014-06-17 11:26:27 UTC
Permalink
I sort of made some progress by changing the NIC:

ethtool -i eth1
driver: e1000e
version: 2.3.2-k
firmware-version: 0.13-4
bus-info: 0000:00:19.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no

ethtool -T eth1
Time stamping parameters for eth1:
Capabilities:
hardware-transmit (SOF_TIMESTAMPING_TX_HARDWARE)
software-transmit (SOF_TIMESTAMPING_TX_SOFTWARE)
hardware-receive (SOF_TIMESTAMPING_RX_HARDWARE)
software-receive (SOF_TIMESTAMPING_RX_SOFTWARE)
software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
hardware-raw-clock (SOF_TIMESTAMPING_RAW_HARDWARE)
PTP Hardware Clock: 1
Hardware Transmit Timestamp Modes:
off (HWTSTAMP_TX_OFF)
on (HWTSTAMP_TX_ON)
Hardware Receive Filter Modes:
none (HWTSTAMP_FILTER_NONE)
all (HWTSTAMP_FILTER_ALL)
ptpv1-l4-sync (HWTSTAMP_FILTER_PTP_V1_L4_SYNC)
ptpv1-l4-delay-req (HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ)
ptpv2-l4-sync (HWTSTAMP_FILTER_PTP_V2_L4_SYNC)
ptpv2-l4-delay-req (HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ)
ptpv2-l2-sync (HWTSTAMP_FILTER_PTP_V2_L2_SYNC)
ptpv2-l2-delay-req (HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ)
ptpv2-event (HWTSTAMP_FILTER_PTP_V2_EVENT)
ptpv2-sync (HWTSTAMP_FILTER_PTP_V2_SYNC)
ptpv2-delay-req (HWTSTAMP_FILTER_PTP_V2_DELAY_REQ)



I use this config file:
[global]
verbose 1
time_stamping software
tx_timestamp_timeout 1000

and when I run *sudo ptp4l -i eth1 -f /etc/ptp4l.conf* I get:
ptp4l[519792.941]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[519792.941]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[519799.549]: port 1: LISTENING to MASTER on
ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[519799.549]: selected best master clock 002590.fffe.f2c1e4
ptp4l[519799.549]: assuming the grand master role


After this it seams to just...hang; there no other activity. Any ideas?

Thanks,
Andrei
Post by Richard Cochran
Post by Richard Cochran
uname -a ?
Also,
ethtool -T eth0
ethtool -i eth0
Thanks,
Richard
--
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you receive
this in error please contact the sender and delete the material from any
computer immediately. It is the policy of Klas Limited to disavow the
sending of offensive material and should you consider that the material
contained in the message is offensive you should contact the sender
immediately and also your I.T. Manager.

Klas Telecom Inc., a Virginia Corporation with offices at 1101 30th St. NW,
Washington, DC 20007.

Klas Limited (Company Number 163303) trading as Klas Telecom, an Irish
Limited Liability Company, with its registered office at Fourth Floor, One
Kilmainham Square, Inchicore Road, Kilmainham, Dublin 8, Ireland.
Loading...