1. 11 Sep, 2019 36 commits
  2. 10 Sep, 2019 4 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
    • David S. Miller's avatar
      Merge branch 'nfp-implement-firmware-loading-policy' · 074be7fd
      David S. Miller authored
      Simon Horman says:
      
      ====================
      nfp: implement firmware loading policy
      
      Dirk says:
      
      This series adds configuration capabilities to the firmware loading policy of
      the NFP driver.
      
      NFP firmware loading is controlled via three HWinfo keys which can be set per
      device: 'abi_drv_reset', 'abi_drv_load_ifc' and 'app_fw_from_flash'.
      Refer to patch #11 for more detail on how these control the firmware loading.
      
      In order to configure the full extend of FW loading policy, a new devlink
      parameter has been introduced, 'reset_dev_on_drv_probe', which controls if the
      driver should reset the device when it's probed. This, in conjunction with the
      existing 'fw_load_policy' (extended to include a 'disk' option) provides the
      means to tweak the NFP HWinfo keys as required by users.
      
      Patches 1 and 2 adds the devlink modifications and patches 3 through 9 adds the
      support into the NFP driver. Furthermore, the last 2 patches are documentation
      only.
      
      v2:
        Renamed all 'reset_dev_on_drv_probe' defines the same as the devlink parameter
        name (Jiri)
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      074be7fd