diff options
| author | Eli Cohen <eli@dev.mellanox.co.il> | 2014-01-14 10:45:18 -0500 |
|---|---|---|
| committer | Roland Dreier <roland@purestorage.com> | 2014-01-23 02:23:50 -0500 |
| commit | bde51583f49bd87e452e9504d489926638046b11 (patch) | |
| tree | 4b2f685b9c06304c03711d78110e98807820660d /include/linux/mlx5 | |
| parent | 3bdb31f688276505ede23280885948e934304674 (diff) | |
IB/mlx5: Add support for resize CQ
Implement resize CQ which is a mandatory verb in mlx5.
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/linux/mlx5')
| -rw-r--r-- | include/linux/mlx5/cq.h | 12 | ||||
| -rw-r--r-- | include/linux/mlx5/device.h | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/include/linux/mlx5/cq.h b/include/linux/mlx5/cq.h index c3cf5a46abce..2202c7f72b75 100644 --- a/include/linux/mlx5/cq.h +++ b/include/linux/mlx5/cq.h | |||
| @@ -79,9 +79,10 @@ enum { | |||
| 79 | MLX5_CQE_RESP_SEND = 2, | 79 | MLX5_CQE_RESP_SEND = 2, |
| 80 | MLX5_CQE_RESP_SEND_IMM = 3, | 80 | MLX5_CQE_RESP_SEND_IMM = 3, |
| 81 | MLX5_CQE_RESP_SEND_INV = 4, | 81 | MLX5_CQE_RESP_SEND_INV = 4, |
| 82 | MLX5_CQE_RESIZE_CQ = 0xff, /* TBD */ | 82 | MLX5_CQE_RESIZE_CQ = 5, |
| 83 | MLX5_CQE_REQ_ERR = 13, | 83 | MLX5_CQE_REQ_ERR = 13, |
| 84 | MLX5_CQE_RESP_ERR = 14, | 84 | MLX5_CQE_RESP_ERR = 14, |
| 85 | MLX5_CQE_INVALID = 15, | ||
| 85 | }; | 86 | }; |
| 86 | 87 | ||
| 87 | enum { | 88 | enum { |
| @@ -90,6 +91,13 @@ enum { | |||
| 90 | MLX5_CQ_MODIFY_OVERRUN = 1 << 2, | 91 | MLX5_CQ_MODIFY_OVERRUN = 1 << 2, |
| 91 | }; | 92 | }; |
| 92 | 93 | ||
| 94 | enum { | ||
| 95 | MLX5_CQ_OPMOD_RESIZE = 1, | ||
| 96 | MLX5_MODIFY_CQ_MASK_LOG_SIZE = 1 << 0, | ||
| 97 | MLX5_MODIFY_CQ_MASK_PG_OFFSET = 1 << 1, | ||
| 98 | MLX5_MODIFY_CQ_MASK_PG_SIZE = 1 << 2, | ||
| 99 | }; | ||
| 100 | |||
| 93 | struct mlx5_cq_modify_params { | 101 | struct mlx5_cq_modify_params { |
| 94 | int type; | 102 | int type; |
| 95 | union { | 103 | union { |
| @@ -158,7 +166,7 @@ int mlx5_core_destroy_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq); | |||
| 158 | int mlx5_core_query_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq, | 166 | int mlx5_core_query_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq, |
| 159 | struct mlx5_query_cq_mbox_out *out); | 167 | struct mlx5_query_cq_mbox_out *out); |
| 160 | int mlx5_core_modify_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq, | 168 | int mlx5_core_modify_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq, |
| 161 | struct mlx5_modify_cq_mbox_in *in); | 169 | struct mlx5_modify_cq_mbox_in *in, int in_sz); |
| 162 | int mlx5_debug_cq_add(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq); | 170 | int mlx5_debug_cq_add(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq); |
| 163 | void mlx5_debug_cq_remove(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq); | 171 | void mlx5_debug_cq_remove(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq); |
| 164 | 172 | ||
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h index dbb03caa8aed..87e23717df70 100644 --- a/include/linux/mlx5/device.h +++ b/include/linux/mlx5/device.h | |||
| @@ -178,6 +178,7 @@ enum { | |||
| 178 | MLX5_DEV_CAP_FLAG_ATOMIC = 1LL << 18, | 178 | MLX5_DEV_CAP_FLAG_ATOMIC = 1LL << 18, |
| 179 | MLX5_DEV_CAP_FLAG_ON_DMND_PG = 1LL << 24, | 179 | MLX5_DEV_CAP_FLAG_ON_DMND_PG = 1LL << 24, |
| 180 | MLX5_DEV_CAP_FLAG_CQ_MODER = 1LL << 29, | 180 | MLX5_DEV_CAP_FLAG_CQ_MODER = 1LL << 29, |
| 181 | MLX5_DEV_CAP_FLAG_RESIZE_CQ = 1LL << 30, | ||
| 181 | MLX5_DEV_CAP_FLAG_RESIZE_SRQ = 1LL << 32, | 182 | MLX5_DEV_CAP_FLAG_RESIZE_SRQ = 1LL << 32, |
| 182 | MLX5_DEV_CAP_FLAG_REMOTE_FENCE = 1LL << 38, | 183 | MLX5_DEV_CAP_FLAG_REMOTE_FENCE = 1LL << 38, |
| 183 | MLX5_DEV_CAP_FLAG_TLP_HINTS = 1LL << 39, | 184 | MLX5_DEV_CAP_FLAG_TLP_HINTS = 1LL << 39, |
| @@ -710,6 +711,7 @@ struct mlx5_modify_cq_mbox_in { | |||
| 710 | 711 | ||
| 711 | struct mlx5_modify_cq_mbox_out { | 712 | struct mlx5_modify_cq_mbox_out { |
| 712 | struct mlx5_outbox_hdr hdr; | 713 | struct mlx5_outbox_hdr hdr; |
| 714 | u8 rsvd[8]; | ||
| 713 | }; | 715 | }; |
| 714 | 716 | ||
| 715 | struct mlx5_enable_hca_mbox_in { | 717 | struct mlx5_enable_hca_mbox_in { |
