- 07 Mar, 2013 20 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
This only introduces the header files, the actual code is still missing, and is added by later commits. I still want this to be by itself because it explains the thing (please read the comments in diag-macros.h, that I won't copy in this commit message). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
I need to refer to ppi->flags from inside diag-macros.h, so this splits out a new header, which is expected to only be included by ppsi.h (no change for our developers). 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
Actually, until this commit we could not use pp_printf inside ppsi.h, in inline functions or whatever. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This adds the interface name where the error happened (we'll need it for multi-link setups, that Aurelio is going to implement soon). Moreover, this kills the last pp_diag_error call Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This finally removes the diag directory by folding two one-line functions into diag.h. The dir is a relic of ptp-proposal that hosted pp_printf, but now we have it separate anyways. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
fsm.c is the only user of timed_printf, and actually I don't expect other messages to need timing (since we know the time from the fsm states). I may repent, I'm aware. But at this point I'm killing diag-yes, to make the one and true diagnostic environment, without duplications and conflicts. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Since diagnostics about the fsm is only used in fsm.c, move it there so we have less global context and we are all happier. 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
diag_fatal enters a while(1) loop, but the code here reports the error to the caller. So calling diag_fatal was wrong. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Really, this is an extrac complexity with no advantage (did we ever use it?) If users really want a small system they can choose the NONE implementation of pp_printf. The extra half a kilobyte saved by diag-no is really not worth the effort: % make clean; make -s ARCH=bare-i386 CONFIG_PRINTF_NONE=y % size ppsi.o text data bss dec hex filename 10323 208 264 10795 2a2b ppsi.o % make clean; make -s ARCH=bare-i386 CONFIG_PRINTF_NONE=y PPSI_NO_DIAG=y % size ppsi.o text data bss dec hex filename 9792 208 264 10264 2818 ppsi.o Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 05 Mar, 2013 15 commits
-
-
Alessandro Rubini authored
fsm.c corrently decodes the received frame, and error management is built in (even if code in msg.c still needs to be audited to be more careful about rogue frames). However, when a received frame is in error, fsm.c cannot return to the caller because it doesn't know the current delay. Thus, zero the frame and call the current status, so we have back a recalculated ppi->next_delay. Meanwhile, mask with pp_verbose_frames the diagnostic message for received frames -- and be more careful with accessing it's data. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
A number of states were setting ppi->next_delay before re-setting it to a different value, or setting it on a state change (which now occurs immediately) Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
fsm states where we are waitiing for a frame or for a timeout, now correctly set next_delay to the right number of milliseconds. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The new function reports how many ms in the future is a timeout event, to be able to correctly time when we should re-entering the state machine and correctly spread our frames according to the specification. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The function is called by several states, but only state-slave is checking the delay request timeout. Thus, this commit removes the associated lines from the common function and moves them back to state-slave, the only state that issues delay_request frames. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
All archs allocated one foreign master, but the default was 5 and the command line could even change it. Hardwire the number to 5 and skip the allocation by folding the array in pp_instance itself. Anyways, the add_foreign() function needs serious review, later on. 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
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
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 5 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>
-