1. 31 10月, 2016 1 次提交
  2. 24 10月, 2016 1 次提交
  3. 28 9月, 2016 1 次提交
  4. 21 9月, 2016 4 次提交
  5. 19 9月, 2016 1 次提交
  6. 14 9月, 2016 1 次提交
  7. 02 9月, 2016 1 次提交
  8. 25 8月, 2016 1 次提交
  9. 18 8月, 2016 1 次提交
  10. 25 7月, 2016 1 次提交
    • Y
      mlxsw: spectrum: Add support in matchall mirror TC offloading · 763b4b70
      Yotam Gigi 提交于
      This patch offloads port mirroring directives to hw using the matchall TC
      with action mirror. It includes both the implementation of the
      ndo_setup_tc function for the spectrum driver and the spectrum hardware
      offload configuration code.
      
      The hardware offload code is basically two new functions which are capable
      of adding and removing a new mirror ports pair. It is done using the MPAT,
      MPAR and SBIB registers:
       - A new Switch-Port Analyzer (SPAN) entry is added using MPAT to the 'to'
         port.
       - The 'to' port is bound to the SPAN entry using MPAR register.
       - In case of egress SPAN, the 'to' port gets a new internal shared
         buffer using SBIB register.
      
      In addition, a new database was added to the mlxsw_sp struct to store all
      the SPAN entries and their bound ports list. The number of supported SPAN
      entries is determined by resource query.
      Signed-off-by: NYotam Gigi <yotamg@mellanox.com>
      Reviewed-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      763b4b70
  11. 06 7月, 2016 7 次提交
  12. 05 7月, 2016 10 次提交
  13. 03 7月, 2016 3 次提交
  14. 21 6月, 2016 7 次提交
    • I
      mlxsw: spectrum: Free resources upon vPort destruction · 1c800759
      Ido Schimmel 提交于
      There are situations in which a vPort is destroyed while still holding
      references to device's resources such as FIDs and FDB records. This can
      happen, for example, when a VLAN device is deleted while still being
      bridged.
      
      Instead of trying to make sure vPort destruction is invoked when it no
      longer uses device's resources, just free them upon destruction. This
      simplifies the code, as we no longer need to take different situations
      into account when events are received - cleanup is taken care of in one
      place.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1c800759
    • I
      mlxsw: spectrum: Refactor FDB flushing logic · fe3f6d14
      Ido Schimmel 提交于
      FDB entries are learned using {Port / LAG ID, FID} and therefore should
      be flushed whenever a port (vPort) leaves its FID (vFID).
      
      However, when the bridge port is a LAG device (or a VLAN device on top),
      then FDB flushing is conditional. Ports removed from such LAG
      configurations must not trigger flushing, as other ports might still be
      members in the LAG and therefore the bridge port is still active.
      
      The decision whether to flush or not was previously computed in the
      netdevice notification block, but in order to flush the entries when a
      port leaves its FID this decision should be computed there.
      
      Strip the notification block from this logic and instead move it to one
      FDB flushing function that is invoked from both the FID / vFID leave
      functions.
      
      When port isn't member in LAG, FDB flushing should always occur.
      Otherwise, it should occur only when the last port (vPort) member in the
      LAG leaves the FID (vFID).
      
      This will allow us - in the next patch - to simplify the cleanup code
      paths that are hit whenever the topology above the port netdevs changes.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fe3f6d14
    • I
      mlxsw: spectrum: Don't count on FID being present · 56918b6b
      Ido Schimmel 提交于
      Not all vPorts will have FIDs assigned to them, so make sure functions
      first test for FID presence.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      56918b6b
    • I
      mlxsw: spectrum: Add FID get / set functions · 41b996cc
      Ido Schimmel 提交于
      As previously explained, not all vPorts will be assigned FIDs, so instead
      of returning the FID index of a vPort, return a pointer to its FID
      struct. This will allow us to know whether it's legal to access the
      vPort's FID parameters such as index and device.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      41b996cc
    • I
      mlxsw: spectrum: Check if port is vPort using its VID · 6381b3a8
      Ido Schimmel 提交于
      When L3 interfaces will be introduced a vPort won't necessarily have a
      FID assigned to it. This can happen if it's not member in a bridge (in
      which case it's assigned a vFID) or doesn't have an IP address (in which
      case it's assigned an rFID).
      
      Therefore, instead check the VID parameter to test whether a port is a
      vPort or not.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6381b3a8
    • I
      mlxsw: spectrum: Use per-FID struct for the VLAN-aware bridge · 14d39461
      Ido Schimmel 提交于
      In a very similar way to the vFIDs, make the first 4K FIDs - used in the
      VLAN-aware bridge - use the new FID struct.
      
      Upon first use of the FID by any of the ports do the following:
      
      1) Create the FID
      2) Setup a matching flooding entry
      3) Create a mapping for the FID
      
      Unlike vFIDs, upon creation of a FID we always create a global
      VID-to-FID mapping, so that ports without upper vPorts can use it
      instead of creating an explicit {Port, VID} to FID mapping.
      
      When a port leaves a FID the reverse is performed. Whenever the FID's
      reference count reaches zero the FID is deleted along with the global
      mapping.
      
      The per-FID struct will later allow us to configure L3 interfaces on top
      of the VLAN-aware bridge.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      14d39461
    • I
      mlxsw: spectrum: Make vFID struct generic · d0ec875a
      Ido Schimmel 提交于
      Up until now we had a dedicated struct only for vFIDs, but before
      introducing support for L3 interfaces we need to make it generic and
      use it for all three types of FIDs:
      
      1) FIDs - 0..4K-1, used for the VLAN-aware bridge
      2) vFIDs - 4K..15K-1, used for VLAN-unaware bridges
      3) rFIDs - 15K..16K-1, used to direct traffic to / from the router in
      the device. Will be introduced later in the series.
      
      The three types of L3 interfaces - Router InterFaces, RIFs - that will
      be introduced correspond to the three types of FIDs and are configured
      using them. Therefore, we'll need to store the links between them as
      well as a reference count on the underlying FID, so that the
      corresponding RIF will be destroyed when it reaches zero.
      
      Note that the lower 0.5K vFIDs are currently used for for non-bridged
      netdevs, so that traffic could be flooded to the CPU port. However, when
      rFIDs will be introduced we'll no longer need these and they too will be
      used for VLAN-unaware bridges.
      
      Make the vFID struct generic by renaming it and some of its fields. FIDs
      will be converted to use it later in the series.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d0ec875a