1. 05 10月, 2019 3 次提交
  2. 26 7月, 2019 1 次提交
  3. 19 6月, 2019 9 次提交
  4. 13 6月, 2019 1 次提交
  5. 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
  6. 25 5月, 2019 1 次提交
  7. 24 4月, 2019 1 次提交
  8. 22 4月, 2019 4 次提交
  9. 16 4月, 2019 2 次提交
  10. 11 4月, 2019 1 次提交
  11. 09 4月, 2019 2 次提交
  12. 30 3月, 2019 3 次提交
  13. 13 2月, 2019 1 次提交
  14. 09 2月, 2019 1 次提交
    • G
      mlxsw: spectrum_router: Use struct_size() in kzalloc() · 9e475293
      Gustavo A. R. Silva 提交于
      One of the more common cases of allocation size calculations is finding
      the size of a structure that has a zero-sized array at the end, along
      with memory for some number of elements for that array. For example:
      
      struct foo {
          int stuff;
          struct boo entry[];
      };
      
      size = sizeof(struct foo) + count * sizeof(struct boo);
      instance = kzalloc(size, GFP_KERNEL)
      
      Instead of leaving these open-coded and prone to type mistakes, we can
      now use the new struct_size() helper:
      
      instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL)
      
      Notice that, in this case, variable alloc_size is not necessary, hence
      it is removed.
      
      This code was detected with the help of Coccinelle.
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9e475293
  15. 07 2月, 2019 1 次提交
  16. 24 1月, 2019 1 次提交
  17. 21 1月, 2019 6 次提交