PPSi:1bcae4bb166ae3f47a74b4e3c0067c94db518f30 commitshttps://ohwr.org/project/ppsi/commits/1bcae4bb166ae3f47a74b4e3c0067c94db518f302015-07-06T09:17:57Zhttps://ohwr.org/project/ppsi/commit/1bcae4bb166ae3f47a74b4e3c0067c94db518f30include: define vlanhdr; add peer_vid to ppi2015-07-06T09:17:57ZAlessandro Rubinirubini@gnudd.com
The vlanhdr is not something I can find in standard include files,
so here is a custom definition, called pp_vlanhdr.
Adding peer_vid is needed so a master can reply to its own slave,
while listening to several vlans.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/e972a12875893e7a3edc49171f36e9820868b2f4general: split ptp_offset into tx and rx offset2015-07-06T09:17:55ZAlessandro Rubinirubini@gnudd.com
This step is in preparation for vlan support, where the tx and rx
headers have a different length.
This commit doesn't build for arch-wrpc, fixed in the next commit
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/b7cd7e373b5219d6e190802e78dfdf8d156574eageneral: make NP() deprecated2015-07-06T09:17:54ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/15c56131fe956420cf456dae1baf19bdc3f2ade8general: remove use of needless NP function2015-07-06T09:17:53ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/225b2f272e38c65de7a25b047a8a57bc45324339pp-instance: remove "netpath" substructure2015-07-06T09:17:51ZAlessandro Rubinirubini@gnudd.com
This "netpath" is a pain, completely needless. The NP(ppi)
is overhead in the code and must be removed. It is now turned to
an identity function, so external patches won't conflict.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/237af5c4bc1f342d9c5b46079e42d88be4fb1426time-unix: use two init functions instead of switch(proto)2015-07-06T09:16:05ZAlessandro Rubinirubini@gnudd.com
This is partly undoing the previous commit, but there is really
no common code between udp and raw in the init path.
Besides, initializing for vlan means creating a raw socket, and
we'd break the whole "switch" idea.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/81590d98138662b4a1af73a29c3e187ec6220f45time-{unix,wrs}: prepare for PROTO_VLAN addition2015-07-06T09:16:04ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/46c498d991fea5e80af4d2344720b224670086d7lib/conf: parse the 'vlan' config line2015-07-06T09:16:03ZAlessandro Rubinirubini@gnudd.com
We can't have VLAN support with UDP, since this VLAN is a hack (needed
for GSI operational setup).
The error check about udp+vlan is only in time-unix, because arch-wrs
uses unix socket initialization, and other architectures can't run UDP.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/314d8605d27fc9b6c6726fd70096484b6cc0d16app-instance: include the VLAN list2015-07-06T09:16:02ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/09fe3233baffc9f9b78f1c808e3a2590b8ad034bKconfig support for vlans2015-07-06T09:16:00ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/594beec604b25f1472703b120d1403ed343f9224whiterabbit: arch-wrs and arch-wrpc can't be build without WR support2015-07-01T08:20:32ZAlessandro Rubinirubini@gnudd.com
This was a trial of mine, but it really has never been working (at least
on wrs -- I think nobody ever tried a non-wr code base on wrpc).
Too much of the timetamping, servo, pll, is dependent on WR being
available, this academic idea doesn't make much sense, so let's remove
a number of conditionals (and associated potential bugs).
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/b8ebe5fee29e094175bb7d349483fdc651de146eMerge branch 'adam-proposed_master4'2015-06-30T12:35:56ZAdam Wujekadam.wujek@cern.chhttps://ohwr.org/project/ppsi/commit/39c84eee528bff17988b09031966e181be49d382proto-ext-whiterabbit: check offset and rtt for negative values2015-06-30T12:18:11ZAdam Wujekadam.wujek@cern.chSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9297"><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch"><img alt="Adam Wujek's avatar" src="https://secure.gravatar.com/avatar/bee62ad02d8f8c7c40900167722fb9d3?s=32&d=identicon" class="avatar s16 avatar-inline" title="Adam Wujek"></a><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch">Adam Wujek</a> <<a href="mailto:adam.wujek@cern.ch" title="adam.wujek@cern.ch">adam.wujek@cern.ch</a>></span>https://ohwr.org/project/ppsi/commit/a7f53cf9385cf46d8ea699fabdb00ad5f4ba3e79Merge branch 'adam-proposed_master'2015-06-29T15:19:56ZAdam Wujekadam.wujek@cern.ch
--update hal_shmem to version 7
--add tx and rx packet counters
--add error counters for SNMP
--increase ppsi shmem version to 6
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9297"><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch"><img alt="Adam Wujek's avatar" src="https://secure.gravatar.com/avatar/bee62ad02d8f8c7c40900167722fb9d3?s=32&d=identicon" class="avatar s16 avatar-inline" title="Adam Wujek"></a><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch">Adam Wujek</a> <<a href="mailto:adam.wujek@cern.ch" title="adam.wujek@cern.ch">adam.wujek@cern.ch</a>></span>https://ohwr.org/project/ppsi/commit/74a79aab5858ae5913ddc411ce38fc24f9e3500fproto-ext-whiterabbit: Add SNMP counters and increase ppsi shmem version to 62015-06-26T13:07:52ZAdam Wujekadam.wujek@cern.ch
Add counters used by SNMP:
--n_err_state (state different than WR_TRACK_PHASE)
--n_err_offset (offset exceeded SNMP_MAX_OFFSET)
--n_err_delta_rtt (delta rtt exceeded SNMP_MAX_DELTA_RTT)
--n_err_rxtx_deltas (any delta_*x_* bigger than SNMP_MAX_RXTX_DELTAS)
All these counters are increased on servo update if error condition is met
Due to above, increase WRS_PPSI_SHMEM_VERSION to 6
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9297"><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch"><img alt="Adam Wujek's avatar" src="https://secure.gravatar.com/avatar/bee62ad02d8f8c7c40900167722fb9d3?s=32&d=identicon" class="avatar s16 avatar-inline" title="Adam Wujek"></a><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch">Adam Wujek</a> <<a href="mailto:adam.wujek@cern.ch" title="adam.wujek@cern.ch">adam.wujek@cern.ch</a>></span>https://ohwr.org/project/ppsi/commit/623dcf3116f87d3f5ae6c51c05239b0229d8f1a1pp-instance: add tx and rx packet counters2015-06-26T12:52:14ZAdam Wujekadam.wujek@cern.ch
Add counting of tx and rx PTP packets.
__recv_and_count and __send_and_log are arch independent functions.
Increase WRS_PPSI_SHMEM_VERSION due to add of tx_count and tx_count firlds in
pp_instance.
Update WRS_PPSI_SHMEM_VERSION to 5
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9297"><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch"><img alt="Adam Wujek's avatar" src="https://secure.gravatar.com/avatar/bee62ad02d8f8c7c40900167722fb9d3?s=32&d=identicon" class="avatar s16 avatar-inline" title="Adam Wujek"></a><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch">Adam Wujek</a> <<a href="mailto:adam.wujek@cern.ch" title="adam.wujek@cern.ch">adam.wujek@cern.ch</a>></span>https://ohwr.org/project/ppsi/commit/34c57cba5b27cec87848ad00c312137f3e69ff17arch-wrs: update libwr/hal_shmem.h to version 72015-06-26T12:51:14ZAdam Wujekadam.wujek@cern.ch
Remove fields used to keep thresholds of temperature sensors (not used by ppsi)
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9297"><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch"><img alt="Adam Wujek's avatar" src="https://secure.gravatar.com/avatar/bee62ad02d8f8c7c40900167722fb9d3?s=32&d=identicon" class="avatar s16 avatar-inline" title="Adam Wujek"></a><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch">Adam Wujek</a> <<a href="mailto:adam.wujek@cern.ch" title="adam.wujek@cern.ch">adam.wujek@cern.ch</a>></span>https://ohwr.org/project/ppsi/commit/782773077690f2b2d53af0395e3b94e8fcc89a9dMerge branch 'wr-servo-cleanup'2015-06-18T10:05:55ZAlessandro Rubinirubini@gnudd.comhttps://ohwr.org/project/ppsi/commit/896132617c9ce40f6b851634430a6b67ad6dced2wr-api: change version of shmem, before merging to master2015-06-18T10:05:36ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/f3d427ee4f83735824148211b906d8f3697ddd78wr-servo: move WAIT_SYNC_IDLE state to a flag2015-06-18T10:03:33ZAlessandro Rubinirubini@gnudd.com
This temporary wr-servo state, with the hack of next_state is not
really clean. I took a while to understand it, and this tries to make
it clearer for my fellow developer.
When we change state by commanding hardware, we must wait for hw to be
done with the change, and this is better a flag than another state.
While making this clean, the commit stresses the fact that we loose
one wr-servo iteration every two of them. Unfortunately, the trivial
fix I tried some time ago doesn't actually work (the slave won't
sync), so the behaviour remains unchanged by this commit, but the
problem is not clearly visible in code and comments, so we may fix it
"the real way" later on.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/a652b53fbaa158016eca794b798658ac72e28e48wr-servo: turn 'valid' field into a flag2015-06-18T10:03:32ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/50fa6cffedf084662e1621cfc9e2233262cd4cf9wr-servo (and wr): remove _t from name of structures2015-06-18T10:03:31ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/2ab718f3c99249ced4b870f4db32267586ae1e1fwr-servo: reorder/clean/document fields of servo_state2015-06-18T10:03:30ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/0b70bc235bc5cf95a08f2b20a3941f9aa695ed3cwr-servo: simplify calculation of deltas2015-06-18T10:03:30ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/42614f0ff62099938de60e0bd3cc875639d95350wr-servo: copy interface name to struct (for wr_mon)2015-06-18T10:03:29ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/7608f764a8ce371e4ecfc4ec25a83a089b835320wr-servo: fix following big jumps, and another unlikely situation2015-06-18T10:03:28ZAlessandro Rubinirubini@gnudd.com
We were already following big jump, in theory, but we were missing a break
statement. Now tracking jumps in the master is working.
The commit also fixes another details, zeroing an error counter when
restarting sync because of that very error counter.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/37a05fafb33d8cc5ed3ba1cf8a060138aaea4887wr-servo: prevent wrong numbers when mu is negative2015-06-18T10:03:27ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/c92b429082859cf0413132fbc4f5ce0d8a75fd58wr-servo: fix a wrong state change (with no effect)2015-06-18T10:03:26ZAlessandro Rubinirubini@gnudd.com
After changing the nsec counter, the next state should be SYNC_PHASE,
not SYNC_NSEC. This was a mistake when making order in the wr-servo
file, initially, but has no effect as we move to a later step anyways
if offset_hw.nanoseconds is already 0.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/3165143f8e2f7c04132fefdbd057cd19a0a6281barch-wrs: prevent a build warning in pp_printf2015-06-18T10:03:25ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/1aabb5cc61facc5e24575285bff8d447c01fd172doc: elaborate information how to enable diagnostics in ppsi2015-06-18T10:03:24ZAdam Wujekadam.wujek@cern.ch
Add information to section "Diagnostic Macros" that diagnostics can be enabled
by specifying proper string after -d switch in command line or by "diagnostics"
option in configuration file.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9297"><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch"><img alt="Adam Wujek's avatar" src="https://secure.gravatar.com/avatar/bee62ad02d8f8c7c40900167722fb9d3?s=32&d=identicon" class="avatar s16 avatar-inline" title="Adam Wujek"></a><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch">Adam Wujek</a> <<a href="mailto:adam.wujek@cern.ch" title="adam.wujek@cern.ch">adam.wujek@cern.ch</a>></span>https://ohwr.org/project/ppsi/commit/86fdf30c1676715e21b4559bb5a24d5b46edea4fbmc: bugfix, calculate compres before using2015-06-18T10:03:24ZMaciej Lipinskimaciej.lipinski@cern.ch
Port configured to PPSI_ROLE_MASTER must do m1() update of data set
only if it is a port of a GM. We need the dataSet comparision to
know this (thus we calculate the compres value) even on the ports
forced to be masters by defaulthttps://ohwr.org/project/ppsi/commit/7c62f416bdc83e1dde88a56dd0cf60e4eaac5c81protocols: handle PP_SEND_NO_STAMP specially2015-06-18T09:07:29ZAlessandro Rubinirubini@gnudd.com
This is the result of an audit of all send functions. Most are not
affected, because they send on the "general" channel. But when event
messages are sent, an error of SEND_NO_STAMP must not be fatal.
In WR, for example, after a sync the stamping engine reports invalid
stamps for a second.
I chose not to change the return type of the sending function and have
the compiler help me, because my mates are working on peer-delay and I'd
better not make the merge more difficult for us.
Unfortunately, my wrs is still not syncing with this patch, as it remains
stuck in SYNC_NSEC (in the state machine within the WR servo). See
next commit....
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/9e78f4ac3cf3c8fa2a3558281d40d9cc3872ec65send functions: return -1 on error and 1 on stamping error (stamp invalid)2015-06-18T09:07:22ZAlessandro Rubinirubini@gnudd.com
This is the first step to fix a problem introduced by commit <a href="/project/ppsi/commit/79ffd673a41a5d562a0f02a65cc41d956c8c7e63" data-original="79ffd673" data-link="false" data-link-reference="false" data-project="10763" data-commit="79ffd673a41a5d562a0f02a65cc41d956c8c7e63" data-reference-type="commit" data-container="body" data-placement="bottom" title="state-master: don't send f-up if sync stamp is wrong" class="gfm gfm-commit has-tooltip">79ffd673</a>
(a fix to release 4.1.2 forward ported to master).
When we get a bad timestamp in sending sync, we should not return "error"
but a special value for "no timestamp". Otherwise the caller goes to
"faulty" state and can't sync any more (this situation loops over).
Also, check for timestamp errors only for event message, or we break
out of the messaging loop during wr synchronization (when we get bad
timestamps for frames whose timestamp we don't care about).
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/4c16bad8ccda3489abb04679767ce721ccb7a424Makefile: enable 64-bit pp_printf2015-06-18T09:06:59ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/e8c298bab62b80f6046c1a4e0f5ba3cc54111c17trivial: remove one obsolete comment2015-06-04T14:42:26ZAlessandro Rubinirubini@gnudd.com
anyways, we can't send delay_req just after receiving f-up.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/f08c8449d208f05a7e753b1a179b0f80fa1ba26aMerge branch 'ML-bmc-fixes'2015-04-20T14:58:03ZAlessandro Rubinirubini@gnudd.comhttps://ohwr.org/project/ppsi/commit/c8fd61ad1f5ef0020163f103a13c8c0f277e1b84Merge branch 'wrs-4.1.2-fixes-rebased'2015-04-20T14:40:48ZAlessandro Rubinirubini@gnudd.comhttps://ohwr.org/project/ppsi/commit/4179fcdc8a5383a87210df6ba94bfdc8613bcd0awrs-socket: bugfix: wait for late tx stamps2015-04-20T14:39:52ZAlessandro Rubinirubini@gnudd.com
When the wrs has high data traffic, the tx stamp can be delayed more than
the time it takes for software to poll for it.
What happened is that we got back -EAGAIN, but when collecting the
next stamp we got the previous one, and sync goes nuts ever after.
This uses poll() to wait a little for the timestamp.
Moreover, we check the frame we get back, so we can discard it in case
some unsync between tx frames and timestamps happen -- checking frame
contents is the suggested policy anyways, but I've been lazy in this,
when I drafted this wrs support.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/79ffd673a41a5d562a0f02a65cc41d956c8c7e63state-master: don't send f-up if sync stamp is wrong2015-04-20T14:39:52ZGrzegorz Danilukgrzegorz.daniluk@cern.ch
This is bsased on Greg's original commit, which is in wrs-4.1.2-fixes,
that we developed and released in the wr-switch-sw maintainance for the
4.1 series.
What we do here is return error for sending if the timestamp is not
correctly retrieved; the error is already handled in the sync+f.up
pair, so this is enough for f.up to not be sent.
The commit also changes state-master, in that we need to restart the
timeout for sync (and annunce) even if one even of sync (announce,
resp) fails.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/e360d3b0f0460dedb9a48d45fd87a233eeffd5d0wr-servo: calculate mu before printing it, not after2015-04-20T14:39:52ZGrzegorz Danilukgrzegorz.daniluk@cern.chSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>