1. 03 5月, 2018 2 次提交
  2. 20 4月, 2018 1 次提交
  3. 18 4月, 2018 2 次提交
  4. 27 3月, 2018 5 次提交
  5. 24 3月, 2018 2 次提交
  6. 12 3月, 2018 1 次提交
  7. 05 3月, 2018 2 次提交
  8. 28 2月, 2018 1 次提交
  9. 20 2月, 2018 1 次提交
  10. 14 2月, 2018 3 次提交
  11. 24 1月, 2018 1 次提交
  12. 22 1月, 2018 3 次提交
  13. 19 1月, 2018 1 次提交
  14. 15 1月, 2018 2 次提交
  15. 03 1月, 2018 1 次提交
  16. 20 12月, 2017 1 次提交
  17. 28 11月, 2017 4 次提交
  18. 14 11月, 2017 1 次提交
  19. 04 11月, 2017 6 次提交
    • P
      mlxsw: spectrum_router: Handle down of tunnel underlay · 44b0fff1
      Petr Machata 提交于
      When the bound device of a tunnel device is down, encapsulated packets
      are not egressed anymore, but tunnel decap still works. Extend
      mlxsw_sp_nexthop_rif_update() to take IFF_UP into consideration when
      deciding whether a given next hop should be offloaded.
      
      Because the new logic was added to mlxsw_sp_nexthop_rif_update(), this
      fixes the case where a newly-added tunnel has a down bound device, which
      would previously be fully offloaded. Now the down state of the bound
      device is noted and next hops forwarding to such tunnel are not
      offloaded.
      
      In addition to that, notice NETDEV_UP and NETDEV_DOWN of a bound device
      to force refresh of tunnel encap route offloads.
      Signed-off-by: NPetr Machata <petrm@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>
      44b0fff1
    • P
      mlxsw: spectrum: Handle NETDEV_CHANGE on L3 tunnels · 4cf04f3f
      Petr Machata 提交于
      Changes to L3 tunnel netdevices (through `ip tunnel change' as well as
      `ip link set') lead to NETDEV_CHANGE being generated on the tunnel
      device. Because what is relevant for the tunnel in question depends on
      the tunnel type, handling of the event is dispatched to the IPIP module
      through a newly-added interface mlxsw_sp_ipip_ops.ol_netdev_change().
      
      IPIP tunnels now remember the last set of tunnel parameters in struct
      mlxsw_sp_ipip_entry.parms, and use it to figure out what exactly has
      changed.
      Signed-off-by: NPetr Machata <petrm@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>
      4cf04f3f
    • P
      mlxsw: spectrum: Support IPIP underlay VRF migration · 61481f2f
      Petr Machata 提交于
      When a bound device of a tunnel netdevice changes VRF, the loopback RIF
      that backs the tunnel needs to be updated and existing encapsulating
      routes need to be refreshed.
      
      Note that several tunnels can share the same bound device, in which case
      all the impacted tunnels need to be updated.
      Signed-off-by: NPetr Machata <petrm@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>
      61481f2f
    • P
      mlxsw: spectrum_router: Onload conflicting tunnels · af641713
      Petr Machata 提交于
      The approach for offloading IP tunnels implemented currently by mlxsw
      doesn't allow two tunnels that have the same local IP address in the
      same (underlay) VRF. Previously, offloads were introduced on demand as
      encap routes were formed. When such a route was created that would cause
      offload of a conflicting tunnel, mlxsw_sp_ipip_entry_create() would
      detect it and return -EEXIST, which would propagate up and cause FIB
      abort.
      
      Now however IPIP entries are created as soon as an offloadable netdevice
      is created, and the failure prevents creation of such device.
      Furthermore, if the driver is installed at the point where such
      conflicting tunnels exist, the failure actually prevents successful
      modprobe.
      
      Furthermore, follow-up patches implement handling of NETDEV_CHANGE due
      to the local address change. However, NETDEV_CHANGE can't be vetoed. The
      failure merely means that the offloads weren't updated, but the change
      in Linux configuration is not rolled back. It is thus desirable to have
      a robust way of handling these conflicts, which can later be reused for
      handling NETDEV_CHANGE as well.
      
      To fix this, when a conflicting tunnel is created, instead of failing,
      simply pull the old tunnel to slow path and reject offloading the
      new one.
      
      Introduce two functions: mlxsw_sp_ipip_entry_demote_tunnel() and
      mlxsw_sp_ipip_demote_tunnel_by_saddr() to handle this. Make them both
      public, because they will be useful later on in this patchset.
      Signed-off-by: NPetr Machata <petrm@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>
      af641713
    • P
      mlxsw: spectrum_router: Fix saddr deduction in mlxsw_sp_ipip_entry_create() · 4526cc8a
      Petr Machata 提交于
      When trying to determine whether there are other offloaded tunnels with
      the same local address, mlxsw_sp_ipip_entry_create() should look for a
      tunnel with matching UL protocol, matching saddr, in the same VRF.
      However instead of taking into account the UL protocol of the tunnel
      netdevice (which mlxsw_sp_ipip_entry_saddr_matches() then compares to
      the UL protocol of inspected IPIP entry), it deduces the UL protocol
      from the inspected IPIP entry (and that's compared to itself).
      
      This is currently immaterial, because only one tunnel type is offloaded,
      and therefore the UL protocol always matches, but introducing support
      for a tunnel with IPv6 underlay would uncover this error.
      Signed-off-by: NPetr Machata <petrm@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>
      4526cc8a
    • P
      mlxsw: spectrum_router: Generalize __mlxsw_sp_ipip_entry_update_tunnel() · 0c5f1cd5
      Petr Machata 提交于
      The work that needs to be done to update HW configuration in response to
      changes is similar to what __mlxsw_sp_ipip_entry_update_tunnel() already
      does, but with a number of twists: each change requires a different
      subset of things to happen. Extend the function to support all these
      uses, and allow finely-grained configuration of what should happen at
      each call through a suite of function arguments.
      
      Publish the updated function to allow use from the spectrum_ipip module.
      Signed-off-by: NPetr Machata <petrm@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>
      0c5f1cd5