net/mlx5: Use event mask based on device capabilities
Use the reported device capabilities for the supported user events (i.e. affiliated and un-affiliated) to set the EQ mask. As the event mask can be up to 256 defined by 4 entries of u64 change the applicable code to work accordingly. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Acked-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
This commit is contained in:

committed by
Leon Romanovsky

parent
1d49ce1e05
commit
b9a7ba5562
@@ -351,7 +351,7 @@ enum mlx5_event {
|
||||
|
||||
MLX5_EVENT_TYPE_DEVICE_TRACER = 0x26,
|
||||
|
||||
MLX5_EVENT_TYPE_MAX = MLX5_EVENT_TYPE_DEVICE_TRACER + 1,
|
||||
MLX5_EVENT_TYPE_MAX = 0x100,
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -1077,6 +1077,7 @@ enum mlx5_cap_type {
|
||||
MLX5_CAP_DEBUG,
|
||||
MLX5_CAP_RESERVED_14,
|
||||
MLX5_CAP_DEV_MEM,
|
||||
MLX5_CAP_DEV_EVENT = 0x14,
|
||||
/* NUM OF CAP Types */
|
||||
MLX5_CAP_NUM
|
||||
};
|
||||
@@ -1255,6 +1256,9 @@ enum mlx5_qcam_feature_groups {
|
||||
#define MLX5_CAP64_DEV_MEM(mdev, cap)\
|
||||
MLX5_GET64(device_mem_cap, mdev->caps.hca_cur[MLX5_CAP_DEV_MEM], cap)
|
||||
|
||||
#define MLX5_CAP_DEV_EVENT(mdev, cap)\
|
||||
MLX5_ADDR_OF(device_event_cap, (mdev)->caps.hca_cur[MLX5_CAP_DEV_EVENT], cap)
|
||||
|
||||
enum {
|
||||
MLX5_CMD_STAT_OK = 0x0,
|
||||
MLX5_CMD_STAT_INT_ERR = 0x1,
|
||||
|
@@ -15,7 +15,7 @@ struct mlx5_core_dev;
|
||||
struct mlx5_eq_param {
|
||||
u8 irq_index;
|
||||
int nent;
|
||||
u64 mask;
|
||||
u64 mask[4];
|
||||
};
|
||||
|
||||
struct mlx5_eq *
|
||||
|
@@ -860,6 +860,12 @@ struct mlx5_ifc_device_mem_cap_bits {
|
||||
u8 reserved_at_180[0x680];
|
||||
};
|
||||
|
||||
struct mlx5_ifc_device_event_cap_bits {
|
||||
u8 user_affiliated_events[4][0x40];
|
||||
|
||||
u8 user_unaffiliated_events[4][0x40];
|
||||
};
|
||||
|
||||
enum {
|
||||
MLX5_ATOMIC_CAPS_ATOMIC_SIZE_QP_1_BYTE = 0x0,
|
||||
MLX5_ATOMIC_CAPS_ATOMIC_SIZE_QP_2_BYTES = 0x2,
|
||||
@@ -1017,7 +1023,8 @@ struct mlx5_ifc_cmd_hca_cap_bits {
|
||||
|
||||
u8 log_max_srq_sz[0x8];
|
||||
u8 log_max_qp_sz[0x8];
|
||||
u8 reserved_at_90[0x8];
|
||||
u8 event_cap[0x1];
|
||||
u8 reserved_at_91[0x7];
|
||||
u8 prio_tag_required[0x1];
|
||||
u8 reserved_at_99[0x2];
|
||||
u8 log_max_qp[0x5];
|
||||
@@ -7422,9 +7429,9 @@ struct mlx5_ifc_create_eq_in_bits {
|
||||
|
||||
u8 reserved_at_280[0x40];
|
||||
|
||||
u8 event_bitmask[0x40];
|
||||
u8 event_bitmask[4][0x40];
|
||||
|
||||
u8 reserved_at_300[0x580];
|
||||
u8 reserved_at_3c0[0x4c0];
|
||||
|
||||
u8 pas[0][0x40];
|
||||
};
|
||||
|
Reference in New Issue
Block a user