1. 23 Feb, 2017 2 commits
  2. 16 Feb, 2017 2 commits
  3. 26 Jan, 2017 1 commit
  4. 03 Nov, 2016 1 commit
  5. 01 Nov, 2016 3 commits
  6. 27 Oct, 2016 1 commit
  7. 04 Aug, 2016 1 commit
  8. 03 Aug, 2016 3 commits
  9. 10 Jun, 2016 10 commits
  10. 18 May, 2016 1 commit
    • Alessandro Rubini's avatar
      network: prepare for network latency tests · c0a76804
      Alessandro Rubini authored
      This commit adds the Kconfig mechanism and the pfilter rules.
      
      The latency test socket transmists frames of a specific ether type;
      the receiver must receive all such frames.  To minimize the load on the
      packet filter, this adds a single rule: we already accept all PTPv2
      frames, so we now "OR" to this the new ethernet type.   If the feature
      is configured off, the rule uses the same PTPv2 ethertye, thus
      turning in practice into a NOP.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      c0a76804
  11. 04 Apr, 2016 13 commits
    • Alessandro Rubini's avatar
      general: use an ELF section for tasks · d9d20c8b
      Alessandro Rubini authored
      This allows several functions to be static in the files where they
      are defined. See temperature.c for an example.
      
      But mainly, the idea is allowing ease addition of features (likely
      Kconfig'd ones) for specific WR users, without any modification to the
      main function and other generic code.  This will happen soon for snmp,
      for example.
      
      We may push this a little further, by moving all shell stuff into
      shell.c, the ptp task within ppsi itself, and so on. But now my time
      is over.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      d9d20c8b
    • Alessandro Rubini's avatar
      dev.mk: bugfix host build · 427b1b37
      Alessandro Rubini authored
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      427b1b37
    • Alessandro Rubini's avatar
      d232aff8
    • Alessandro Rubini's avatar
      Support for host builds. · cf33ae1d
      Alessandro Rubini authored
      This commit is not breaking the current status, but adds the
      ability to build on the host, to simulate and (mainly) to help
      me hack the networking code in a simpler/faster environment.
      
      Missing features:
      	- ptp
      	- build in i386 (currently x86-64 is hardwired)
      
      Also, this commit requires a change in ppsi, that I'm not going to
      commit now: we must get rid of the main function (most of that
      stuff is done win wrc_ptp.c, which we must replicate  in a unix-compatible
      way).
      
      This is the ppsi change
      
         --- a/arch-unix/Makefile
         +++ b/arch-unix/Makefile
         @@ -4,7 +4,7 @@ A := arch-$(ARCH)
      
          CFLAGS += -Itools
      
         -OBJ-y += $A/unix-startup.o \
         +OBJ-y += \
                 $A/main-loop.o \
                 $A/unix-io.o \
                 $A/unix-conf.o \
      
      Local changes in this commit:
            - adding CONFIG_HOST_PROCESS and the auto-generated opposites:
            CONFIG_LM32 and CONFIG_EMBEDDED_NODE (LM32 && NODE)
      
            - make some config option depend on !HOST_PROCESS
      
            - Makefile: some dependencies on HOST_PROCESS and the opposite
      
            - */*.mk: some dev and shell objects depend on
            CONFIG_EMBEDDED_NODE instead of CONFIG_WR_NODE (i.e.: both a
            node and an lm32)
      
            - new host/ subdir where some placeholders are placed
      
            - no sdb support on the host
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      cf33ae1d
    • Alessandro Rubini's avatar
      Preliminary changes to introduce host build (no effect) · de40542e
      Alessandro Rubini authored
      These changes have no effect at this point, but are the initial steps
      introducing host builds. Some changes are minor cleanups, some depend
      on CONFIG_HOST_PROCESS which is not defined at this point.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      de40542e
    • Alessandro Rubini's avatar
      temperature: add a fake temperature-set to show how to use it · c58702a0
      Alessandro Rubini authored
      We have three temperatures, called "roof", "core", "case"
      (yess rubi like word same lengt, s/he most love four).
      
      There is a "faketemp" command that can set one two or all of them.
      This allows to test negative temperatures in printouts (White Rabbit
      in Siberia does it, but we southish can't test easily).
      
      All temperatures are initialized to invalid. Example:
      
         wrc# faketemp -10 -2.5
         wrc# faketemp
         fff60000 fffd8003 80000000
         wrc# temp
         pcb:84.7500 roof:-10.0000 core:-2.4999 case:INVALID
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      c58702a0
    • Alessandro Rubini's avatar
      temperature: make the framework modular · a661eeed
      Alessandro Rubini authored
      This costs anoter 220 bytes in the binary, becuase we now loop among
      all temperature providers in order to return data to the caller.
      
      The providers are clustered using an ELF section.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      a661eeed
    • Alessandro Rubini's avatar
      temperature: add a temperature framework · e2e7d59a
      Alessandro Rubini authored
      This commit adds data structures, methods and a process to manage
      temperature.  Currently the only temperature being read is the onewire
      thermometer, so there is no difference with what we had before.
      The cost is 1.1 kB in binary size.
      
      Well, there is a difference: only the stat engine was reading
      temperature, while now the thermometer is read continuously (every 15
      seconds, or another Kconfig-urable interval).  This takes quite some
      CPU time (18.5ms per polling loop, but allows any user to read
      temperature (using the API we now provide) without re-reading the
      onewire bus.
      
      The real aim of this is monitoring a board-specific set of sensors,
      as implemented and show in the next commit.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      e2e7d59a
    • Alessandro Rubini's avatar
      add pfilter_verbose, selected by Kconfig (developer mode) · dd612fb9
      Alessandro Rubini authored
      Also, this changes how to mac address is retrieved in patching pfilter
      rules. I'd better use format_mac(get_mac) for the verbose message,
      so get_mac is also the source for patching the rules.
      
      register and get_mac/set_mac are guaranteed to be in-sync.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      dd612fb9
    • Alessandro Rubini's avatar
      vlan: add "vlan off" command, switch pfilter rule-set at runtime · d4c72f47
      Alessandro Rubini authored
      This allows a node built with CONFIG_VLAN to choose at run-time
      whether vlans are allowed or not.  We build both pfilter rule-sets,
      and according to the active vlan number we write one or the other.
      
      The case "CONFIG_VLAN is not set" is handled by providing default
      NULL pointers for beginning and end of the vlan rule-set.
      
      As a side effect, I renamed the files and the functions in
      the pfilter-builder.
      
      This is how it works for me, with CONFIG_PFILTER_VERBOSE set,
      so you see different rule-set  are used (29 rules vs. 16 rules):
      
          wrc# vlan set 0
          0 ("0") out of range
          Command "vlan": error -22
          wrc# vlan off
          fixing MAC adress in rule: use 22:33:44:55:66:77
          pfilter rule 00: 4.00000000
          pfilter rule 01: 1.e4466013
          [...]
          pfilter rule 28: 8.00000000
          current vlan: 0 (0x0)
          wrc# ip set 10.0.0.2
          IP-address: 10.0.0.2 (static assignment)
      
        (and I am now reachable by untagged frames)
      
          wrc# vlan set 10
          fixing MAC adress in rule: use 22:33:44:55:66:77
          fixing VLAN number in rule: use 10
          pfilter rule 00: 4.00000000
          pfilter rule 01: 1.e4466013
          [...]
          pfilter rule 15: 8.00000000
          current vlan: 10 (0xa)
      
        (and I am now reachable on vlan 10)
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      
      Conflicts:
      	Makefile
      d4c72f47
    • Alessandro Rubini's avatar
    • Alessandro Rubini's avatar
      vlan: add one VLAN in Kconfig as an option · a444be3e
      Alessandro Rubini authored
      WARNING: wr_switch_defconfig doesn't build, this is fixed in next commit
      
      Unfortunately this commit makes the internal communication between
      minic and lan asymmetric: on receive the tag is discarded (and the
      longer header falls into the payload) while on transmit it must be
      provided by lan.c.
      
      The reason is that on receive we can trim 4 bytes from the payload,
      but on send we can't add 4 bytes without a memmove.  The functions
      receive pointers to two different header structures, so hopefully
      user errors will be signalled by the compiler.
      
      Still, users interact with net.c, which hides vlan completely from
      them.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      a444be3e
    • Alessandro Rubini's avatar
      net: define wr_ethhdr and use it (no change) · 52ec2a38
      Alessandro Rubini authored
      We used to have "struct ethhdr" local in net.c, passing "void *hdr" to
      minic.  We exports the structure to an header so to use it in
      communicating with the minic.  Unfortunaltey, ethhdr is defined elsewhere
      too, so we'd better rename to wr_ethhdr.
      
      This is a step towards the introduction of vlans, but has no technical
      effect by itself.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      52ec2a38
  12. 16 Feb, 2016 1 commit
  13. 21 Jan, 2016 1 commit