1. 27 12月, 2019 1 次提交
  2. 25 12月, 2019 2 次提交
  3. 17 12月, 2019 2 次提交
  4. 10 12月, 2019 1 次提交
  5. 25 11月, 2019 2 次提交
  6. 19 11月, 2019 1 次提交
    • P
      mlxsw: spectrum_router: Fix determining underlay for a GRE tunnel · 1fc16577
      Petr Machata 提交于
      The helper mlxsw_sp_ipip_dev_ul_tb_id() determines the underlay VRF of a
      GRE tunnel. For a tunnel without a bound device, it uses the same VRF that
      the tunnel is in. However in Linux, a GRE tunnel without a bound device
      uses the main VRF as the underlay. Fix the function accordingly.
      
      mlxsw further assumed that moving a tunnel to a different VRF could cause
      conflict in local tunnel endpoint address, which cannot be offloaded.
      However, the only way that an underlay could be changed by moving the
      tunnel device itself is if the tunnel device does not have a bound device.
      But in that case the underlay is always the main VRF, so there is no
      opportunity to introduce a conflict by moving such device. Thus this check
      constitutes a dead code, and can be removed, which do.
      
      Fixes: 6ddb7426 ("mlxsw: spectrum_router: Introduce loopback RIFs")
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1fc16577
  7. 16 11月, 2019 1 次提交
    • I
      mlxsw: spectrum_router: Allocate discard adjacency entry when needed · 983db619
      Ido Schimmel 提交于
      Commit 0c3cbbf9 ("mlxsw: Add specific trap for packets routed via
      invalid nexthops") allocated an adjacency entry during driver
      initialization whose purpose is to discard packets hitting the route
      pointing to it.
      
      These adjacency entries are allocated from a resource called KVD linear
      (KVDL). There are situations in which the user can decide to set the
      size of this resource (via devlink-resource) to 0, in which case the
      driver will not be able to load.
      
      Therefore, instead of pre-allocating this adjacency entry, simply
      allocate it only when needed. A variable indicating the validity of the
      entry is added and is used to ensure it is only allocated and written
      once and that it is freed after all the routes were flushed.
      
      Fixes: 0c3cbbf9 ("mlxsw: Add specific trap for packets routed via invalid nexthops")
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      983db619
  8. 08 11月, 2019 2 次提交
    • A
      mlxsw: Add specific trap for packets routed via invalid nexthops · 0c3cbbf9
      Amit Cohen 提交于
      Currently, mlxsw does not differentiate between these two cases of
      routes with invalid nexthops:
      
      1. Nexthops whose nexthop device is a mlxsw upper (has a RIF), but whose
      neighbour could not be resolved
      
      2. Nexthops whose nexthop device is not a mlxsw upper (e.g., management
      interface)
      
      Up until now this did not matter and mlxsw trapped packets for both
      cases using the same trap ID. However, packets that should have been
      routed in hardware (case 1), but incurred a problem are considered
      exceptions and should be reported to the user. The two cases should
      therefore be split between two different trap IDs.
      
      Allocate a new adjacency entry during initialization and upon the
      insertion of the first route with an invalid mlxsw nexthop, program this
      entry to discard packets. Packets hitting this entry will be reported
      using new trap ID - "DISCARD_ROUTER3".
      
      In the future, the entry could be written during initialization, but
      currently firmware requires a valid RIF, which is not available at this
      stage.
      Signed-off-by: NAmit Cohen <amitc@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c3cbbf9
    • A
      mlxsw: Add new FIB entry type for reject routes · 21151f64
      Amit Cohen 提交于
      Currently, packets that cannot be routed in hardware (e.g., nexthop
      device is not upper of mlxsw), are trapped to the kernel for forwarding.
      Such packets are trapped using "RTR_INGRESS0" trap. This trap also traps
      packets that hit reject routes (e.g., "unreachable") so that the kernel
      will generate the appropriate ICMP error message for them.
      
      Subsequent patch will need to only report to devlink packets that hit a
      reject route, which is impossible as long as "RTR_INGRESS0" is
      overloaded like that.
      
      Solve this by using "RTR_INGRESS1" trap for packets that hit reject
      routes.
      Signed-off-by: NAmit Cohen <amitc@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      21151f64
  9. 05 10月, 2019 5 次提交
  10. 26 7月, 2019 1 次提交
  11. 19 6月, 2019 9 次提交
  12. 13 6月, 2019 1 次提交
  13. 05 6月, 2019 2 次提交
    • D
      mlxsw: Fail attempts to use routes with nexthop objects · 54250805
      David Ahern 提交于
      Fail attempts to use nexthop objects with routes until support can be
      properly added.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Reviewed-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      54250805
    • D
      ipv4: Use accessors for fib_info nexthop data · 5481d73f
      David Ahern 提交于
      Use helpers to access fib_nh and fib_nhs fields of a fib_info. Drop the
      fib_dev macro which is an alias for the first nexthop. Replacements:
      
        fi->fib_dev    --> fib_info_nh(fi, 0)->fib_nh_dev
        fi->fib_nh     --> fib_info_nh(fi, 0)
        fi->fib_nh[i]  --> fib_info_nh(fi, i)
        fi->fib_nhs    --> fib_info_num_path(fi)
      
      where fib_info_nh(fi, i) returns fi->fib_nh[nhsel] and fib_info_num_path
      returns fi->fib_nhs.
      
      Move the existing fib_info_nhc to nexthop.h and define the new ones
      there. A later patch adds a check if a fib_info uses a nexthop object,
      and defining the helpers in nexthop.h avoid circular header
      dependencies.
      
      After this all remaining open coded references to fi->fib_nhs and
      fi->fib_nh are in:
      - fib_create_info and helpers used to lookup an existing fib_info
        entry, and
      - the netdev event functions fib_sync_down_dev and fib_sync_up.
      
      The latter two will not be reused for nexthops, and the fib_create_info
      will be updated to handle a nexthop in a fib_info.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5481d73f
  14. 25 5月, 2019 1 次提交
  15. 24 4月, 2019 1 次提交
  16. 22 4月, 2019 4 次提交
  17. 16 4月, 2019 2 次提交
  18. 11 4月, 2019 1 次提交
  19. 09 4月, 2019 1 次提交