Menu

ptpd 2.3.1 support PHC

Help
CK
2015-09-17
2015-09-17
  • CK

    CK - 2015-09-17

    Hi,
    I refer to the ptpd-dpaa-etsec-v2.patch to implement the support of PHC in
    ptpd 2.3.1 but got the unfortunate result. Does anyone help to see where
    the mistake is?
    Here is my diff file, Thanks.

     

    Last edit: CK 2015-09-17
  • Wojciech Owczarek

    What does "unfortunate result" mean? It does not compile? The patch does not apply? Patches are made for a specific version of the source, changes refer to specific line numbers - a patch from a different version is bound not to apply cleanly. Just go through the patch line by line, find the right places and change the source manually.

     
  • CK

    CK - 2015-09-17

    sorry for the implicit report.
    This is my output after patch

    master:
    2015-09-17 17:43:33.233533, init,
    2015-09-17 17:43:33.389863 ptpd2[5032].eth0 (notice) (lstn_init) Now in state: PTP_LISTENING
    2015-09-17 17:43:33.391326, lstn_init, 1
    2015-09-17 17:43:43.233011 ptpd2[5032].eth0 (notice) (lstn_init) TimingService.PTP0: elected best TimingService
    2015-09-17 17:43:43.233177 ptpd2[5032].eth0 (info) (lstn_init) TimingService.PTP0: acquired clock control
    2015-09-17 17:43:45.390858 ptpd2[5032].eth0 (notice) (mst) Now in state: PTP_MASTER, Best master: 000102fffe030464(unknown)/1 (self)
    2015-09-17 17:43:45.391044, mst, 000102fffe030464(unknown)/1
    recvmsg err
    recvmsg err
    recvmsg err
    recvmsg err

    slave:
    1970-01-01 08:00:00.000000, init,
    2015-09-17 19:07:37.689241 ptpd2[1743].eth0 (info) (init) Observed_drift loaded from kernel: 0 ppb
    2015-09-17 19:07:37.801397 ptpd2[1743].eth0 (notice) (lstn_init) Now in state: PTP_LISTENING
    2015-09-17 19:07:37.802989, lstn_init, 1
    2015-09-17 19:07:39.167847 ptpd2[1743].eth0 (info) (lstn_init) New best master selected: 000102fffe030464(unknown)/1
    2015-09-17 19:07:39.169346 ptpd2[1743].eth0 (notice) (slv) Now in state: PTP_SLAVE, Best master: 000102fffe030464(unknown)/1 (IPv4:10.102.11.100)
    2015-09-17 19:07:39.170855, slv, 000102fffe030464(unknown)/1, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0.000000000, I, 0.000000000, 0, 0.000000000, 0, 0, 0, 0.000000000, 0.000000000
    2015-09-17 19:07:39.253163 ptpd2[1743].eth0 (notice) (slv) Received first Sync from Master
    2015-09-17 19:07:39.295999, slv, 000102fffe030464(unknown)/1, 0.000000000, 0.001656968, 0.000000000, 0.003313936, 0.000000000, S, 0.000000000, 0, 0.000000000, 0, 0, 0, 0.003313936, 0.000000000
    2015-09-17 19:07:40.224994, slv, 000102fffe030464(unknown)/1, 0.000000000, 0.003338763, 0.000000000, 0.003363590, 0.000000000, S, 0.000000000, 0, 0.000000000, 0, 0, 0, 0.003363590, 0.000000000
    recvmsg err
    recvmsg err
    2015-09-17 19:07:40.740977, slv, 000102fffe030464(unknown)/1, 0.000000000, 0.003338763, -0.003399604, 0.003363590, 3338.763000000, D, 0.000000000, 0, 0.000000000, 0, 0, 0, 0.003363590, -0.003399604
    2015-09-17 19:07:40.741669 ptpd2[1743].eth0 (notice) (slv) Received first Delay Response from Master
    2015-09-17 19:07:41.274756, slv, 000102fffe030464(unknown)/1, 0.000000000, 0.003400116, -0.003399604, 0.003436643, 3338.763000000, S, 0.000000000, 0, 0.000000000, 0, 0, 0, 0.003436643, -0.003399604
    recvmsg err
    2015-09-17 19:07:42.143885, slv, 000102fffe030464(unknown)/1, 0.000000000, 0.003400116, -0.003485581, 0.003436643, 6738.879000000, D, 0.000000000, 0, 0.000000000, 0, 0, 0, 0.003436643, -0.003485581
    2015-09-17 19:07:42.251102, slv, 000102fffe030464(unknown)/1, 0.000000000, 0.003466486, -0.003485581, 0.003496330, 6738.879000000, S, 0.000000000, 0, 0.000000000, 0, 0, 0, 0.003496330, -0.003485581
    recvmsg err
    2015-09-17 19:07:42.686030, slv, 000102fffe030464(unknown)/1, 0.000000000, 0.003466486, -0.003516378, 0.003496330, 10205.365000000, D, 0.000000000, 0, 0.000000000, 0, 0, 0, 0.003496330, -0.003516378
    2015-09-17 19:07:43.275338, slv, 000102fffe030464(unknown)/1, 0.000000000, 0.003527692, -0.003516378, 0.003559054, 10205.365000000, S, 0.000000000, 0, 0.000000000, 0, 0, 0, 0.003559054, -0.003516378
    recvmsg err
    recvmsg err

    'recvmsg err' is error message from recvmsg() in function netRecvEvent.

    And then, if everyting is ok, how to prove the offset caculated by hardware timestamp?
    just see the value of 'offset from master' or 'Observed Drift' whether it is minimum and stable?

    Thanks.

     

    Last edit: CK 2015-09-17

Log in to post a comment.

MongoDB Logo MongoDB