- 14 Mar, 2013 4 commits
-
-
Alessandro Rubini authored
Include <ppsi/ieee1588_types.h> in tools/, like the rest of the code does. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This commit removes the "dest" argument to dumpstruct(), which now uses printf() and not fprintf(dest,). I plan to use these functions withing PPSi itself if the "frames" diagnostic level is 2, and I'd better avoid to hack around fprintf. ptpdump is not changed, as it already used dumpstruct() with stdout as destination. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
I don't want to declare globals in header files by error (see previous commit). So I'd better use this flag to request "multiple definition" errors at build time. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
In commit 7c14152c I removed some typedef, in my quest for getting rid of them. But I forgot to remove the type name, so we got "TLV" and similar global variables in the object files. This fixes the buglet, then I add -fno-common to prevent this for happening againg. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 12 Mar, 2013 3 commits
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Commit f9f487ff made ClockIdentity into a structure, but I didn't rebuild the tools, which are affected by the type definitions. This fixes the building of ptpdump. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 11 Mar, 2013 2 commits
-
-
Aurelio Colosimo authored
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 08 Mar, 2013 11 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 simplifies the dataset_cmp a little more, and adds some comment. Nothing changes in the outcome of this commit but I'm unsure about the code (i.e about the original code). The specification says to compare *port* identities, but we are comparing clock identities instead. This is the same in the original ptpd, so if it is wrong it has always been. We'll be able to see what happens when checking with several masters, after porting ppsi to multi-link setup. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This replaces memcmp(a, b, PP_CLOCK_IDENTITY_LENGTH) with idcmp(a, b) and makes no other changes. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
We should use time operations instead. I forgot the protorype in the header, and now we fail the link step of wrpc-sw with ppsi. Bug introduced in 4b07d444, 106 commits ago. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
We don't have st_com_restart_annrec_timer any more, but I forgot to remove its prototype from the headers. This lead to a link failure in wrpc-sw with the ppsi submodule. But introduced in 415e530e, 96 commits ago. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
the field is used in wrpc-sw, so move it out of "#if 0". Bug introduced by e441b48b, 134 commits ago. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The code, when receiving announce, was setting a flag in order to run bmc at the next iteration, when that happened, the frame just received was discarded in favour for the programmed state update. This commits remove some fields and one helper function, so the new announce is immediately processed and no frame is lost. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
the portState field is probably a relic of ptpd, then the state machine was a single switch() statement. Many places were still setting it, but nobody was ever reading the field. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
There is no need for a "msg_tmp" in the pp-instance. All uses are really temporary to a function, so we can use local variables instead. (This is not the same as what was called tmp_header, which was referenced all over message processing, so it still exists, though renamed). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 07 Mar, 2013 20 commits
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
A large number of functions here got hdr and ann, but struct pp_frgn_master includes such fields, and most callers passed hdr and ann from the same structure. So I chose to pass a foreign master instead of the two components, but I'm still unable to remove the two full structures inside until I clean up the msg.c mess. So, at the end, this is not really a step forward, but it helps such later step. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Since WR only needs one byte of information in the announce structure, we can make is generic by calling it differently. This changes only the name (and the size: it is now unsigned long), but has no effect on the marshalling/unmarshalling of such data. I'm touching this because I'm working on announce messages (as related to foreign masters). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
I renamed port_identity to port_id so the compiler helped me. Then, since both fields are used at the same time, compare/copy them in a single shot. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The field was only to be set and reported, not really used. We definitely need a way to age potential masters, but counting announce messages without expiration is not the way. 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
Trivially, return what we have, becuase less than zero is less than zero. No, the wouldn't pass my exam. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
When the "if" branch returns, we don't need an "else" branch. These students wouldn't pass my exam. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
You may be bored by these small changes, but I want to show that I didn't introduce errors. In any case, each such change is reducing both entropy in the source and binary size in the output. 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 "type" was the only type represented as an array instead of being a structure. This leads to inconsistent use: if you memcpy the other ones you need "&", but not here. So this commit uses an encompassing structure, to have ClockIdentity behave like other composite fields. The commit has no effect at all on the generated binary files for wrpc but it unexpectedly reduces the size of the output on the PC. Anyways, the commit is trivial, and all changes can be easily verified to have no effect. While this increases entropy, the reasoning is that I want to assign structures instead of running zillions of memcpy functions, with the hairy PP_CLOCK_IDENTITY_LENGTH. So later commits, based on this one, reduce entropy. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
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
One I forgot to remove when cleaning arch-spec, the oter I re-added by error quite some commits ago, after it was moved to lib-bare/bare-time.c Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-