IB/mlx5: Reduce the use of num_port capability
[linux-2.6-block.git] / include / linux / mlx5 / driver.h
index a886b51511abbf146c4c76309aa313e4bbf77dda..5b0443c9d337eb40b45332d473e8b0b9fb9c56e3 100644 (file)
@@ -154,6 +154,13 @@ enum mlx5_dcbx_oper_mode {
        MLX5E_DCBX_PARAM_VER_OPER_AUTO  = 0x3,
 };
 
+enum mlx5_dct_atomic_mode {
+       MLX5_ATOMIC_MODE_DCT_OFF        = 20,
+       MLX5_ATOMIC_MODE_DCT_NONE       = 0 << MLX5_ATOMIC_MODE_DCT_OFF,
+       MLX5_ATOMIC_MODE_DCT_IB_COMP    = 1 << MLX5_ATOMIC_MODE_DCT_OFF,
+       MLX5_ATOMIC_MODE_DCT_CX         = 2 << MLX5_ATOMIC_MODE_DCT_OFF,
+};
+
 enum {
        MLX5_ATOMIC_OPS_CMP_SWAP        = 1 << 0,
        MLX5_ATOMIC_OPS_FETCH_ADD       = 1 << 1,
@@ -230,6 +237,9 @@ struct mlx5_bfreg_info {
        u32                     ver;
        bool                    lib_uar_4k;
        u32                     num_sys_pages;
+       u32                     num_static_sys_pages;
+       u32                     total_num_bfregs;
+       u32                     num_dyn_bfregs;
 };
 
 struct mlx5_cmd_first {
@@ -429,6 +439,7 @@ enum mlx5_res_type {
        MLX5_RES_SRQ    = 3,
        MLX5_RES_XSRQ   = 4,
        MLX5_RES_XRQ    = 5,
+       MLX5_RES_DCT    = MLX5_EVENT_QUEUE_TYPE_DCT,
 };
 
 struct mlx5_core_rsc_common {
@@ -824,7 +835,7 @@ struct mlx5_core_dev {
        struct mlx5e_resources  mlx5e_res;
        struct {
                struct mlx5_rsvd_gids   reserved_gids;
-               atomic_t                roce_en;
+               u32                     roce_en;
        } roce;
 #ifdef CONFIG_MLX5_FPGA
        struct mlx5_fpga_device *fpga;
@@ -1164,6 +1175,10 @@ int mlx5_cmd_create_vport_lag(struct mlx5_core_dev *dev);
 int mlx5_cmd_destroy_vport_lag(struct mlx5_core_dev *dev);
 bool mlx5_lag_is_active(struct mlx5_core_dev *dev);
 struct net_device *mlx5_lag_get_roce_netdev(struct mlx5_core_dev *dev);
+int mlx5_lag_query_cong_counters(struct mlx5_core_dev *dev,
+                                u64 *values,
+                                int num_counters,
+                                size_t *offsets);
 struct mlx5_uars_page *mlx5_get_uars_page(struct mlx5_core_dev *mdev);
 void mlx5_put_uars_page(struct mlx5_core_dev *mdev, struct mlx5_uars_page *up);