1. 25 May, 2017 3 commits
  2. 24 May, 2017 20 commits
  3. 23 May, 2017 10 commits
  4. 22 May, 2017 7 commits
    • Kees Cook's avatar
      efi-pstore: Fix write/erase id tracking · c10e8031
      Kees Cook authored
      Prior to the pstore interface refactoring, the "id" generated during
      a backend pstore_write() was only retained by the internal pstore
      inode tracking list. Additionally the "part" was ignored, so EFI
      would encode this in the id. This corrects the misunderstandings
      and correctly sets "id" during pstore_write(), and uses "part"
      directly during pstore_erase().
      Reported-by: default avatarMarta Lofstedt <marta.lofstedt@intel.com>
      Fixes: 76cc9580 ("pstore: Replace arguments for write() API")
      Fixes: a61072aa ("pstore: Replace arguments for erase() API")
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Tested-by: default avatarMarta Lofstedt <marta.lofstedt@intel.com>
      c10e8031
    • David S. Miller's avatar
      Merge branch 'dsa-distribute-switch-events' · 1db3a610
      David S. Miller authored
      Vivien Didelot says:
      
      ====================
      net: dsa: distribute switch events
      
      DSA is by nature the support for a switch fabric, which can be composed
      of a single, or multiple interconnected Ethernet switch chips.
      
      The current DSA core behavior is to identify the slave port targeted by
      a request (e.g. adding a VLAN entry), and program the switch chip to
      which it belongs accordingly.
      
      This is problematic in a multi-chip environment, since all chips of a
      fabric must be aware of most configuration changes. Here are some
      concrete examples in a 3-chip environment:
      
               [CPU].................... (mdio)
          (eth0) |   :       :          :
                _|_____    _______    _______
               [__sw0__]--[__sw1__]--[__sw2__]
                |  |  |    |  |  |    |  |  |
                v  v  v    v  v  v    v  v  v
                p1 p2 p3   p4 p5 p6   p7 p8 p9
      
      If you add a VLAN entry on p7, sw2 gets programmed, but frames won't
      reach the CPU interface in a VLAN filtered setup. sw0 and sw1 also need
      to be programmed. The same problem comes with MAC addresses (FDB, MDB),
      or ageing time changes for instance.
      
      This patch series uses the notification chain introduced for bridging,
      to notify not only bridge, but switchdev attributes and objects events
      to all switch chips of the fabric.
      
      An ugly debug message printing the ignored event and switch info in the
      code handling the switch VLAN events would give us:
      
          # bridge vlan add dev p7 vid 42
          sw0: ignoring DSA_NOTIFIER_VLAN_ADD for sw2 (prepare phase)
          sw1: ignoring DSA_NOTIFIER_VLAN_ADD for sw2 (prepare phase)
          sw0: ignoring DSA_NOTIFIER_VLAN_ADD for sw2 (commit phase)
          sw1: ignoring DSA_NOTIFIER_VLAN_ADD for sw2 (commit phase)
      
      To achieve that, patches 1-8 change the scope of the bridge and
      switchdev callbacks from the DSA slave device to the generic DSA port,
      so that the port-wide API can be used later for switch ports not exposed
      to userspace, such as CPU and DSA links.
      
      Patches 9-15 move the DSA port specific functions in a new port.c file.
      
      Patches 16-20 introduce new events to notify the fabric about switchdev
      attributes and objects manipulation.
      
      This patch series only adds the plumbing to support a distributed
      configuration, but for the moment, each switch chip ignores events from
      other chips of the fabric, to keep the current behavior.
      
      The next patch series will add support for cross-chip configuration of
      bridge ageing time, VLAN and MAC address databases operations, etc.
      ====================
      Tested-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1db3a610
    • Vivien Didelot's avatar
      net: dsa: add VLAN notifier · d0c627b8
      Vivien Didelot authored
      Add two new DSA_NOTIFIER_VLAN_ADD and DSA_NOTIFIER_VLAN_DEL events to
      notify not only a single switch, but all switches of a the fabric when
      an VLAN entry is added or removed.
      
      For the moment, keep the current behavior and ignore other switches.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d0c627b8
    • Vivien Didelot's avatar
      net: dsa: add MDB notifier · 8ae5bcdc
      Vivien Didelot authored
      Add two new DSA_NOTIFIER_MDB_ADD and DSA_NOTIFIER_MDB_DEL events to
      notify not only a single switch, but all switches of a the fabric when
      an MDB entry is added or removed.
      
      For the moment, keep the current behavior and ignore other switches.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8ae5bcdc
    • Vivien Didelot's avatar
      net: dsa: add FDB notifier · 685fb6a4
      Vivien Didelot authored
      Add two new DSA_NOTIFIER_FDB_ADD and DSA_NOTIFIER_FDB_DEL events to
      notify not only a single switch, but all switches of a the fabric when
      an FDB entry is added or removed.
      
      For the moment, keep the current behavior and ignore other switches.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      685fb6a4
    • Vivien Didelot's avatar
      net: dsa: add notifier for ageing time · 1faabf74
      Vivien Didelot authored
      This patch keeps the port-wide ageing time handling code in
      dsa_port_ageing_time, pushes the requested ageing time value in a new
      switch fabric notification, and moves the switch-wide ageing time
      handling code in dsa_switch_ageing_time.
      
      This has the effect that now not only the switch that the target port
      belongs to can be programmed, but all switches composing the switch
      fabric. For the moment, keep the current behavior and ignore other
      switches.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1faabf74
    • Vivien Didelot's avatar
      net: dsa: move notifier info to private header · 52c96f9d
      Vivien Didelot authored
      The DSA notifier events and info structure definitions are not meant for
      DSA drivers and users, but only used internally by the DSA core files.
      
      Move them from the public net/dsa.h file to the private dsa_priv.h file.
      
      Also use this opportunity to turn the events into an anonymous enum,
      because we don't care about the values, and this will prevent future
      conflicts when adding (and sorting) new events.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      52c96f9d