1. 04 11月, 2017 5 次提交
  2. 03 11月, 2017 4 次提交
  3. 01 11月, 2017 1 次提交
    • D
      mlxsw: spectrum_router: Return extack message on abort due to fib rules · 1f279233
      David Ahern 提交于
      Adding a FIB rule on a spectrum platform silently aborts FIB offload:
          $ ip ru add pref 99 from all to 192.168.1.1 table 10
          $ dmesg -c
          [  623.144736] mlxsw_spectrum 0000:03:00.0: FIB abort triggered. Note that FIB entries are no longer being offloaded to this device.
      
      This patch reworks FIB rule handling to return a message to the user:
          $ ip ru add pref 99 from all to 8.8.8.8 table 11
          Error: spectrum: FIB rules not supported. Aborting offload.
      
      spectrum currently only checks whether the fib rule is a default rule or
      an l3mdev rule, both of which it knows how to handle. Any other it aborts
      FIB offload. Move the processing to check the rule type inline with the
      user request. If the rule is an unsupported one, then a work queue entry
      is used to abort the offload. Change the rule delete handling to just
      return since it does nothing at the moment.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Reviewed-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f279233
  4. 23 10月, 2017 4 次提交
    • I
      mlxsw: spectrum_router: Populate adjacency entries according to weights · eb789980
      Ido Schimmel 提交于
      Up until now the driver assumed all the nexthops have an equal weight
      and wrote each to a single adjacency entry.
      
      This patch takes the `weight` parameter into account and populates the
      adjacency group according to the relative weight of each nexthop.
      
      Specifically, the weights of all the nexthops that should be offloaded
      are first normalized and then used to calculate the upper adjacency
      index of each nexthop. This is done according to the hash-threshold
      algorithm used by the kernel for IPv4 multi-path routing.
      
      Adjacency groups are currently limited to 32 entries which limits the
      weights that can be used, but follow-up patches will introduce groups of
      512 entries.
      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>
      eb789980
    • I
      mlxsw: spectrum_router: Prepare for large adjacency groups · 425a08c6
      Ido Schimmel 提交于
      The device has certain restrictions regarding the size of an adjacency
      group.
      
      Have the router determine the size of the adjacency group according to
      available KVDL allocation sizes and these restrictions.
      
      This was not needed until now since only allocations of up 32 entries
      were supported and these are all valid sizes for an adjacency group.
      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>
      425a08c6
    • I
      mlxsw: spectrum_router: Store weight in nexthop struct · 408bd946
      Ido Schimmel 提交于
      As the first step towards non-equal-cost multi-path support, store each
      nexthop's weight.
      
      For IPv6 nexthops always set the weight to 1, as it only supports ECMP.
      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>
      408bd946
    • I
      mlxsw: spectrum_dpipe: Add adjacency group size · e69cd9d7
      Ido Schimmel 提交于
      The adjacency group size is part of the match on the adjacency group and
      should therefore be exposed using dpipe.
      
      When non-equal-cost multi-path support will be introduced, the group's
      size will help users understand the exact number of adjacency entries
      each nexthop occupies, as a nexthop will no longer correspond to a
      single entry.
      
      The output for a multi-path route with two nexthops, one with weight 255
      and the second 1 will be:
      
      Example:
      
      $ devlink dpipe table dump pci/0000:01:00.0 name mlxsw_adj
      pci/0000:01:00.0:
        index 0
        match_value:
          type field_exact header mlxsw_meta field adj_index value 65536
          type field_exact header mlxsw_meta field adj_size value 512
          type field_exact header mlxsw_meta field adj_hash_index value 0
        action_value:
          type field_modify header ethernet field destination mac value e4:1d:2d:a5:f3:64
          type field_modify header mlxsw_meta field erif_port mapping ifindex mapping_value 3 value 1
      
        index 1
        match_value:
          type field_exact header mlxsw_meta field adj_index value 65536
          type field_exact header mlxsw_meta field adj_size value 512
          type field_exact header mlxsw_meta field adj_hash_index value 510
        action_value:
          type field_modify header ethernet field destination mac value e4:1d:2d:a5:f3:65
          type field_modify header mlxsw_meta field erif_port mapping ifindex mapping_value 4 value 2
      
      Thus, the first nexthop occupies 510 adjacency entries and the second 2,
      which leads to a ratio of 255 to 1.
      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>
      e69cd9d7
  5. 22 10月, 2017 1 次提交
  6. 21 10月, 2017 1 次提交
  7. 20 10月, 2017 2 次提交
  8. 17 10月, 2017 4 次提交
  9. 10 10月, 2017 1 次提交
  10. 09 10月, 2017 1 次提交
  11. 03 10月, 2017 4 次提交
  12. 28 9月, 2017 4 次提交
  13. 27 9月, 2017 5 次提交
  14. 20 9月, 2017 1 次提交
  15. 17 9月, 2017 1 次提交
  16. 04 9月, 2017 1 次提交