- 15 Sep, 2013 5 commits
-
-
Alessandro Rubini authored
This renames "ofst_first_updated" (wrongly a runtime option) into "t1_t2_valid" as a servo field. This makes thing more readable and is a fix in that it allows more than one servo to coexist in the future. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This commit is another step in simplifying the servo. It makes the following changes: - format_TimeInternal is just moved (no effect) - pp_update_offset() and __pp_update_clock() are squashed together. They were called in sequence anyways, as two halves of a single thing. This changes the error return paths, because the whole procedure is aborted in case of error. I've never seen such errors, but I think if something is "aborted" it should not proceed. One non-error return from the first half is turned into a goto, to avoid changing indentation (that appears in the commit diff). - the meaning of "ofst_first_updated" is slightly changed. If we get an error in the sync phase the bit is cleared so delay-resp won't use the tuple. The field is then renamed in the next commit. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The servo implementation we brought forward from ptpd was strange and difficult to understand. This commit is the first step in trying to make some order, but it doesn't actually change anything but names. The entry points for the servo are now called pp_servo_init(), pp_servo_got_sync() and pp_servo_got_resp(). A two-step protocol calls got_sync after getting the follow-up message. Also, the hook for response messages is called handle_resp with a name similar to the hooks for sync and follow-up. The servo itself is not changed, but I reordered the functions so the calculations appear in the real order in which they happen. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 11 Sep, 2013 6 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
Servo logs show strings like "0.-00071881". We already had an unused display_TimeInternal, which is correct. This turns it into an sprintf and uses it as a static function in servo.c (only printer of TimeInternals, it seems). Meanwhile, this also removes the last pp_Vprintf. 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>
-
- 09 Sep, 2013 4 commits
-
-
Aurelio Colosimo authored
In case a port is inactive, its fd is not valid, so do not handle it in select. Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
frgn_rec_best field of pp_instance structure was not correctly initialized. This patch also rewrites a the ports 'for loop' so that it is more readable. Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
Check whether pp_instance port link is up or down. Force a new initialization in case link brings up. Do not call state machine for pp_instances whose link is down. This patch is inspired to how ptp-noposix (commit 2e46712e59) handles link status. Still missing (and thus declared with a FIXME) the reset of slave structures. On the single link, this lack does not cause issues. Anyway, must be fixed Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
- 04 Sep, 2013 4 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
invalidate fd value for ethernet_mode and check it again in case unix_net_exit is called twice (though should not happen). Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
unix_net_init must be able to be called more than once, thus calls unix_net_exit internally. Since unix_net_exit sets NP(ppi)->ch[0].fd to -1, it must not be called once again when its value is negative. Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
- 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>
-
- 30 Jul, 2013 1 commit
-
-
Aurelio Colosimo authored
Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
- 26 Jul, 2013 11 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
Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
correction field is not printed as hex value, so do not prepend it with 0x. Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
The previous implementation of wrs_time_ops was a bare call of unix_time_ops, but this was not correct since wrs must handle time on fpga, not the system time. wrs_calc_timeout is still using unix_time_ops, since it just needs a monotonic timestamping, without requiring the best precision. Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
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
Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
The select must be always called with the least required timeout. This patch fixes a bug which caused an undesired delay when a state machine, after receiving a packet, needed to be called soon (e.g. when it has just changed its status: its desired delay is 0). Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
The coding for wr timestamping functions has been mostly copied from ptp-noposix project: file libptpnetif/ptpd_netif.c, commit 2e46712e. Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
- 25 Jul, 2013 6 commits
-
-
Aurelio Colosimo authored
Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
According to previous patch, since wrc is a single interface architecture, set nlinks=0 so that pp_links configuration will not be searched for in ptp engine. Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
The pp_links mechanism, currently based on /etc/ppsi.conf file, shall not be mandatory, since not all archs will use it. Thus, this patch reduces at its minimum the dependency on ppi->nlinks. If an arch is not using the pp_links, it just has to define nlinks=0 in pp_globals struct, and the engine will work as well, assuming one pp_instance has been configured in the main. Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
No functional modification at all. Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
The same values used in ptp-noposix are copied here. Reference file in ptp-noposix is PTPWRd/constants.h, last changed by commit f57bc6cd. Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
A shorter interval between delay req messages leads to a faster synchronization. This parameter was increased in the past because of some stability issues, but at present it can be changed back to the same value as ptp-noposix. Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
- 07 Jul, 2013 2 commits
-
-
Alessandro Rubini authored
Sometimes the macros may already be defined (e.g.: arch-bathos). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-