- 02 Mar, 2013 4 commits
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
We had bare_timeval with both nsec and usec, but this doesn't work. As a result, our timers were only second-grained and not millisecond-grained (we got no nsec from clock_gettime). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This is a subset of <linux/jiffies.h> with typecheck from <linux/typecheck.h>. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This small patch-set removes the MSG_SEND_AND_RET function and its variants. I find it extremely hard to read multi-line macros, and also having a function returns implicitly by calling a macro. I understand why this was born, but now I feel really better with the code.
-
- 01 Mar, 2013 5 commits
-
-
Alessandro Rubini authored
This removes the unmanageable MSG_SEND_AND_RET macro, turning it to a normal function (inline, at the time being, to avoid moving from the header to a different place). The function is called __send_and_log because it logs too, but I'd better move logging to the actual send and recv methods. BTW: the message "-> FAULTY" (now removed) was wrong, because not all errors of this function result in FAULTY state in the fsm. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This kills MSG_SEND_AND_RET_VARLEN, turning everything into MSG_SEND_AND_RET. Such macro now receives the length argument and doesn't receive the "pdelay" argument any more, because it is zero by design in this implementation. This commit has no effect on the compiled files. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
I'm sorry, but I need names better than x,y,z,w . This is my first step in getting rid of this complex macro. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
No effect: the final program is still called ptpdump. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 28 Feb, 2013 30 commits
-
-
Alessandro Rubini authored
This allows to pass "-V -V" or "-g" (slave only) and so on. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Such stuff is needed for command line parsing. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Danilo Sabato authored
-
Danilo Sabato authored
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This is accomplished by making msg_unpack_header return an error code (and by warning users who ignore it). We *really* don't need our own frames back -- even if they come from a different port. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The second time you do ADD_MEMBERSHIP to a multicast address, the ioctl returns ADDRINUSE and ptp goes to faulty state. By removing it stuff works. The issue is there since commit f44fa35b, the initial UDP implementation, which hasn't been used in practice. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
pdelay (peer delay) is a configuration option for a PTP domain. IT is a huge mass of code, which we never actually used and is most likely buggy. This commits remove all related code, and configures our PTP engine as end-to-end. I doubt this commit can be reverted in the future, but at least it leaves traces about what was there and is not there any more. Something about pdelay is still there: the message names, one field in a structure and one configuration variable, to ease recovery in the future. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The master chooses whether it is one-step or two-step (page 66). It doesn't make sense to be one-step (but we accept one-step masters when we are slave). 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
IN this way users can tee the messages to a file and avoid the 4k-at-a-time bursts. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This somehow voids the effort of two commits ago. But we really don't need to save space when building a full exectutable linked with libc and all the rest. As a side effect, it allowed me to discover the wrong varargs to some messages (see previous commit). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
printf with missing argument. Introduced in a8733f10, 52 commits ago. I didn't notice because I was not using CONFIG_PPSI_RUNTIME_VERBOSITY (as expected, the preprocessor hit again). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The pp_Vprintf (Verbose printf) macro, replaces PP_VPRINTF in the file to ease generation of dumps. All messages are build-time protected by "ifdef VERB_DUMP" anyways: by removing the dependency on CONFIG_PPSI_RUNTIME_VERBOSITY it's easier to enable the messages at build time because you just need to set USER_CFLAGS="-DVERB_DUMP" without the need to force RUNTIME_VERBOSITY as well. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The big dumping stanzas are already conditional under if(pp_verbose_dump), so they only exists if VERB_DUMP or VERB_LOG_MSGS is defined at build time. This commit adds the same build-time protection to other messages related to packet dumps (all of them rely on a build-time protected subfunction anyways). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The three "raw" fields claim to exist for debugging, but since we have several TimeInternal structures around they cost quite some space. The fields were only copied to TimeInternal from network frames, and there is not explicit code to dump them. Thus, this commit removes them but leaves the code in place, so it can be re-enabled if the need arises. (I use the ugly "#if 0"). 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
sometimes I jumped to "no_incoming_msg" in case of error. This renames the labels to "out", as the catch both error and normal exit paths. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
set_TimeInternal was partial anyways, since TimeInternal is more than seconds and nanoseconds (even if only WR uses it). It was only used to zero the values, so use memset instead, within the new inline clear_TimeInternal() Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This stuff must be reviewed again anyways, because I'm not sure at all about what these numbers add (I can't find proper docs or examples). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 27 Feb, 2013 1 commit
-
-
Alessandro Rubini authored
This introduces "-DDIAG_ERR" at build time and pp_error() as a conditionally-compiled and conditionally-enabled thing. I'm not sure error messages should be missing from the binary by default, but I'll evaluate better at a later time, after debugging my own errors. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-