aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5/device.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mlx5/device.h')
-rw-r--r--include/linux/mlx5/device.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h
index 409ffb14298a..e5258ee4e38b 100644
--- a/include/linux/mlx5/device.h
+++ b/include/linux/mlx5/device.h
@@ -79,6 +79,11 @@
79 << __mlx5_dw_bit_off(typ, fld))); \ 79 << __mlx5_dw_bit_off(typ, fld))); \
80} while (0) 80} while (0)
81 81
82#define MLX5_ARRAY_SET(typ, p, fld, idx, v) do { \
83 BUILD_BUG_ON(__mlx5_bit_off(typ, fld) % 32); \
84 MLX5_SET(typ, p, fld[idx], v); \
85} while (0)
86
82#define MLX5_SET_TO_ONES(typ, p, fld) do { \ 87#define MLX5_SET_TO_ONES(typ, p, fld) do { \
83 BUILD_BUG_ON(__mlx5_st_sz_bits(typ) % 32); \ 88 BUILD_BUG_ON(__mlx5_st_sz_bits(typ) % 32); \
84 *((__be32 *)(p) + __mlx5_dw_off(typ, fld)) = \ 89 *((__be32 *)(p) + __mlx5_dw_off(typ, fld)) = \
@@ -244,6 +249,8 @@ enum {
244 MLX5_NON_FP_BFREGS_PER_UAR, 249 MLX5_NON_FP_BFREGS_PER_UAR,
245 MLX5_UARS_IN_PAGE = PAGE_SIZE / MLX5_ADAPTER_PAGE_SIZE, 250 MLX5_UARS_IN_PAGE = PAGE_SIZE / MLX5_ADAPTER_PAGE_SIZE,
246 MLX5_NON_FP_BFREGS_IN_PAGE = MLX5_NON_FP_BFREGS_PER_UAR * MLX5_UARS_IN_PAGE, 251 MLX5_NON_FP_BFREGS_IN_PAGE = MLX5_NON_FP_BFREGS_PER_UAR * MLX5_UARS_IN_PAGE,
252 MLX5_MIN_DYN_BFREGS = 512,
253 MLX5_MAX_DYN_BFREGS = 1024,
247}; 254};
248 255
249enum { 256enum {
@@ -284,6 +291,7 @@ enum {
284 MLX5_EVENT_QUEUE_TYPE_QP = 0, 291 MLX5_EVENT_QUEUE_TYPE_QP = 0,
285 MLX5_EVENT_QUEUE_TYPE_RQ = 1, 292 MLX5_EVENT_QUEUE_TYPE_RQ = 1,
286 MLX5_EVENT_QUEUE_TYPE_SQ = 2, 293 MLX5_EVENT_QUEUE_TYPE_SQ = 2,
294 MLX5_EVENT_QUEUE_TYPE_DCT = 6,
287}; 295};
288 296
289enum mlx5_event { 297enum mlx5_event {
@@ -319,6 +327,8 @@ enum mlx5_event {
319 MLX5_EVENT_TYPE_PAGE_FAULT = 0xc, 327 MLX5_EVENT_TYPE_PAGE_FAULT = 0xc,
320 MLX5_EVENT_TYPE_NIC_VPORT_CHANGE = 0xd, 328 MLX5_EVENT_TYPE_NIC_VPORT_CHANGE = 0xd,
321 329
330 MLX5_EVENT_TYPE_DCT_DRAINED = 0x1c,
331
322 MLX5_EVENT_TYPE_FPGA_ERROR = 0x20, 332 MLX5_EVENT_TYPE_FPGA_ERROR = 0x20,
323}; 333};
324 334
@@ -611,6 +621,11 @@ struct mlx5_eqe_pps {
611 u8 rsvd2[12]; 621 u8 rsvd2[12];
612} __packed; 622} __packed;
613 623
624struct mlx5_eqe_dct {
625 __be32 reserved[6];
626 __be32 dctn;
627};
628
614union ev_data { 629union ev_data {
615 __be32 raw[7]; 630 __be32 raw[7];
616 struct mlx5_eqe_cmd cmd; 631 struct mlx5_eqe_cmd cmd;
@@ -626,6 +641,7 @@ union ev_data {
626 struct mlx5_eqe_vport_change vport_change; 641 struct mlx5_eqe_vport_change vport_change;
627 struct mlx5_eqe_port_module port_module; 642 struct mlx5_eqe_port_module port_module;
628 struct mlx5_eqe_pps pps; 643 struct mlx5_eqe_pps pps;
644 struct mlx5_eqe_dct dct;
629} __packed; 645} __packed;
630 646
631struct mlx5_eqe { 647struct mlx5_eqe {