- 21 Jul, 2015 3 commits
-
-
Alessandro Rubini authored
Earlier we only called it in from slave state, but it's correct to do it in any state (thus also from st_com_master_handle_announce, used by listening and master mode. This makes WR syncing much faster. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 20 Jul, 2015 2 commits
-
-
Alessandro Rubini authored
Sometimes we get error in the recv(MSGQUEUE), with EAGAIN. Likely we got a real frame (so poll for reading is ok) but no stamp yet. This unsynced the transmitted frames and the error queue. This fix, i.e. retry if getting nothing, seems to fix the (rare) problem. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
If we were offset by a whole second, we'd remain in SYNC_SEC (SYNC_TAI) without moving to SYNC_PHASE. It happens when you change the second counter by hand, but it's very unlikely in the initial setup. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 10 Jul, 2015 1 commit
-
-
Adam Wujek authored
Signed-off-by: Adam Wujek <adam.wujek@cern.ch>
-
- 09 Jul, 2015 3 commits
-
-
Alessandro Rubini authored
What happened, sometimes, is that the phase setpoint take a meaningless (and high) value. This is because we were into SYNC_NSEC and moved to SYNC_PHASE without checking. Maybe because of other problems too. That situation led to a lockup of the softpll, which tries to reach an unreachable setpoint. Now we force to stay in SYNC_NSEC if the offset is more than one cycle (and SYNC_SEC if more than one second). As a side effect, the phase setpoint is always 0..16ns (while earlier I got setpoints of 1.5 of 17.5 etc, up to 64.5 for the same setup and same temperature). The problem here is: what is going to happen if, by thermal effect, the phase setpoint crosses the 0..16n interval? Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Adam Wujek authored
-
- 08 Jul, 2015 3 commits
-
-
Adam Wujek authored
Tune SNMP_MAX_OFFSET_PS and SNMP_MAX_DELTA_RTT_PS Signed-off-by: Adam Wujek <adam.wujek@cern.ch>
-
Adam Wujek authored
Remove the n_err_rxtx_deltas from the struct wr_servo_state since it is not used anymore. Checking deltas was moved directly to SNMPD. Signed-off-by: Adam Wujek <adam.wujek@cern.ch>
-
Adam Wujek authored
Checking whether deltas are zero is moved to SNMP. Signed-off-by: Adam Wujek <adam.wujek@cern.ch>
-
- 06 Jul, 2015 22 commits
-
-
Benoit Rat authored
When changing the state of the WR servo we can call a hook (function pointer) to a function defined by a user in the upper layer (wrpc-sw). The purpose of the hook is to add new functionalities when we reach a specific state (Alarms, IRIGB, etc...) without needing to change the code of PPSI. [This is a rework of the original patch by Benoit. Mainly, I added the extra integer argument to the hook (so I call it twice: both entering and leaving the servo), and I removed the function to set the hook from wrpc: the main function can set the pointer directly] Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
-
Alessandro Rubini authored
The switch is padding short frames sent from the CPU in the nic core. When the frame is then being sent to an "access" port, the tag is removed, and thus the frame gets shorter. The net effect is that sync/f-up/delay-rep were sent short, and discarded by the recipient. Greg could move padding to the endpoint, but this extra work is not really needed, as nobody else is expected to get frames from the CPU over the SFP ports. So we chose to fix transmission in software and avoid to change the gateware. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The way vlan frames are received is different on wrs than in normal Linux. Likely my own driver (for wrs hardware) is not doing the right thing. So, when we receive tagged frames, they reach us as-is (not as the payload only, with "aux" data on a side). This commit considers this case. The commit also fixes a pair of other details -- mostly, the amount of "short packet of 0 bytes, ignored", by returning -2 to mean "drop with no error". Signed-off-by: Alessandro Rubini <rubini@gnudd.com> SQUASH fix for ARCH_WRS Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
When we support multiple vlans, we must issue announce to all supported vlans. Same applies to sync/follow-up. This changes state-master.c to do the sending several times. Initially I changed msg.c (for the announce message only), this saved the repeated call to msg_pack_announce() but by doing it at state-master level I have simpler code and layer consistency (doing sync/fup at msg.c level would be a mess). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
With UDP we have two channels but we talk with the same peers. Moreover, we reply with a general message to an event message, so having two peers was plain wrong. I'm well aware this commit should happen before vlans are introduced, but I don't want to deal with all the conflicts in moving it back. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The changes to the two socket files are very similar, and rely on the linux way of doing things: on receive we must listen to every protocol and use the auxiliary information to tell vlans apart. On transmit we must build the hardware header with vlan information. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
While looking for an alignment bug I had bad frames: being able to look at the binary content of all ptp-ethtype frames (or ip/udp/ptp) is very useful in that situation. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This requires some change to the include files, to be able to build for all architectures. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
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: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
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: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
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: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
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: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
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: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 01 Jul, 2015 1 commit
-
-
Alessandro Rubini authored
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: Alessandro Rubini <rubini@gnudd.com>
-
- 30 Jun, 2015 2 commits
-
-
Adam Wujek authored
-
Adam Wujek authored
Signed-off-by: Adam Wujek <adam.wujek@cern.ch>
-
- 29 Jun, 2015 1 commit
-
-
Adam Wujek authored
--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: Adam Wujek <adam.wujek@cern.ch>
-
- 26 Jun, 2015 2 commits
-
-
Adam Wujek authored
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: Adam Wujek <adam.wujek@cern.ch>
-
Adam Wujek authored
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: Adam Wujek <adam.wujek@cern.ch>
-