Changeset View
Changeset View
Standalone View
Standalone View
contrib/ofed/libmlx5/mlx5dv.h
Show First 20 Lines • Show All 196 Lines • ▼ Show 20 Lines | |||||
enum mlx5dv_obj_type { | enum mlx5dv_obj_type { | ||||
MLX5DV_OBJ_QP = 1 << 0, | MLX5DV_OBJ_QP = 1 << 0, | ||||
MLX5DV_OBJ_CQ = 1 << 1, | MLX5DV_OBJ_CQ = 1 << 1, | ||||
MLX5DV_OBJ_SRQ = 1 << 2, | MLX5DV_OBJ_SRQ = 1 << 2, | ||||
MLX5DV_OBJ_RWQ = 1 << 3, | MLX5DV_OBJ_RWQ = 1 << 3, | ||||
}; | }; | ||||
enum mlx5dv_wq_init_attr_mask { | |||||
MLX5DV_WQ_INIT_ATTR_MASK_STRIDING_RQ = 1 << 0, | |||||
}; | |||||
struct mlx5dv_striding_rq_init_attr { | |||||
uint32_t single_stride_log_num_of_bytes; | |||||
uint32_t single_wqe_log_num_of_strides; | |||||
uint8_t two_byte_shift_en; | |||||
}; | |||||
struct mlx5dv_wq_init_attr { | |||||
uint64_t comp_mask; /* Use enum mlx5dv_wq_init_attr_mask */ | |||||
struct mlx5dv_striding_rq_init_attr striding_rq_attrs; | |||||
}; | |||||
/* | /* | ||||
* This function creates a work queue object with extra properties | |||||
* defined by mlx5dv_wq_init_attr struct. | |||||
* | |||||
* For each bit in the comp_mask, a field in mlx5dv_wq_init_attr | |||||
* should follow. | |||||
* | |||||
* MLX5DV_WQ_INIT_ATTR_MASK_STRIDING_RQ: Create a work queue with | |||||
* striding RQ capabilities. | |||||
* - single_stride_log_num_of_bytes represents the size of each stride in the | |||||
* WQE and its value should be between min_single_stride_log_num_of_bytes | |||||
* and max_single_stride_log_num_of_bytes that are reported in | |||||
* mlx5dv_query_device. | |||||
* - single_wqe_log_num_of_strides represents the number of strides in each WQE. | |||||
* Its value should be between min_single_wqe_log_num_of_strides and | |||||
* max_single_wqe_log_num_of_strides that are reported in mlx5dv_query_device. | |||||
* - two_byte_shift_en: When enabled, hardware pads 2 bytes of zeroes | |||||
* before writing the message to memory (e.g. for IP alignment) | |||||
*/ | |||||
struct ibv_wq *mlx5dv_create_wq(struct ibv_context *context, | |||||
struct ibv_wq_init_attr *wq_init_attr, | |||||
struct mlx5dv_wq_init_attr *mlx5_wq_attr); | |||||
/* | |||||
* This function will initialize mlx5dv_xxx structs based on supplied type. | * This function will initialize mlx5dv_xxx structs based on supplied type. | ||||
* The information for initialization is taken from ibv_xx structs supplied | * The information for initialization is taken from ibv_xx structs supplied | ||||
* as part of input. | * as part of input. | ||||
* | * | ||||
* Request information of CQ marks its owned by DV for all consumer index | * Request information of CQ marks its owned by DV for all consumer index | ||||
* related actions. | * related actions. | ||||
* | * | ||||
* The initialization type can be combination of several types together. | * The initialization type can be combination of several types together. | ||||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | struct mlx5_err_cqe { | ||||
uint8_t syndrome; | uint8_t syndrome; | ||||
uint32_t s_wqe_opcode_qpn; | uint32_t s_wqe_opcode_qpn; | ||||
uint16_t wqe_counter; | uint16_t wqe_counter; | ||||
uint8_t signature; | uint8_t signature; | ||||
uint8_t op_own; | uint8_t op_own; | ||||
}; | }; | ||||
struct mlx5_cqe64 { | struct mlx5_cqe64 { | ||||
uint8_t rsvd0[17]; | uint8_t rsvd0[2]; | ||||
__be16 wqe_id; | |||||
uint8_t rsvd4[13]; | |||||
uint8_t ml_path; | uint8_t ml_path; | ||||
uint8_t rsvd20[4]; | uint8_t rsvd20[4]; | ||||
__be16 slid; | __be16 slid; | ||||
__be32 flags_rqpn; | __be32 flags_rqpn; | ||||
uint8_t hds_ip_ext; | uint8_t hds_ip_ext; | ||||
uint8_t l4_hdr_type_etc; | uint8_t l4_hdr_type_etc; | ||||
__be16 vlan_info; | __be16 vlan_info; | ||||
__be32 srqn_uidx; | __be32 srqn_uidx; | ||||
▲ Show 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | |||||
struct mlx5_wqe_ctrl_seg { | struct mlx5_wqe_ctrl_seg { | ||||
__be32 opmod_idx_opcode; | __be32 opmod_idx_opcode; | ||||
__be32 qpn_ds; | __be32 qpn_ds; | ||||
uint8_t signature; | uint8_t signature; | ||||
uint8_t rsvd[2]; | uint8_t rsvd[2]; | ||||
uint8_t fm_ce_se; | uint8_t fm_ce_se; | ||||
__be32 imm; | __be32 imm; | ||||
}; | |||||
struct mlx5_mprq_wqe { | |||||
struct mlx5_wqe_srq_next_seg nseg; | |||||
struct mlx5_wqe_data_seg dseg; | |||||
}; | }; | ||||
struct mlx5_wqe_av { | struct mlx5_wqe_av { | ||||
union { | union { | ||||
struct { | struct { | ||||
__be32 qkey; | __be32 qkey; | ||||
__be32 reserved; | __be32 reserved; | ||||
} qkey; | } qkey; | ||||
▲ Show 20 Lines • Show All 237 Lines • Show Last 20 Lines |