1. 09 Apr, 2019 1 commit
    • baujc's avatar
      Make timestamp adjusment dependent of the extension · 136a5ddc
      baujc authored
      In WR extension, the egress and ingress latencies are already included
      in the exchanged deltas (TX/RX). This modification allows for an
      extension to remove the egress/ingress latencies from the calculation of
      the RX and TX timestamps. This feature is used in the WR extension.
  2. 01 Mar, 2019 1 commit
    • baujc's avatar
      Code optimization · 25692a35
      baujc authored
      - Make externalPortConfiguration compliant with the PTP specifications
      - Optimize code for externalPortConfiguration
      - Optimize code for slaveOnly
      - Replace "CONFIG_HAS_P2P && ppi->delayMechanism==P2P" by an inline
  3. 25 Feb, 2019 1 commit
    • baujc's avatar
      Big update 2 · 515af578
      baujc authored
      . Better integrate of code optimization with PPSi Kconfig
      . PPSi Kconfig changes to simplify the code in PPSi and avoid #ifdef ..
      . Improve code optimization
      . Move some declaration in ppsi.h in other files to ligthen ppsi.h
      . Improvement of timers: global or instance dependent, dyn. allocation,
      renaming for better diagnostics, disabling allowed, ...
      . New behaviour for the PPS output generation (configurable,...)
      . Move control of the timing mode from HAL to PPSi
      . Optimization of code when a Protocol extension is not available
      . BMCA: Calculate the ebest,... only one time and then trigger all
      instances to execute the bmca state descision
      . Fix bug in the calculation of the clockIdentity to bring it into
      compliance with PTP spec 2008 document
      . Fix a bug related to Announce message received in SLAVE/UNCALIB
      . WR ext: use dynamic timer and adapt to new PPS generation
      . HA ext: Fix bug in fault injection mechanism
  4. 01 Feb, 2019 1 commit
  5. 29 Jan, 2019 1 commit
    • baujc's avatar
      Big update ... · c81db09e
      baujc authored
      - New L1Sync and PTP servo calculation (delayAsym,...)
      - Make function calls more uniforms between extensions
      - refactoring
      - Add a new state machine to enable/disable an extension and provide
      only PTP support: New timer, new hooks, ...
      - Fix bug in time format conversion
      - Code removed when an extension is not required (#ifdef XXX )
      - Align the PTP and L1Sync servo calculation (shared fct, same
      - Force only one servo running at a given time for a given instance
      - New servo reset hook : called by main loop
      - Add function to converte a time into a string
      - Force to stay in FAULTY state during 60s
      - Optimise function wrs_enable_timing_output()
  6. 03 Dec, 2018 2 commits
  7. 21 Nov, 2018 2 commits
    • Jean-Claude BAU's avatar
      Fix issue on Erbest computation · c78f9181
      Jean-Claude BAU authored
      According to the clause, the quualification is now not evaluated
      for the ErBest foreign master.
    • Jean-Claude BAU's avatar
      High Accuracy - Second implementation · a45008ca
      Jean-Claude BAU authored
      This implementation does not include yet the possibility to declare 2
      exclusive instances on a same port (WR & HA)
      - Some structures are renamed with the suffix _t to make it more
      - Some variables are renamed  to be more clear
      - Implementation of masterOnly, slaveOnly and externalPortConfiguration
      - All extension specific includes (XX-api.h) is now automatically
      included in ppsi.h and do not need to be included in other files.
  8. 20 Nov, 2018 7 commits
  9. 15 Aug, 2017 1 commit
  10. 12 Jul, 2017 7 commits
    • Sven Meier's avatar
      audit porting: ported the patches of the audit chapter 2.4.5 · a8683138
      Sven Meier authored
      Now everywhere the packet buffer is a void *buf and the lenght is int len
    • Sven Meier's avatar
      audit porting: ported the patches of the audit chapter 2.4.4 · c105365a
      Sven Meier authored
      Only the patches ragrding the flag from the current master was
      taken over, the other falgs are still needed and used.
    • Sven Meier's avatar
      audit porting: ported the patches of the audit chapter 2.4.1 · b5cdb8a3
      Sven Meier authored
      The patches from the audit chapter 2.4.1 were ported, some of the
      changes were not ported due to previous changes or different
      foreign master handling, eg.g announce unpacking is still done since
      this seems more streamline with other message handling and is actually
      still used for field extraction for the foreign master data set
    • Sven Meier's avatar
      bmc: fixed announce timeout dataset update and initializing dataset update · ab3d3253
      Sven Meier authored
      For the announce receipt timeout the datasets shall be updated depending on the other ports states, only if no other in slave update parent dataset.
      when a link was connected it runs through initializing which was wrongly updating the parent dataset which caused a short masterchange condition an resyncing.
    • Sven Meier's avatar
      p2p: only answer peer delay messages when in p2p mode · 78f90b18
      Sven Meier authored
      changed peer delay handling so p2p messages are only answered when in this mode
      added p2p messages to some states where it was missing
    • Sven Meier's avatar
      bmc: more changes · 280580e7
      Sven Meier authored
      Merged uncalibrated and slave state, added event handling to the individual states,
      changed in all states the frame handling to table driven handling,
      moved common handling from common to slave since it is actually not common,
      fixed state passive to be according to standard,
      added uncalibrated handling,
      fixed listening and master frame handling,
    • Sven Meier's avatar
      bmc: add agging, call periodically and data sets · cdf616d8
      Sven Meier authored
      BMC fixed to be called periodically and data sets comparisments fixed
      also changed the foreign master table adding and agging and some
      minor adpatations in state pre-master
  11. 23 Jun, 2017 1 commit
  12. 12 Jun, 2017 3 commits
    • Alessandro Rubini's avatar
      pdelay: rework and extend prev commit · 31f08f19
      Alessandro Rubini authored
      The previous commit is not enough as a fix.  This may happen:
          - we invalidate stamps after processing them
          - we send request
          - get reply, loose reply-fup
          - send request
          - loose reply, get f-up
      So we now invalidate when sending the request. And invalidate t4 alone
      as the beautifulness and symmetry of the previous commit is lost
      Note: there no need to invalidate stamps in e2e mode, because checking
      the sequence number to validate RX frames is enough.  But here all
      replies match the sequence number, so the problem is not caught and
      stamps from different tuples are mixed.
      Example beofre this commit, with trimmed stamps (was 1497283863):
         diag-frames-1-wr1: SENT 54 bytes at 863.333173928 (pdelay_req)
         diag-frames-1-wr1: RECV 54 bytes at 863.334158796 (type 3, pdelay_resp)
         diag-frames-1-wr1: Drop received frame
         diag-frames-1-wr1: SENT 54 bytes at 864.479336104 (pdelay_req)
         diag-frames-1-wr1: Drop received frame
         diag-frames-1-wr1: RECV 54 bytes at 864.481095164 (type a, presp_follow_up)
         diag-servo-2-wr1: servo:t3 = 864:479336104:0
         diag-servo-2-wr1: servo:t4 = 863:333174267:586
         diag-servo-2-wr1: servo:t5 = 864:480295312:0
         diag-servo-2-wr1: servo:t6 = 863:334158796:773
         diag-servo-2-wr1: ->mdelay = -2:-292298352:359
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
    • Alessandro Rubini's avatar
      pdelay: mark stamps as invalid after use · 223459dd
      Alessandro Rubini authored
      The code is checking the sequence number of pdelay-rep and
      pdelay-rep-fup, but we may miss the reply and get the f-up.
      The result was something like this (first tuple is ok, next is wrong):
         diag-servo-2-wr1: servo:t3 = 1497279009:22584224:0
         diag-servo-2-wr1: servo:t4 = 1497279009:22584574:759
         diag-servo-2-wr1: servo:t5 = 1497279009:23564032:0
         diag-servo-2-wr1: servo:t6 = 1497279009:23564365:547
         diag-servo-2-wr1: ->mdelay = 0:684:306
         diag-servo-2-wr1: servo:t3 = 1497279009:663586672:0
         diag-servo-2-wr1: servo:t4 = 1497279009:22584574:759
         diag-servo-2-wr1: servo:t5 = 1497279009:683142000:0
         diag-servo-2-wr1: servo:t6 = 1497279009:23564365:547
         diag-servo-2-wr1: ->mdelay = -1:-300579732:306
      Here, t4 and t6 are old. The former is the receipt of the request,
      send back to the "slave" in the pdelay-reply payload; the latter is
      the receive time of such frame.
      We now invalidate t4 and t5 when using the tuple. They are the two
      "remote" times, one sent back in the response and the other sent back
      in the response-fup.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
    • Alessandro Rubini's avatar
  13. 06 Apr, 2017 1 commit
  14. 05 Apr, 2017 1 commit
    • Alessandro Rubini's avatar
      general fix: implement SYNCHRONIZATION_FAULT · a438acc9
      Alessandro Rubini authored
      If we stopped sending to the master or the peer (for traffic or
      whatever; in my case with "fault drop"), we wouldn't notice the
      This looks like SYNCHRONIZATION_FAULT (, so this reuses the
      almost-unused TO_FAULTY, renaming it to a more generic TO_FAULT.
    says we should reach uncalibrated, but since uncalibrated doesn't
      exits (it is never entered, it's dead and untested code at this point),
      I handle the problem just like the timeout receiving announce messages.
      For wr, I reset the servo, so the problem can be seen.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
  15. 03 Mar, 2017 2 commits
  16. 01 Mar, 2017 1 commit
  17. 31 Jan, 2017 1 commit
  18. 07 Dec, 2016 1 commit
  19. 01 Dec, 2016 2 commits
  20. 21 Nov, 2016 1 commit
  21. 04 Nov, 2016 2 commits
    • Alessandro Rubini's avatar
      remove arguments to net->send; some fixes as side effect · faa87f7a
      Alessandro Rubini authored
      Most arguments of net->send are redundant, as the ppi includes all
      info. In particular, chtype and "is_pdelay_addr" derive from the
      message type.  And the timestamp is always internal.
      I chose not to remove message, len and msgtype because the message
      being sent includes the header (ppi->tx_offset), so there's some
      calculation to extract them.  This may happen in a later commit, if I
      find that is a size improvement.
      Bugs fixed as a side effect:
         - the "if" for "is_pelay" missed PDELAY_RESP_F_UP (now it's in msgtype.c)
         - wrpc pdelay was always using the e2e mac address
      This commit decreases the size of all archs by 60 bytes, but increases
      wrpc by 20 bytes because of the fix above
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
    • Alessandro Rubini's avatar