mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
IB/mlx5: Add CQ moderation capability to query_device
query_device can now obtain the maximum values for cq_max_count and cq_period, needed for cq moderation. Signed-off-by: Yonatan Cohen <[email protected]> Reviewed-by: Majd Dibbiny <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
This commit is contained in:
parent
0fd586de65
commit
87ab3f524e
1 changed files with 7 additions and 0 deletions
|
|
@ -790,6 +790,13 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
|
|||
props->tm_caps.max_sge = MLX5_TM_MAX_SGE;
|
||||
}
|
||||
|
||||
if (MLX5_CAP_GEN(dev->mdev, cq_moderation)) {
|
||||
props->cq_caps.max_cq_moderation_count =
|
||||
MLX5_MAX_CQ_COUNT;
|
||||
props->cq_caps.max_cq_moderation_period =
|
||||
MLX5_MAX_CQ_PERIOD;
|
||||
}
|
||||
|
||||
if (field_avail(typeof(resp), cqe_comp_caps, uhw->outlen)) {
|
||||
resp.cqe_comp_caps.max_num =
|
||||
MLX5_CAP_GEN(dev->mdev, cqe_compression) ?
|
||||
|
|
|
|||
Loading…
Reference in a new issue