1. 23 Apr, 2013 1 commit
  2. 19 Mar, 2013 1 commit
    • Alessandro Rubini's avatar
      Makefiles: fix bare builds under newer compilers · 35d1e583
      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's avatarAlessandro Rubini <rubini@gnudd.com>
      35d1e583
  3. 14 Mar, 2013 1 commit
    • Alessandro Rubini's avatar
      arch-bare-* and lib-bare: network functions now dump if level is 2 · a433089e
      Alessandro Rubini authored
      Like what I did in two commits ago, now if debug level for "frames" is
      2 or more, net_ops->send and net_ops->recv now dump the data to
      stdout. The format is the same of tools/ptpdump, but the time is
      not showing the local time, as we miss localtime() and I don't want
      to waste time recoding it.
      
      This is an example of a bare-i386 slave requesting its master:
      
        send: TIME: (1363278286 - 0x5141f9ce) 1363278286.52969000
        send: ETH: 88f7 (00:25:11:86:1f:d2 -> 01:1b:19:00:00:00)
        send: VERSION: 2 (type 1, len 44, domain 0)
        send: FLAGS: 0x0002 (correction 0x00000000)
        send: PORT: 00-25-11-ff-fe-86-1f-d2-00-01
        send: REST: seq 2, ctrl 1, log-interval 127
        send: MESSAGE: (E) DELAY_REQ
        send: MSG-DELAY_REQ: 1363278286.052689000
        send: DUMP: payload (size 44)
        send: DUMP: 81 02 00 2c  00 00 02 00  00 00 00 00  00 00 00 00
        send: DUMP: 00 00 00 00  00 25 11 ff  fe 86 1f d2  00 01 00 02
        send: DUMP: 01 7f 00 00  51 41 f9 ce  03 23 f8 68
        diag-frames-1-eth0: SENT 44 bytes at 1363278286.052969000 (delay_req)
      
      This is a bare-i386 master receiving the same frame:
      
        recv: TIME: (1363278286 - 0x5141f9ce) 1363278286.92899000
        recv: ETH: 88f7 (00:25:11:86:1f:d2 -> 01:1b:19:00:00:00)
        recv: VERSION: 2 (type 1, len 44, domain 0)
        recv: FLAGS: 0x0002 (correction 0x00000000)
        recv: PORT: 00-25-11-ff-fe-86-1f-d2-00-01
        recv: REST: seq 2, ctrl 1, log-interval 127
        recv: MESSAGE: (E) DELAY_REQ
        recv: MSG-DELAY_REQ: 1363278286.052689000
        recv: TLV: too short (46 - 44 = 2)
        recv: DUMP: payload (size 46)
        recv: DUMP: 81 02 00 2c  00 00 02 00  00 00 00 00  00 00 00 00
        recv: DUMP: 00 00 00 00  00 25 11 ff  fe 86 1f d2  00 01 00 02
        recv: DUMP: 01 7f 00 00  51 41 f9 ce  03 23 f8 68  00 00
        diag-frames-1-eth0: RECV 46 bytes at 1363278286.092899000 (type 1)
      
      And this is tools/ptprump running on the master, for the same frame:
      
        TIME: (1363278286 - 0x5141f9ce) 17:24:46.092814
        ETH: 88f7 (00:25:11:86:1f:d2 -> 01:1b:19:00:00:00)
        VERSION: 2 (type 1, len 44, domain 0)
        FLAGS: 0x0002 (correction 0x00000000)
        PORT: 00-25-11-ff-fe-86-1f-d2-00-01
        REST: seq 2, ctrl 1, log-interval 127
        MESSAGE: (E) DELAY_REQ
        MSG-DELAY_REQ: 1363278286.052689000
        TLV: too short (46 - 44 = 2)
        DUMP: payload (size 46)
        DUMP: 81 02 00 2c  00 00 02 00  00 00 00 00  00 00 00 00
        DUMP: 00 00 00 00  00 25 11 ff  fe 86 1f d2  00 01 00 02
        DUMP: 01 7f 00 00  51 41 f9 ce  03 23 f8 68  00 00
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      a433089e
  4. 07 Mar, 2013 2 commits
  5. 04 Mar, 2013 3 commits
    • Alessandro Rubini's avatar
      general: time operations are now per-instance · 7837d938
      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's avatarAlessandro Rubini <rubini@gnudd.com>
      7837d938
    • Alessandro Rubini's avatar
      arch-bare-*: unify common code · 4220b51a
      Alessandro Rubini authored
      This unifies all bare-linux common code. It's an out-of-context commit
      (as I'm not adding bare-arm today) but I prefer to avoid doing the same
      change twice in things that are going to change these days.
      
      BTW: this commit introduces no changes in the binary files generated,
      with the exception of a small difference between i386 and x86-64 in
      the receive buffer.  This keeps the x86-64 version but i386 was not
      working anyways (and still doesn't work).  That bug fix is in my queue,
      but I've other things to do first with ppsi.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      4220b51a
    • Alessandro Rubini's avatar
      diag: avoid needless get_time reports · 57ef61c3
      Alessandro Rubini authored
      pp_timed_printf is a great resource, but we need to temporarily
      silence diagnostic printing in  time_ops.get, in order to be able to
      tell stamping-related calls to just printf-related ones.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      57ef61c3
  6. 02 Mar, 2013 5 commits
    • Alessandro Rubini's avatar
      timeout: now calc_timeout() is part of the time_ops · afa607df
      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's avatarAlessandro Rubini <rubini@gnudd.com>
      afa607df
    • Alessandro Rubini's avatar
      general: fix sent_seq_id in ppi structure · 493dee1e
      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's avatarAlessandro Rubini <rubini@gnudd.com>
      493dee1e
    • Alessandro Rubini's avatar
      kill timer: implement timeout · 4b07d444
      Alessandro Rubini authored
      The timer implementatin was incredibly complex.  Now there is no such
      thing as a timer in ptp. We only have timeouts.
      
      A timeout is a point in time. We calculate; we can be earlier; we
      can be later. The only thing which is arch-specific is calculating.
      
      This replaces every "timer" operation with the equivalent "timeout"
      one. All stuff is renamed to avoid confusion between "time" and
      "timer".
      
      Unfortunately, the resulting program as of this commit is not working.
      the pdelay_request timeout happens continuously, I'm sure I've exposed
      a latent bug, which I'm now going to fix.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      4b07d444
    • Alessandro Rubini's avatar
      b9de5693
    • Alessandro Rubini's avatar
      bugfix: arch-bare-*: wrong structures · a85a1a92
      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's avatarAlessandro Rubini <rubini@gnudd.com>
      a85a1a92
  7. 28 Feb, 2013 5 commits
  8. 27 Feb, 2013 6 commits
  9. 24 Feb, 2013 3 commits
  10. 11 Feb, 2013 1 commit
  11. 10 Feb, 2013 1 commit