summaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5/mlx5_ifc.h
diff options
context:
space:
mode:
authorMajd Dibbiny2017-02-09 13:20:12 +0100
committerSaeed Mahameed2017-06-15 23:19:44 +0200
commit8812c24d28f4972c4f2b9998bf30b1f2a1b62adf (patch)
tree31d20563fba8998ad57027662299ccc41bc44a77 /include/linux/mlx5/mlx5_ifc.h
parentnet/mlx5: Expose command polling interface (diff)
downloadkernel-qcow2-linux-8812c24d28f4972c4f2b9998bf30b1f2a1b62adf.tar.gz
kernel-qcow2-linux-8812c24d28f4972c4f2b9998bf30b1f2a1b62adf.tar.xz
kernel-qcow2-linux-8812c24d28f4972c4f2b9998bf30b1f2a1b62adf.zip
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>
Diffstat (limited to 'include/linux/mlx5/mlx5_ifc.h')
-rw-r--r--include/linux/mlx5/mlx5_ifc.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index 1fd144662491..e86ef880a149 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -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 {