1. 11 Sep, 2019 37 commits
  2. 10 Sep, 2019 3 commits
    • Saeed Mahameed's avatar
      net/mlx5: FWTrace, Reduce stack usage · fa355bb1
      Saeed Mahameed authored
      Mark mlx5_tracer_print_trace as noinline as the function only uses 512
      bytes on the stack to avoid the following build warning:
      
      drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c:660:13: error: stack frame size of 1032 bytes in function 'mlx5_fw_tracer_handle_traces' [-Werror,-Wframe-larger-than=]
      
      Fixes: 70dd6fdb ("net/mlx5: FW tracer, parse traces and kernel tracing support")
      Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      fa355bb1
    • Nathan Chancellor's avatar
      net/mlx5: Fix addr's type in mlx5dr_icm_dm · 334a306f
      Nathan Chancellor authored
      clang errors when CONFIG_PHYS_ADDR_T_64BIT is not set:
      
      drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c:121:8:
      error: incompatible pointer types passing 'u64 *' (aka 'unsigned long
      long *') to parameter of type 'phys_addr_t *' (aka 'unsigned int *')
      [-Werror,-Wincompatible-pointer-types]
                                         &icm_mr->dm.addr, &icm_mr->dm.obj_id);
                                         ^~~~~~~~~~~~~~~~
      include/linux/mlx5/driver.h:1092:39: note: passing argument to parameter
      'addr' here
                               u64 length, u16 uid, phys_addr_t *addr, u32 *obj_id);
                                                                 ^
      1 error generated.
      
      Use phys_addr_t for addr's type in mlx5dr_icm_dm, which won't change
      anything with 64-bit builds because phys_addr_t is u64 when
      CONFIG_PHYS_ADDR_T_64BIT is set, which is always when CONFIG_64BIT is
      set.
      
      Fixes: 29cf8feb ("net/mlx5: DR, ICM pool memory allocator")
      Link: https://github.com/ClangBuiltLinux/linux/issues/653Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      334a306f
    • Nathan Chancellor's avatar
      net/mlx5: Fix rt's type in dr_action_create_reformat_action · 7550d541
      Nathan Chancellor authored
      clang warns:
      
      drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c:1080:9:
      warning: implicit conversion from enumeration type 'enum
      mlx5_reformat_ctx_type' to different enumeration type 'enum
      mlx5dr_action_type' [-Wenum-conversion]
                              rt = MLX5_REFORMAT_TYPE_L2_TO_L2_TUNNEL;
                                 ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c:1082:9:
      warning: implicit conversion from enumeration type 'enum
      mlx5_reformat_ctx_type' to different enumeration type 'enum
      mlx5dr_action_type' [-Wenum-conversion]
                              rt = MLX5_REFORMAT_TYPE_L2_TO_L3_TUNNEL;
                                 ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c:1084:51:
      warning: implicit conversion from enumeration type 'enum
      mlx5dr_action_type' to different enumeration type 'enum
      mlx5_reformat_ctx_type' [-Wenum-conversion]
                      ret = mlx5dr_cmd_create_reformat_ctx(dmn->mdev, rt, data_sz, data,
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~            ^~
      3 warnings generated.
      
      Use the right type for rt, which is mlx5_reformat_ctx_type so there are
      no warnings about mismatched types.
      
      Fixes: 9db810ed ("net/mlx5: DR, Expose steering action functionality")
      Link: https://github.com/ClangBuiltLinux/linux/issues/652Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Reported-by: default avatarAustin Kim <austindh.kim@gmail.com>
      Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      7550d541