IB/mlx5: Support padded 128B CQE feature
In some benchmarks and some CPU architectures, writing the CQE on a full cache line size improves performance by saving memory access operations (read-modify-write) relative to partial cache line change. This patch lets the user to configure the device to pad the CQE up to 128B in case its content is less than 128B. Currently the driver supports only padding for a CQE size of 128B. Signed-off-by: Guy Levi <guyle@mellanox.com> Reviewed-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
@@ -206,6 +206,7 @@ struct mlx5_ib_striding_rq_caps {
|
||||
enum mlx5_ib_query_dev_resp_flags {
|
||||
/* Support 128B CQE compression */
|
||||
MLX5_IB_QUERY_DEV_RESP_FLAGS_CQE_128B_COMP = 1 << 0,
|
||||
MLX5_IB_QUERY_DEV_RESP_FLAGS_CQE_128B_PAD = 1 << 1,
|
||||
};
|
||||
|
||||
struct mlx5_ib_query_device_resp {
|
||||
@@ -221,13 +222,17 @@ struct mlx5_ib_query_device_resp {
|
||||
struct mlx5_ib_striding_rq_caps striding_rq_caps;
|
||||
};
|
||||
|
||||
enum mlx5_ib_create_cq_flags {
|
||||
MLX5_IB_CREATE_CQ_FLAGS_CQE_128B_PAD = 1 << 0,
|
||||
};
|
||||
|
||||
struct mlx5_ib_create_cq {
|
||||
__u64 buf_addr;
|
||||
__u64 db_addr;
|
||||
__u32 cqe_size;
|
||||
__u8 cqe_comp_en;
|
||||
__u8 cqe_comp_res_format;
|
||||
__u16 reserved; /* explicit padding (optional on i386) */
|
||||
__u16 flags;
|
||||
};
|
||||
|
||||
struct mlx5_ib_create_cq_resp {
|
||||
|
Reference in New Issue
Block a user