- 05 Mar, 2013 4 commits
-
-
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>
-
Alessandro Rubini authored
the pp instance is bound to a network interface, so avoid a separate allocation. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 04 Mar, 2013 17 commits
-
-
Alessandro Rubini authored
By post-incrementing sent_seq we had a value that was not really the "last sent" as the comment claims. Thus, pre-increment it instead, so readers find the "last sent" value and don't need to subtract 1. 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>
-
Alessandro Rubini authored
This commits removes all the additions and subtractions of the protocol offset. Now all recv and send functions, receive the pointer to the actual data being sent, be it the ptp payload or the transport header. This simplification (though based on the two internal pointers within ppsi -- se previous commit) fixed a long standing bug with bare architectures, that didn't receive the frames due to some related problem in offset calculation. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This changes some things to make code more readable (I really didn't know what the tmp_header was: now it is the "received_ptp_header". The commit simplifies allocation, because the tx and rx buffers are now part of ppi itself. We now have tx_ptp and tx_frame, both pointing within tx_buffer (and the same for rx). The pointers are the protocol side (aligned) and the argument passed to send/recv (which may be not be 4-aligned). At this point nothing changes, i.e. both gnu-linux flavours work and bare-i386 is not able to received.
-
Alessandro Rubini authored
Ethernet mode used to reset the time to the epoch. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This commit has no technical effect: what works still works, and what doesn't work still doesn't work. Still, the inlines will do type-checking at a later time when we have a structure for the ptp header. Moreover the renames allow me to trace all uses in order to change them; it also generates build errors in wrpc-sw, forcing me to fix the new use in there as well, when I update ppsi as submodule. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
All fields are zero at startup, unless explicitly inizialized by the caller. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
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 is needed for the next commit, where time operations become local to the specific pp instance. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This commit moves the network operations inside the instance. It allows to have different operations for each instance, which will be useful in the future. For example, one ethernet card may have hardware timestamping and another may not. 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>
-
Alessandro Rubini authored
I'm going to split diagnostics into groups based on flags. And with different diagnostics for each pp instance, to be ready to debug multi-link situations. This commit adds the flags in the proper places and the first flag value, used in the next commit. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Too many messages are confusing: let's make a state change more visible than a re-enter of the same state. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 02 Mar, 2013 19 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>
-