[Linuxptp-users] PTP sync over UDP fails. Slave is selected as Best Master Clock

2018-04-12 Thread Florent Lambert
Hello,

I try to be PTP synchronized with my network over UDP. Although I receive
PTP packets (tested with tcpdump, see below for capture), when I run ptp4l,
the local clock is elected as best master. It is as if there was no other
master clock in the network. I can't find why.


Here are some details of my environment :
NIC : Intel X710
NIC driver : i40e 2.4.6 (latest, compiled with CFLAGS_EXTRA="-DI40E_PTP")
NIC firmware : NVM 6.01 (latest)
Kernel version : 3.10.0-693.21.1.e17.x86_64
CentOS 7.4.1708
linuxptp : 1.8

I tried with linux ptp from 1.6 to 1.9.2.
I tried with different  i40e driver/NIC firmware/kernel/linuxptp matching
version.

I know for sure that in my network, there is a working grand master. There
is a switch in between me and the master but the switch is normally
properly configurated.

The config I use for ptp4l match the grand master's one.

Here is the output of ptp4l :

ptp4l -i interface -f /etc/ptp4l.conf -smq

ptp4l[5042.815]: selected /dev/ptp1 as PTP clock
ptp4l[5042.816]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[5042.816]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[5042.816]: port 1: link up
ptp4l[5043.674]: selected best master clock 3cfdfe.fffe.a13059
ptp4l[5044.576]: selected best master clock 3cfdfe.fffe.a13059
ptp4l[5045.573]: selected best master clock 3cfdfe.fffe.a13059

I get the same exact output if i don't even use a config file.

The MAC address 3c:fd:fe:a1:30:59 is the MAC adress of the specified
interface. (The interface that should be slave!)
I don't have any logs like "new foreign master" ...

Here is what a tcpdump on the interface looks like :

15:59:18.470412 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.471144 IP 10.22.8.3.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.471441 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.472071 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.472552 IP 10.22.8.3.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.473185 IP 10.22.8.3.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.473656 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.476813 IP 10.195.1.250.ptp-general > 224.0.1.129.ptp-general: UDP,
length 100
15:59:18.479403 IP 10.22.8.3.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.479816 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.482479 IP 10.195.1.250.ptp-general > 224.0.1.129.ptp-general: UDP,
length 100
15:59:18.485089 IP 10.22.8.3.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.485488 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.487728 IP 10.195.1.250.ptp-general > 224.0.1.129.ptp-general: UDP,
length 100
15:59:18.490379 IP 10.22.8.3.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.490897 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.491309 IP 172.27.105.251.ptp-event > 224.0.1.129.ptp-event: UDP,
length 44
15:59:18.518822 IP 172.27.105.251.ptp-general > 224.0.1.129.ptp-general:
UDP, length 44
15:59:18.616328 IP 172.27.105.251.ptp-event > 224.0.1.129.ptp-event: UDP,
length 44
15:59:18.620510 IP 172.27.105.251.ptp-general > 224.0.1.129.ptp-general:
UDP, length 44


I must be missing something. Any help is appreciated. I can provide other
information if needed !

Thanks.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users


[Linuxptp-users] Test fails with tap interfaces and UDP protocol

2018-04-12 Thread OLIVA VENEGAS Yaset - Subcontractor
Hello,

I've been trying to test without success ptp4l with virtual tap interfaces 
using UDP.
The symptom is that no foreign clock is seen and then the slave auto-select as 
BM. However using Ethernet the foreign clock is seen and selected.

My network is composed of two tap interfaces and one switch in-between.
Traffic analysis (using Wireshark) on the slave interface shows the UDP packets 
as expected.
However,  debugging ptp4l demonstrates that no UDP packet is received at 
application level (printing the FD on events is always FD_ANNOUNCE_TIMER).

I'd appreciate any comment on this.

Thanks,

Yaset
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users


Re: [Linuxptp-users] Test fails with tap interfaces and UDP protocol

2018-04-12 Thread Keller, Jacob E
> -Original Message-
> From: OLIVA VENEGAS Yaset - Subcontractor [mailto:yaset.oliva-
> venegas.subcontrac...@crf.canon.fr]
> Sent: Thursday, April 12, 2018 5:17 AM
> To: linuxptp-users@lists.sourceforge.net
> Subject: [Linuxptp-users] Test fails with tap interfaces and UDP protocol
> 
> Hello,
> 
> 
> 
> I've been trying to test without success ptp4l with virtual tap interfaces 
> using
> UDP.
> 
> The symptom is that no foreign clock is seen and then the slave auto-select as
> BM. However using Ethernet the foreign clock is seen and selected.
> 
> 
> 
> My network is composed of two tap interfaces and one switch in-between.
> 
> Traffic analysis (using Wireshark) on the slave interface shows the UDP 
> packets as
> expected.
> 
> However,  debugging ptp4l demonstrates that no UDP packet is received at
> application level (printing the FD on events is always FD_ANNOUNCE_TIMER).
> 
> 

Common problems could include (a) firewalld or iptables interfering? (b) did 
you make sure ptp4l is configured to use UDP?

Thanks,
Jake

> 
> I'd appreciate any comment on this.
> 
> 
> 
> Thanks,
> 
> 
> 
> Yaset


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users