- 23 Apr, 2013 12 commits
-
-
Aurelio Colosimo authored
Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
Three bugs and missing features are fixed here: - pp_open_globals received a SEGFAULT because its rt_opts parameter was not correctly handled when NULL; - use ppg->nlinks instead of obsolete ppg->nports; - set def->slaveOnly and def->clockQuality.clockClass properly even when more than one link is defined Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
Due to a bug in lib/conf.c, the conf file must be ended with a newline char; if not, the latest line is ignored. The bug will be hopefully solved soon, in the meantime this simple workaround avoids any problem. 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
The parser is implemented in lib/conf.c and has no libc dependencies. It is currently used by arch-gnu-linux, whose main function is here modified accordingly. This commit has not been tested yet, here is pushed temporarly to show how work is going on. Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
This patch temporarly breaks the proper functionality of arch-gnu-linux, since pp_parse_conf in lib/conf.c is just stubbed. 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>
-
Aurelio Colosimo authored
An array of struct pp_link is defined in struct pp_globals: it will cointain the result of conf file parsing. Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
The ppsi.conf file will define the basic behaviour of ppsi, prior to cmdline options, which will override conf settings. Here a sample ppsi.conf is defined, where a mini-switch, driving two slaves, is configured. User will need to define their own ppsi.conf according to their needs. Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
PP_VPRINTF is almost no more used, and anyway replaced by pp_Vprintf Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
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 7 commits
-
-
Aurelio Colosimo authored
Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
Due to multilink needs, those variables are no more global but can be defined as a different setting for each port. They will be set in a /etc/ppsi.conf file, which is not yet handled, but will be soon. struct pp_runtime_opts will contain only multiport settings. If the /etc/ppsi.conf file is not found or not handled (like it is at present), ppsi accepts and properly handles the same cmd line options as in the past. Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
This tuning is not mandatory, but permits to have a more stable (though slower) convergence. This is indeed the default setting which can be seen in original ptpd daemon. 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>
-
Aurelio Colosimo authored
This patch fixes a bug related to reception order of msgs. Sync msgs are defined as "Event" messages and FollowUp are "General" messages, and we need to handle them in the very same order they were sent (i.e. FollowUp is after Sync). With the implementation prior to this patch, we tried to serve Event and General alternatively. Now we always check for Event frames before General ones. I didn't find, in ieee spec, whether they cleary state that Event class is higher priority, at reception, with respect to General, but this is likely to be in this way, since Event messages are those needing the most precise timing. For more information about PTP message classes, see IEEE 1588v2, pag. 17, paragraph 6.4. Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
Aurelio Colosimo authored
This patch, suggested by Alessandro Rubini, fixes a recent bug which made delay_req message been issued just the first time, because the timer was not rearmed after the message sending. Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
- 25 Mar, 2013 1 commit
-
-
Aurelio Colosimo authored
Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
- 21 Mar, 2013 8 commits
-
-
Alessandro Rubini authored
Additionally, this reverses an if to remove an indentation level for the good code. 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 __BYTE_ORDER == __LITTLE_ENDIAN was failing on lm32, I don't know why. So dumping on the spec was wrong: "VERSION: unsupported (0)" The above symbols are defined by glibc, and I didn't even get undefined macro errors. So the commit kill bit fields, and I mask at run time instead. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This commit removes the part of wrpc.h that is not used. It was there when we tried to build a main function in ppsi itself, but now we depend on the exteranl wrpc-sewpackage to provide drivers and headers, so wrpc.h is now just for local material. Then, wrc_ptp_ppsi.c is fixed with regard to globals and all the rest. Moreover, I moved most of the initialization of static variables into compile-time assignments instead of run-time, since there's nothing dynamic here in those fields. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
I forgot to fix arch-wrpc when making the time_ops. Code mainly by Tomasz (wrpc-sw/shell/cmd_time.c) Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 20 Mar, 2013 3 commits
-
-
Alessandro Rubini authored
This new file needs some updates over what we imported from wrpc-sw, because we now have pp_globals (in preparation for multi-link, thanks Aurelio). The commit also makes a little order in the inclusions of this file, removing unneeded stuff and grouping hardware-related headers. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
These few lines are a copy of "wrc_ptp.h" as found in ptp-noposix. They are added here because they are the prototypes of now-local functions, and little more. Including the file from wrpc-sw would have required another -I directory, and I'd better not. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This file comes from commit e00d99f of wrpc-sw. It used to live there as an alternative to wrc_ptp_noposix.c, as a top-level entry point to the ptp engine. However, ppsi is quite a moving target these months, and most improvements in modularity of ppsi require a change in the top-level file (like we change the main and startup files in the other architectures). Thus, this commit brings the file into ppsi (and wrpc-sw will remove it when using this version of ppsi as submodule) so we can be work on this repository and build-test everything with no effort, saving us from always committing to wrpc-sw as well. Note: this commit copies the file unchanged, and doesn't even try to build it; later commits make the required adjustments to finally build it. Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Acked-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
-
- 19 Mar, 2013 8 commits
-
-
Alessandro Rubini authored
While building under ubuntu-12.04 (64 bits, at least), bare builds were failing because of undefined "__stack_chk_fail" and "__strcpy_chk". The former is fixed by passing -ffreestanding to the build of pp_printf (i.e., we now export CFLAGS in the toplevel Makefile), amd the latter is fixing by preventing use of the inline printf function when building for bare architectures. This is from the manpage of gcc under ubuntu-12.04: NOTE: In Ubuntu 8.10 and later versions, -D_FORTIFY_SOURCE=2 is set by default, and is activated when -O is set to 2 or higher. This enables additional compile-time and run-time checks for several libc functions. To disable, specify either -U_FORTIFY_SOURCE or -D_FORTIFY_SOURCE=0. Thanks Aurelio for reporting ./MAKEALL was failing. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This was an error on my side. The result may be undefined in "ntohs(++x)". It had not bad effects so far, but newer compilers correctly warn about it, and this commit fixes the error. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This fixes warnings that either come from a newer compiler than what I routinely use or from building in a 64-bit host. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Our "eval export CC=" needs an exta quoting level under dash, to prevent an error like the following: export: 1: -m32: bad variable name This setup still works under bash. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
When calculating the running average (and the average between two as well), we must first add all items and then divide. Everyone does like this, so we should as well, to avoid loosing the low bits Example: 3 and 5, average is 4: (3+5) / 2 = 4, but 3/2 + 5/2 = 3. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This only has effects on diagnostics: now all exit paths from pp_update_clock() pass through the diagnostics stanza. I also removed a duplicate diagnostic message and a now-unneeded else, so the good code is at the first indentation level. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-