Hello all, i am trying to sync an embedded platform with my server as using my 
server as master and the embedded platform as slave using G.8275.x

On the master side my ethernet card has the ethtool output;

Time stamping parameters for enp134s0f0:
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: 7
Hardware Transmit Timestamp Modes:
    off                   (HWTSTAMP_TX_OFF)
    on                    (HWTSTAMP_TX_ON)
Hardware Receive Filter Modes:
    none                  (HWTSTAMP_FILTER_NONE)
    all                   (HWTSTAMP_FILTER_ALL)



ethtool -i enp134s0f0
driver: ice
version: 1.8.8
firmware-version: 2.10 0x8000433d 1.2789.0
expansion-rom-version: 
bus-info: 0000:86:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes


I am setting ptp device clock from system clock, everything is fine 

ptp4l -i enp134s0f0 -l 7 -f default.cfg &
phc2sys -c enp134s0f0 -n 44 -s CLOCK_REALTIME -O 0 &

phc_ctl /dev/ptp7 get or phc_ctl enp134s0f0 get 

phc_ctl[11027.049]: clock time is 1654258591.165904796 or Fri Jun  3 15:16:31 
2022 (synced with real time)




phc2sys: [11286.528] enp134s0f0 sys offset       -14 s2 freq  +81619 delay    
682
phc2sys: [11287.530] enp134s0f0 sys offset        21 s2 freq  +81650 delay    
682
phc2sys: [11288.531] enp134s0f0 sys offset        -2 s2 freq  +81633 delay    
589
phc2sys: [11289.533] enp134s0f0 sys offset         5 s2 freq  +81640 delay    
681
phc2sys: [11290.533] enp134s0f0 sys offset         7 s2 freq  +81643 delay    
678
phc2sys: [11291.534] enp134s0f0 sys offset        -8 s2 freq  +81630 delay    
683
phc2sys: [11292.535] enp134s0f0 sys offset       -45 s2 freq  +81591 delay    
578
phc2sys: [11293.537] enp134s0f0 sys offset        18 s2 freq  +81641 delay    
686
phc2sys: [11294.540] enp134s0f0 sys offset         3 s2 freq  +81631 delay    
682
phc2sys: [11295.540] enp134s0f0 sys offset        25 s2 freq  +81654 delay    
681
phc2sys: [11296.542] enp134s0f0 sys offset       -13 s2 freq  +81623 delay    
682
phc2sys: [11297.544] enp134s0f0 sys offset       -20 s2 freq  +81612 delay    
681
phc2sys: [11298.545] enp134s0f0 sys offset         3 s2 freq  +81629 delay    
587
My default config file is


global]
#
# Default Data Set
#
twoStepFlag             1
clientOnly              0
socket_priority         0
priority1               127
priority2               128
domainNumber            44
#utc_offset             37
clockClass              248
clockAccuracy           0xFE
offsetScaledLogVariance 0xFFFF
free_running            0
freq_est_interval       1
dscp_event              0
dscp_general            0
dataset_comparison      G.8275.x
G.8275.defaultDS.localPriority  128
maxStepsRemoved         255
#
# Port Data Set
#
logAnnounceInterval     1
logSyncInterval         0
operLogSyncInterval     0
logMinDelayReqInterval  0
logMinPdelayReqInterval 0
operLogPdelayReqInterval 0
announceReceiptTimeout  3
syncReceiptTimeout      0
delay_response_timeout  0
delayAsymmetry          0
fault_reset_interval    4
neighborPropDelayThresh 20000000
serverOnly              1
G.8275.portDS.localPriority     128
asCapable               auto
BMCA                    ptp
inhibit_announce        0
inhibit_delay_req       0
ignore_source_id        0
#
# Run time options
#

assume_two_step         0
logging_level           6
path_trace_enabled      0
follow_up_info          0
hybrid_e2e              1
inhibit_multicast_service       1
net_sync_monitor        0
tc_spanning_tree        0
tx_timestamp_timeout    10
unicast_listen          1
unicast_master_table    0
unicast_req_duration    3600
use_syslog              1
verbose                 0
summary_interval        0
kernel_leap             1
check_fup_sync          0
clock_class_threshold   248
#
# Servo Options
#
pi_proportional_const   0.0
pi_integral_const       0.0
pi_proportional_scale   0.0
pi_proportional_exponent        -0.3
pi_proportional_norm_max        0.7
pi_integral_scale       0.0
pi_integral_exponent    0.4
pi_integral_norm_max    0.3
step_threshold          0.0
first_step_threshold    0.00002
max_frequency           900000000
clock_servo             pi
sanity_freq_limit       200000000
ntpshm_segment          0
msg_interval_request    0
servo_num_offset_values 10
servo_offset_threshold  0
write_phase_mode        0
#

# Transport options
#
transportSpecific       0x0
ptp_dst_mac             01:1B:19:00:00:00
p2p_dst_mac             01:80:C2:00:00:0E
udp_ttl                 1
udp6_scope              0x0E
uds_address             /var/run/ptp4l
uds_file_mode           0660
uds_ro_address          /var/run/ptp4lro
uds_ro_file_mode                0666
#
# Default interface options
#
clock_type              OC
network_transport       UDPv4
delay_mechanism         E2E
time_stamping           hardware
tsproc_mode             filter
delay_filter            moving_median
delay_filter_length     10
egressLatency           0
ingressLatency          0
boundary_clock_jbod     0
phc_index               -1
#
# Clock description
#
productDescription      ;;
revisionData            ;;
manufacturerIdentity    00:00:00
userDescription         ;
timeSource              0xA0



---------------
On the slave side, when i do 

/usr/linuxptp/ptp4l -i qse-eth -smf /usr/linuxptp/configs/user_gen.cfg -l 9
/phc_ctl qse-eth get

I see that clock ise synced with my rmaster b49691.fffe.b7a21c
As you see in log, it selects b49691.fffe.b7a21c

But after that it selects and tries local clock that is the clock of eth 
interface

ptp4l[2698.347]: selected local clock aabbcc.fffe.ddee27 

there is negative delay with own local clock and remote master is not synced

the pmc output shows the status.

It never syncs with my master and tries local with huge offset.

But phc clock is continously synced with my master clock.


 
ptp4l[2698.347]: selected local clock aabbcc.fffe.ddee27 as best master
ptp4l[2699.143]: port 1: unicast request timeout
ptp4l[2699.144]: port 1: time to renew unicast subscriptions
ptp4l[2699.144]: port 1: unicast ANNOUNCE granted for 60 sec
ptp4l[2699.177]: port 1: renewal timeout at 2744
ptp4l[2699.178]: port 1: unicast SYNC granted for 60 sec
ptp4l[2699.178]: port 1: unicast DELAY_RESP granted for 60 sec
ptp4l[2699.552]: selected best master clock b49691.fffe.b7a21c
ptp4l[2699.552]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE
ptp4l[2699.594]: port 1: delay timeout
ptp4l[2699.627]: negative delay      -2567
ptp4l[2699.628]: delay = (t2 - t3) * rr + (t4 - t1)
ptp4l[2699.628]: t2 - t3 =  -62117995
ptp4l[2699.628]: t4 - t1 =  +62112860
ptp4l[2699.661]: rr = 1.000000000
ptp4l[2699.661]: delay   filtered      -2567   raw      -2567
ptp4l[2699.661]: u_pi_state                1
ptp4l[2699.695]: u_pi_last_freq            2000.000000
ptp4l[2699.695]: u_pi_offset               1271227
ptp4l[2699.695]: u_pi_freq                 2000.000000
ptp4l[2699.728]: u_pi_freq_diff            0.000000
ptp4l[2699.728]: u_pi_lock_check_cnt       0/100
ptp4l[2699.729]: u_pi_unlock_check_cnt     0/100
ptp4l[2699.729]: u_pi_offset_mavg_result   17846/100
ptp4l[2699.762]: u_pi_freq_mavg_result     0.000000/50.000000
ptp4l[2699.762]: share_lock_status         0
ptp4l[2699.763]: u_pi_bring_up_core1_flag  0
ptp4l[2699.796]: ptp_sync_status  0
ptp4l[2699.796]: ptp_freq         2000
ptp4l[2699.796]: ptp_rms          672288
ptp4l[2699.796]: ptp_rms_max      1029942
ptp4l[2699.829]: ptp_delay        -3330
ptp4l[2699.830]: reserved         0


sending: GET CURRENT_DATA_SET
    aabbcc.fffe.ddee27-0 seq 0 RESPONSE MANAGEMENT CURRENT_DATA_SET 
        stepsRemoved     1
        offsetFromMaster 116346207.0
        meanPathDelay    -752.0
    b49691.fffe.b7a21c-1 seq 0 RESPONSE MANAGEMENT CURRENT_DATA_SET 
        stepsRemoved     0
        offsetFromMaster 0.0
        meanPathDelay    0.0



:/usr/linuxptp# ./pmc -u -b 1 -d 44 'GET CURRENT_DATA_SET'sending: GET 
CURRENT_DATA_SET
    aabbcc.fffe.ddee27-0 seq 0 RESPONSE MANAGEMENT CURRENT_DATA_SET 
        stepsRemoved     1
        offsetFromMaster 364137.0
        meanPathDelay    -876.0

 
pmc -u -b 1 -d 44 'GET CURRENT_DATA_SET'sending: GET CURRENT_DATA_SET
    aabbcc.fffe.ddee27-0 seq 0 RESPONSE MANAGEMENT CURRENT_DATA_SET 
        stepsRemoved     1
        offsetFromMaster 364137.0
        meanPathDelay    -876.0

./pmc -u -b 1 -d 44 'GET CURRENT_DATA_SET'
sending: GET CURRENT_DATA_SET
    aabbcc.fffe.ddee27-0 seq 0 RESPONSE MANAGEMENT CURRENT_DATA_SET 
        stepsRemoved     1
        offsetFromMaster 115345133.0
        meanPathDelay    -2406.0
    b49691.fffe.b7a21c-1 seq 0 RESPONSE MANAGEMENT CURRENT_DATA_SET 
        stepsRemoved     0
        offsetFromMaster 0.0
        meanPathDelay    0.0



Thanks for help, Kind Regards









_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to