net/mlx5: Add fast unload support in shutdown flow
Adding a support to flush all HW resources with one FW command and skip all the heavy unload flows of the driver on kernel shutdown. There's no need to free all the SW context since a new fresh kernel will be loaded afterwards. Regarding the FW resources, they should be closed, otherwise we will have leakage in the FW. To accelerate this flow, we execute one command in the beginning that tells the FW that the driver isn't going to close any of the FW resources and asks the FW to clean up everything. Once the commands complete, it's safe to close the PCI resources and finish the routine. Signed-off-by: Majd Dibbiny <majd@mellanox.com> Signed-off-by: Maor Gottlieb <maorg@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:

committed by
Saeed Mahameed

parent
4525abeaae
commit
8812c24d28
@@ -801,7 +801,8 @@ struct mlx5_ifc_cmd_hca_cap_bits {
|
||||
u8 max_indirection[0x8];
|
||||
u8 fixed_buffer_size[0x1];
|
||||
u8 log_max_mrw_sz[0x7];
|
||||
u8 reserved_at_110[0x2];
|
||||
u8 force_teardown[0x1];
|
||||
u8 reserved_at_111[0x1];
|
||||
u8 log_max_bsf_list_size[0x6];
|
||||
u8 umr_extended_translation_offset[0x1];
|
||||
u8 null_mkey[0x1];
|
||||
@@ -3094,18 +3095,25 @@ struct mlx5_ifc_tsar_element_bits {
|
||||
u8 reserved_at_10[0x10];
|
||||
};
|
||||
|
||||
enum {
|
||||
MLX5_TEARDOWN_HCA_OUT_FORCE_STATE_SUCCESS = 0x0,
|
||||
MLX5_TEARDOWN_HCA_OUT_FORCE_STATE_FAIL = 0x1,
|
||||
};
|
||||
|
||||
struct mlx5_ifc_teardown_hca_out_bits {
|
||||
u8 status[0x8];
|
||||
u8 reserved_at_8[0x18];
|
||||
|
||||
u8 syndrome[0x20];
|
||||
|
||||
u8 reserved_at_40[0x40];
|
||||
u8 reserved_at_40[0x3f];
|
||||
|
||||
u8 force_state[0x1];
|
||||
};
|
||||
|
||||
enum {
|
||||
MLX5_TEARDOWN_HCA_IN_PROFILE_GRACEFUL_CLOSE = 0x0,
|
||||
MLX5_TEARDOWN_HCA_IN_PROFILE_PANIC_CLOSE = 0x1,
|
||||
MLX5_TEARDOWN_HCA_IN_PROFILE_FORCE_CLOSE = 0x1,
|
||||
};
|
||||
|
||||
struct mlx5_ifc_teardown_hca_in_bits {
|
||||
|
Reference in New Issue
Block a user