- Nov 11, 2014
-
-
Alessandro Rubini authored
In the next commits we'll need CONFIG_ symbols and ARRAY_SIZE Unfortunately, we can't use "-include include/generated/autoconf.h" in CFLAGS, because pp_printf is built with our CFLAGS from its own directory. And I'd better not include the full pathname as our make is verbose Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Nov 07, 2014
-
-
Alessandro Rubini authored
-
Alessandro Rubini authored
This paves the way to the addition of a third protocol. Besides the code is slightly smaller (around 50 bytes on all archs). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This reverts commit 9a3e00784afea6ab46510315b9c50cb510175f2d.
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Bitfields are bad, so this turns them into flags and constants. There should be no change at all in behaviour (although the code is a little smaller). The next commit does a change for real. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
I'm going to introduce a "flags" field in pp_instance, so diagnostic flags are better called d_flags. The same applies, for consistency, to the global variable. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Bitfields are a bad practice. And this removes a few bytes in the wrpc builds (no change in other builds). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Nov 04, 2014
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
-
-
- Oct 14, 2014
-
-
Grzegorz Daniluk authored
This reverts commit 5ac225a4. Otherwise, in the case of WRS (when wrp->calibrated is always true) we never call calib_poll() and we don't provide correct values of fixed Tx/Rx deltas.
-
- Sep 22, 2014
-
-
Alessandro Rubini authored
The port number used to be 1, but we are multi-port, and forgot to update this item (no bad effects were seen so far, but the standard requires each port to use a different port number so loops can be managed, and, for example, having both Ethernet and UDP on the same wire is a loop. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Otherwise, if we have two PTP ports for the same interface, like Ethernet and UDP, we are not able to tell which message is for which. This now works as expected: ./ppsi -C "port eth0; iface eth0; role master; proto raw; diagnostics 111" \ -C "port eth0u; iface eth0; role master; proto udp; diagnostics 111" Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This adds the "adjust_frequecy" method to time-wrs. The WR servo is not using this method, which is only called by the normal PTP servo. With this new method, a non-WR slave is able to trim frequency, whereas before this commit we were only able to jump our time. The code move straight the FPGA register, by having some hardware-specific constants explicit in the code. Thus, it is not very beautiful, but it works fine on my systems. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
All adjustments are passed as part-per-billion, so after getting mad in understanding what freq_ppm was, I renamed all of them to freq_ppb. While making changes I verified this is what it is. Thus I fixed the comment in ppsi.h (that was wrong by a factor of 64) and the adjustment code in bare-time.c that made the same error (I admit I don't test arch-bare often). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Aug 06, 2014
-
-
Alessandro Rubini authored
This bug was present in previous versions too: when not sending the calibration pattern, we had no timeout, so a lost frame was fatal. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This commits adds retry in most wr states. This allows to deal with lost frames. There a few missing items, and a few rough situation. The code itself shows a number of repetitions, which I dislike, but over time we'll fix it properly. By now this should be enough to deal with transient data loss during calibration, that happens at some users' site. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Aug 05, 2014
-
-
Alessandro Rubini authored
WR_DEFAULT_INIT_REPEAT is going to be used instead (we had both, none of them used; now we'll use one). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Currently, a wrpc slave taks almost 10s to do the calibration step (uncalibrated/wr-s-lock), because, among other things, of eeprom access. Thus, a 10s timeout is really unsuitable. Turn it to 15 instead. 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
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Aug 03, 2014
-
-
Alessandro Rubini authored
The wrPortState variable was assigned-to in various places: it was "almost" mirroring the PTP state, but not every WR state was actually setting it. In fact, it was only used for calibration sub-states, so remove all other assignment. Often, the code did: wp->wrMode = NON_WR; wp->wrPortState = WR_PORT_IDLE; but only wrMode was ever checked, so WR_PORT_IDLE (was: WRS_IDLE) is redundant and can be removed altogether. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Some sub-states are never used, so remove them. Moreover, avoid using WRS_CALIBRATION for two things: now wrPortState only uses WR_PORT_ values (well, it will in the next commit). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Aug 02, 2014
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This picks the following commits (most recent on top): e17d874 README: update for the new code base d391e62 added 64-bit example/test 670b5e8 Makefile: support 64-bit option; add div64.c c2384cd vsprintf-full: offer 64-bit printing as an option 220b19e vsprintf-full: simplify a little 526daa6 vsprintf-full: remove unsed code for %p printing 1a28825 vsprintf-full: prevent a warning when a pointer is 16 bits We are using 64-bit prints currently, but wrpc-sw does. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Jul 21, 2014
-
-
Alessandro Rubini authored
-
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
Remove duplicated messages, and misleading ones (ofm is not averaged any more, only mpd is averaged). This changes the log format, and may upset users with old grep lines saved somewhere. Like me. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Also, prepare for drop support (i.e., no message for the special error code) Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This adds frame dropping as a fault-injection mechanism. It activates it for arch-unix in the same commit, because I tested it. Not documented yet. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Also, prepare for drop support (i.e., no message for the special error code) Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
For some reason (I don't rememeber why), RX timestamps are retrieved from the socket, while TX timestamps are with tops->get. Thus, there was no utc/tai correction on receive stamps (i.e. T2). This affects us when we are driven by a WR switch, that properly differentiates between UTC and TAI. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Jul 18, 2014
-
-
Pietro Fezzardi authored
There is no need to remove outliers and to make a running average on ofm. Indeed we know that ofm = t2 - t1 -mpd. We are already removing outliers and averaging on mpd. So, if after mpd has been "cleaned", ofm still shows outliers or irregularities they are for sure due to t1 and t2. So they are errors coming from the clocks and they have not to be ignored. Instead they must be corrected ASAP, and to do that the software must be able to see them instantly. So no running avg nor outlier removal has to be performed on ofm values.
-