- 02 Mar, 2013 28 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
We are not even trying to build the complete executable here, so remove crt0.S and any references to it. I forgot these pieces in commit arch-spec: removed unused source files which happened 101 commits ago. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
While some parameters are still there, for future use when we'll put back the pdelay mechanism, the default mechanism is clearly not pdelay, and incorrectly-used parameters are abetter removed. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Actually, there's no need to build with three pp_printf any more: we know pp_printf is sound. So let's just print once with "xint" pp_printf and once with all messages activated, so see the worst size we get to. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This fixes a bug introduced in 44deab24 (97 commits ago), where I split WR_DSPOR(ppi) out of DSPOR(ppi), but not all diagnostics has ever been built. Next commit fixes this, and allowed me to make this very fix. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
If the state just executed switched to a new state, we should enter that new stat immediately, and ignore ppi->next_delay. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The various "goto out" in case of error should report the error. We don't have them at this point, but they are better checked. And, at exit, there's not need to clear the timeouts. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Also, remove unused management macros and a wrong "+ 4" in announce length. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Thanks Aurelio for reporting. You compiler is bigger than mine. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This patch-set rewrites the timers into much simpler timeouts. Code is smaller, binary is smaller, we have less arch-dependent functions and so on. Meanwhile I noticed and fixed some buglets that got unexposed or unnoticed.
-
Alessandro Rubini authored
The function st_com_restart_annrec_timer is now just a one-liner, and it really is just a timeout operation. So call it pp_timeout_restart_annrec instead, and have it inline in ppsi.h, removing it from common-fun.c Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The frames should be sent with some dispersion around the timeout point. The new function calculates the correct dispersion, but we need to change the setting of next_delay in order to actually spread the distribution of announce and other messages. Also, this commit doesn't spread all message times, some work on the field is still needed. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
It look like the timeouts were not restarted after they expired (and the respecti message is sent). The previous commit, that disables expired timers automatically, exposed this bug. Unless I misunderstood, the 1s timing of announce message was due to the 1s-long delay between re-invocations of the state-master code. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
commit 2ce296a5 removed this stanza, but it looks like we actually need to force IP_MULTICAST_LOOP to zero.
-
Alessandro Rubini authored
By zeroing the timeout whenever it expires, a number of state files get simplified a little. So pp_timeout_z() returns 1 or 0 like pp_timeout(), but also clears the timeout when it is expired. Moreover, when a timeout expires a message is printed if the build-time option pp_verbose_time is set (and run-time verbosity is at level 2). In this way all timeouts are reported, or none of them. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This kills all WR-related timeouts because one of them is enough (they are used in each state as a timeout for completion of that very state). Moreover, since ppsi should be extension-independent, we now define 4 timeouts for the extension in use (and WR only uses timeout 0). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This bug has no effect, but I'd better commit it separately for documentation purposes. Actually, there is not need to clear the timeouts when they are state-specific and we are changing state. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This fixes the bug exposed by the previous commit. 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>
-
Alessandro Rubini authored
This is a subset of <linux/jiffies.h> with typecheck from <linux/typecheck.h>. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This small patch-set removes the MSG_SEND_AND_RET function and its variants. I find it extremely hard to read multi-line macros, and also having a function returns implicitly by calling a macro. I understand why this was born, but now I feel really better with the code.
-
- 01 Mar, 2013 5 commits
-
-
Alessandro Rubini authored
This removes the unmanageable MSG_SEND_AND_RET macro, turning it to a normal function (inline, at the time being, to avoid moving from the header to a different place). The function is called __send_and_log because it logs too, but I'd better move logging to the actual send and recv methods. BTW: the message "-> FAULTY" (now removed) was wrong, because not all errors of this function result in FAULTY state in the fsm. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This kills MSG_SEND_AND_RET_VARLEN, turning everything into MSG_SEND_AND_RET. Such macro now receives the length argument and doesn't receive the "pdelay" argument any more, because it is zero by design in this implementation. This commit has no effect on the compiled files. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
I'm sorry, but I need names better than x,y,z,w . This is my first step in getting rid of this complex macro. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
No effect: the final program is still called ptpdump. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 28 Feb, 2013 7 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>
-
Alessandro Rubini authored
Such stuff is needed for command line parsing. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Danilo Sabato authored
-
Danilo Sabato authored
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This is accomplished by making msg_unpack_header return an error code (and by warning users who ignore it). We *really* don't need our own frames back -- even if they come from a different port. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-