1. 12 Jul, 2017 10 commits
    • 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
      b5cdb8a3
    • 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.
      ab3d3253
    • Sven Meier's avatar
      84c4984a
    • 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
      78f90b18
    • Sven Meier's avatar
      bmc: timeouts fixe and announce handling changed · 53cb49ff
      Sven Meier authored
      Message handling for the case of received back frames changed and timeouts for announces reset according to standard
      53cb49ff
    • Sven Meier's avatar
      bmc: handshake started on state base and announce change · e1e3935d
      Sven Meier authored
      The calibration handshake is now started on the slave state base
      Announce messages from the same device are handled differnetly for a BC
      e1e3935d
    • Sven Meier's avatar
      bmc: added hook for state machine extension · 0b21e2c6
      Sven Meier authored
      A hook was added that handles the wr states, so that they don't get overwritten by bmc decisions.
      The extension stays in the white rabbit states until a calibration is done.
      0b21e2c6
    • Sven Meier's avatar
      bmc: added debug info and changed fsm, workaround for htons · 4dc9a628
      Sven Meier authored
      The FSM order was changed in order to leave the fsm on a state change and re-enter the fsm directly afterward,
      this makes sure no state decision is overwritten by the state handling and each state dicision is handled at least once,
      There seems to be an issue with htons on unaligned addresses, which is the case for stepsRemoved in an announce,
      a workaround of a manual 16bit conversion was added.
      4dc9a628
    • 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,
      280580e7
    • 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
      cdf616d8
  2. 06 Jul, 2017 1 commit
  3. 03 Jul, 2017 1 commit
  4. 29 Jun, 2017 2 commits
  5. 23 Jun, 2017 3 commits
  6. 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
      anyways.
      
      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>
      31f08f19
    • 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>
      223459dd
    • Alessandro Rubini's avatar
      dfeb1890
  7. 06 Apr, 2017 2 commits
  8. 05 Apr, 2017 9 commits
  9. 29 Mar, 2017 1 commit
  10. 20 Mar, 2017 1 commit
  11. 14 Mar, 2017 1 commit
  12. 08 Mar, 2017 1 commit
  13. 06 Mar, 2017 1 commit
  14. 05 Mar, 2017 1 commit
    • Alessandro Rubini's avatar
      standard servo: bugfix (introduced with pp_time) · cfed2306
      Alessandro Rubini authored
      If meanPathDelay is calculated negative at the first iteration, we
      must zero it immediately, or this will loop forever:
      
      	while (mpd_fltr->y >> (63 - s))
      		--s;
      
      The bug only appears with e2e mechanism, where t3 happens long after
      t2, if the slave clock when ppsi starts is running much slower than
      the master.
      
      Before changing data structures we used abs() in that loop (which was
      suboptimal), and I made a mistake in converting it in a check before
      the loop itlsef.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      cfed2306
  15. 03 Mar, 2017 3 commits