- 27 Feb, 2017 1 commit
-
-
Alessandro Rubini authored
For wrpc-sw, this depends on a similar commit in wrpc-sw, because arch-wrpc relies on that implementation (to avoid building two of them). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 01 Sep, 2015 1 commit
-
-
Alessandro Rubini authored
This adds -Wstrict-prototypes -Wmissing-prototypes and takes actions accordingly. Some of the solutions are ugly, especially in the bare architectures, but I prefer to be warned if I take dangerous paths wrt prototypes while writing further code. I'm upset by those two not being included in -Wall, as they used to. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 26 Jun, 2015 1 commit
-
-
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>
-
- 07 Nov, 2014 2 commits
-
-
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
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>
-
- 02 Mar, 2014 1 commit
-
-
Pietro Fezzardi authored
-
- 15 Nov, 2013 1 commit
-
-
Alessandro Rubini authored
This simplifies the build system, by relying in weak symbols instead of the link order. We need weak symbols anyways for configuration, so we can get rid of the libraries. The size of binaries returned at build time is increased, because arch/ and lib/ stuff is not part of ppsi.o (as it actually should). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 31 Jul, 2013 1 commit
-
-
Alessandro Rubini authored
This changes all "Name Surname for CERN" to "Copyright CERN, author Name Surname". This is trivial and makes no change, with a few expections: - all trivial Makefiles that had "for CERN" lines have now no attributions, as they are trivial anyways. - a few unrepresented files have not the copyright notice (especially ptpdump, that I wrote in 2012). - a few "for CERN" remain in subprojects, where I didn't touch anyrhing Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 23 May, 2013 1 commit
-
-
Alessandro Rubini authored
This commit separates to its own directory the timing code specific to bere linux implementations. If you build with ARCH=bare-i386 or ARCH=bare-i386-64, TIME=bare is automatically selected. Please note how bare builds don't allow externally-set TIME=, as the architecture Makefile forces "TIME := bare" (not "TIME ?= bare"). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 23 Apr, 2013 1 commit
-
-
Aurelio Colosimo authored
pp_open_instance received a struct pp_globals, so rename it coherently. We have no pp_open_instance alone because an instance can live only inside its pp_globals struct. Signed-off-by:
Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
- 19 Mar, 2013 1 commit
-
-
Alessandro Rubini authored
While building under ubuntu-12.04 (64 bits, at least), bare builds were failing because of undefined "__stack_chk_fail" and "__strcpy_chk". The former is fixed by passing -ffreestanding to the build of pp_printf (i.e., we now export CFLAGS in the toplevel Makefile), amd the latter is fixing by preventing use of the inline printf function when building for bare architectures. This is from the manpage of gcc under ubuntu-12.04: NOTE: In Ubuntu 8.10 and later versions, -D_FORTIFY_SOURCE=2 is set by default, and is activated when -O is set to 2 or higher. This enables additional compile-time and run-time checks for several libc functions. To disable, specify either -U_FORTIFY_SOURCE or -D_FORTIFY_SOURCE=0. Thanks Aurelio for reporting ./MAKEALL was failing. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 14 Mar, 2013 1 commit
-
-
Alessandro Rubini authored
Like what I did in two commits ago, now if debug level for "frames" is 2 or more, net_ops->send and net_ops->recv now dump the data to stdout. The format is the same of tools/ptpdump, but the time is not showing the local time, as we miss localtime() and I don't want to waste time recoding it. This is an example of a bare-i386 slave requesting its master: send: TIME: (1363278286 - 0x5141f9ce) 1363278286.52969000 send: ETH: 88f7 (00:25:11:86:1f:d2 -> 01:1b:19:00:00:00) send: VERSION: 2 (type 1, len 44, domain 0) send: FLAGS: 0x0002 (correction 0x00000000) send: PORT: 00-25-11-ff-fe-86-1f-d2-00-01 send: REST: seq 2, ctrl 1, log-interval 127 send: MESSAGE: (E) DELAY_REQ send: MSG-DELAY_REQ: 1363278286.052689000 send: DUMP: payload (size 44) send: DUMP: 81 02 00 2c 00 00 02 00 00 00 00 00 00 00 00 00 send: DUMP: 00 00 00 00 00 25 11 ff fe 86 1f d2 00 01 00 02 send: DUMP: 01 7f 00 00 51 41 f9 ce 03 23 f8 68 diag-frames-1-eth0: SENT 44 bytes at 1363278286.052969000 (delay_req) This is a bare-i386 master receiving the same frame: recv: TIME: (1363278286 - 0x5141f9ce) 1363278286.92899000 recv: ETH: 88f7 (00:25:11:86:1f:d2 -> 01:1b:19:00:00:00) recv: VERSION: 2 (type 1, len 44, domain 0) recv: FLAGS: 0x0002 (correction 0x00000000) recv: PORT: 00-25-11-ff-fe-86-1f-d2-00-01 recv: REST: seq 2, ctrl 1, log-interval 127 recv: MESSAGE: (E) DELAY_REQ recv: MSG-DELAY_REQ: 1363278286.052689000 recv: TLV: too short (46 - 44 = 2) recv: DUMP: payload (size 46) recv: DUMP: 81 02 00 2c 00 00 02 00 00 00 00 00 00 00 00 00 recv: DUMP: 00 00 00 00 00 25 11 ff fe 86 1f d2 00 01 00 02 recv: DUMP: 01 7f 00 00 51 41 f9 ce 03 23 f8 68 00 00 diag-frames-1-eth0: RECV 46 bytes at 1363278286.092899000 (type 1) And this is tools/ptprump running on the master, for the same frame: TIME: (1363278286 - 0x5141f9ce) 17:24:46.092814 ETH: 88f7 (00:25:11:86:1f:d2 -> 01:1b:19:00:00:00) VERSION: 2 (type 1, len 44, domain 0) FLAGS: 0x0002 (correction 0x00000000) PORT: 00-25-11-ff-fe-86-1f-d2-00-01 REST: seq 2, ctrl 1, log-interval 127 MESSAGE: (E) DELAY_REQ MSG-DELAY_REQ: 1363278286.052689000 TLV: too short (46 - 44 = 2) DUMP: payload (size 46) DUMP: 81 02 00 2c 00 00 02 00 00 00 00 00 00 00 00 00 DUMP: 00 00 00 00 00 25 11 ff fe 86 1f d2 00 01 00 02 DUMP: 01 7f 00 00 51 41 f9 ce 03 23 f8 68 00 00 Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 07 Mar, 2013 2 commits
-
-
Alessandro Rubini authored
One I forgot to remove when cleaning arch-spec, the oter I re-added by error quite some commits ago, after it was moved to lib-bare/bare-time.c Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 04 Mar, 2013 3 commits
-
-
Alessandro Rubini authored
This commit moves the time operations inside the instance. It allows to have different time operations for each instance, which will be useful in the future. For example, one ethernet card may White Rabbit, and another may not be. This commit, like moving network operations inside ppi, requires a change in wrpc-sw. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This unifies all bare-linux common code. It's an out-of-context commit (as I'm not adding bare-arm today) but I prefer to avoid doing the same change twice in things that are going to change these days. BTW: this commit introduces no changes in the binary files generated, with the exception of a small difference between i386 and x86-64 in the receive buffer. This keeps the x86-64 version but i386 was not working anyways (and still doesn't work). That bug fix is in my queue, but I've other things to do first with ppsi. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
pp_timed_printf is a great resource, but we need to temporarily silence diagnostic printing in time_ops.get, in order to be able to tell stamping-related calls to just printf-related ones. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 02 Mar, 2013 5 commits
-
-
Alessandro Rubini authored
By moving calc_timeout into the time functions, we simplify the split-out of ./time-<arch> as a separate subdirectory. As a side effect, calc_timeout disappears from arch-wrpc, and wrpc-sw needs to be adapted to this commit, to provide it inside its own time_ops. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The structure was separately allocated with a size of 16. This avoids the alloc and makes the array the right size from the enum of message types. We thus a remove a number of magic "16" in the code. wrpc-sw must be updated too, in order to use this commit. There's still a problem: the code claims the number to be "last sent", but actually the value is incremented after sending. I'll need to pass again on this thing. ps: I changed name from "sent_seq_id" to "sent_seq" to the compiler complains for previous users, otherwise undetectable. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The timer implementatin was incredibly complex. Now there is no such thing as a timer in ptp. We only have timeouts. A timeout is a point in time. We calculate; we can be earlier; we can be later. The only thing which is arch-specific is calculating. This replaces every "timer" operation with the equivalent "timeout" one. All stuff is renamed to avoid confusion between "time" and "timer". Unfortunately, the resulting program as of this commit is not working. the pdelay_request timeout happens continuously, I'm sure I've exposed a latent bug, which I'm now going to fix. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
We had bare_timeval with both nsec and usec, but this doesn't work. As a result, our timers were only second-grained and not millisecond-grained (we got no nsec from clock_gettime). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 28 Feb, 2013 5 commits
-
-
Alessandro Rubini authored
This allows to pass "-V -V" or "-g" (slave only) and so on. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Danilo Sabato authored
-
Alessandro Rubini authored
pdelay (peer delay) is a configuration option for a PTP domain. IT is a huge mass of code, which we never actually used and is most likely buggy. This commits remove all related code, and configures our PTP engine as end-to-end. I doubt this commit can be reverted in the future, but at least it leaves traces about what was there and is not there any more. Something about pdelay is still there: the message names, one field in a structure and one configuration variable, to ease recovery in the future. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
set_TimeInternal was partial anyways, since TimeInternal is more than seconds and nanoseconds (even if only WR uses it). It was only used to zero the values, so use memset instead, within the new inline clear_TimeInternal() Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 27 Feb, 2013 6 commits
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The time operations are get, set and adjust. They are methods of a single structure in order to simplify use of custom timers (and make them separate works according to the LGPL). This patch set introduces specific <arch>-time.c files where all the timing stuff lives (not much, actually). Sometimes this turns <arch>-io.c into an almost-empty file, but that how history changes stuff. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Nobody was implementing this timer_adjust_all, and I'm going to rewrite the timer management anyways, because it is a horrible complication just to manage some timeouts for packet transmission. So let it RIP, and let's happily leave without it. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Instead of having several external functions for networking, only have one symbol: the structure of network operations. This simplifies stuff a while, and allows more static symbols and better encapsulation. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This unifies PP_ADJ_FREQ_MAX, that was defined in several places with the same value. Unfortunately, it isn't clear at all to me what is this value (looks like arch-spec uses it as nanoseconds and not as an adjustment). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This kills an ifdef that was due to die anyways. The only disadvantage is that bare-* architectures can't be passed arguments to force slave-only (while arch-gnu-linux can received it on the command line). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 24 Feb, 2013 3 commits
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Even the freestanding lm32 compiler has <string.h> (because gcc builds newlib by default as a minimal fallback). Since I want to get rid of pp_strlen and such stuff, we'd better include <string.h>, win size_t and use the standard definitions for standard functions. When we port to systems with no <string.h> we can provide it inside its own arch- directory. So no harm is done and the code is simplified. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 11 Feb, 2013 1 commit
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 10 Feb, 2013 1 commit
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-