- 23 May, 2013 1 commit
-
-
Alessandro Rubini authored
The unix time and network operations are going to be used as a fall-back solution by other timing engines. For example, hardware-specific timestamping capabilities can be selected (such as the Linux ioctl API) but if the Ethernet interface (and thus the pp_instance) doesn't support the feature, related code will be able to set back the unix operations in place. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 15 May, 2013 1 commit
-
-
Aurelio Colosimo authored
This fixes the correct behaviour of ppsi in arch-wrpc, where adjust_freq is not available. Still some more fixes may be needed in servo.c. I'm not sure about the parameter -adj to be passed both in adjust_freq and adjust_offset case. Anyway, this has been tested on two SPECs and reaches synchronization. Signed-off-by:
Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
- 09 May, 2013 1 commit
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 03 May, 2013 1 commit
-
-
Aurelio Colosimo authored
rt_opts parameter was always passed as NULL. With this patch, users who do not want default rt_opts provided by proto-standard need to set their rt_opts explicitly. Signed-off-by:
Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
- 23 Apr, 2013 6 commits
-
-
Aurelio Colosimo authored
Command line now acts globally. If multilink context (ppsi.conf defined and cointaining more than one link), the behaviour of -g and -e flags is common to each link. On the other way, -b flag can not be used in this case. Signed-off-by:
Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
GDSDEF macro returns the defaultDS field of struct pp_globals. Actually, it is the same pointer returned by DSDEF, since the default dataset is unique. The DSDEF macro is not removed both to preserve commit history and to increase readability (we do not take ppg pointer around and DSDEF(ppi) is shorter than GDSDEF(GLOBS(ppi))). Signed-off-by:
Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
GOPTS macro returns the rt_opts field of struct pp_globals. Actually, in the current implementation it is the same pointer returned by OPTS, since each pp_instance has no "local" rt_opt, but points to the global one. Signed-off-by:
Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
New function receives a struct pp_globals, coherently with pp_open_globals. Signed-off-by:
Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
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>
-
Aurelio Colosimo authored
pp_parse_conf will receive the txt data read from conf file and will compile the ppg->links structs. File open is supposed to be done outside the proper parser here defined, so that any architecture, even those with no filesystems, can make use of the parser, supposing the configuration txt data is saved elsewhere (e.g. in a E2PROM) Signed-off-by:
Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
- 08 Apr, 2013 1 commit
-
-
Aurelio Colosimo authored
Default Data Set is common to all ports, so it must be defined globally. pp_open_instance now gets a pp_globals object; the same should be done for pp_close_intance, but is not urgent since it is currently used by wrpc arch only, which is a single port arch. Signed-off-by:
Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
- 02 Apr, 2013 3 commits
-
-
Aurelio Colosimo authored
Signed-off-by:
Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
Signed-off-by:
Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
This patch is temporary and is thought only to guarantee the correct convergence of the algorithm. Some of the latest changes in servo.c, about how time is adjusted and how the max value for observed drift is set, made it unstable. With this patch, the behaviour is restored to the same as ptpd, though it still needs to be reviewed to increase performance, readability and easier maintainability. Signed-off-by:
Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
- 18 Mar, 2013 5 commits
-
-
Aurelio Colosimo authored
Signed-off-by:
Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
Signed-off-by:
Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Alessandro Rubini authored
I initially looked at int64_to_TimeInternal to swap arguments, since to_TimeInternal as timeinternal (the output) as first argument, and they appeared in pairs. However, int64_to_TimeInternal is only used for correction fields, and they are scaled nanoseconds (page 126), not nanoseconds. Thus, this commit fixes the conversion and renames the function to "cField_to_TimeInternal" to better tell the reader what it is. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Now that it's clear pp_update_offset() receives t1 and t2, which are fields of ppi itself, avoid passing them. However now it's clear that this function might be seriously wrong, and needs review (ofst_first_updated should die, I think, preferring simply code to unneeded contortions). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 14 Mar, 2013 1 commit
-
-
Alessandro Rubini authored
I'm adding generic dump code to the receive and send code paths, so I need the length of the incoming frame when first "unpacking" it, to dump the whole frame using code from tools/dump-funcs.c Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 07 Mar, 2013 5 commits
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This is the result, on a master, with "-d 02": diag-time-2-eth0: posix_time_get: 1362675879.940187923 diag-time-1-eth0: timeout expired: PP_TO_ANN_INTERVAL diag-time-2-eth0: posix_time_get: 1362675880.081818439 diag-time-2-eth0: posix_time_get: 1362675880.233227916 diag-time-2-eth0: recv stamp: 1362675880.233227916 (user) diag-time-2-eth0: posix_time_get: 1362675880.233499803 diag-time-1-eth0: timeout expired: PP_TO_SYNC (time level 1 reports timeouts and set, level 2 reports get-time too). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Unfortunately, we need to pass ppi to the time operations, so we can have per-instance logging options. This is the second time I found the need for such extra argument: the first time I worked it around, now I surrender. Actually, I don't find it unlikely for a multi-instance process to spit a lot of diagnostics about timestamps. A developer may need to filter messages according to who is tiemstamping/timing out etc. 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
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>
-
- 05 Mar, 2013 7 commits
-
-
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
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
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
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
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
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 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
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>
-
- 02 Mar, 2013 3 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 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>
-