Skip to content

Commit 6ca00ec

Browse files
Akiva Goldbergerrleon
authored andcommitted
net/mlx5: Add nic_cap_reg and vhca_icm_ctrl registers
Add nic_cap_reg and vhca_icm_ctrl registers interfaces for exposing ICM consumption. Signed-off-by: Akiva Goldberger <[email protected]> Reviewed-by: Moshe Shemesh <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Jacob Keller <[email protected]> Reviewed-by: Kalesh AP <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
1 parent df75ad5 commit 6ca00ec

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

include/linux/mlx5/driver.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ enum {
163163
MLX5_REG_MRTCQ = 0x9182,
164164
MLX5_REG_SBCAM = 0xB01F,
165165
MLX5_REG_RESOURCE_DUMP = 0xC000,
166+
MLX5_REG_NIC_CAP = 0xC00D,
166167
MLX5_REG_DTOR = 0xC00E,
168+
MLX5_REG_VHCA_ICM_CTRL = 0xC010,
167169
};
168170

169171
enum mlx5_qpts_trust_state {

include/linux/mlx5/mlx5_ifc.h

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,7 @@ struct mlx5_ifc_cmd_hca_cap_bits {
18301830
u8 regexp_params[0x1];
18311831
u8 uar_sz[0x6];
18321832
u8 port_selection_cap[0x1];
1833-
u8 reserved_at_251[0x1];
1833+
u8 nic_cap_reg[0x1];
18341834
u8 umem_uid_0[0x1];
18351835
u8 reserved_at_253[0x5];
18361836
u8 log_pg_sz[0x8];
@@ -3327,6 +3327,14 @@ struct mlx5_ifc_dropped_packet_logged_bits {
33273327
u8 reserved_at_0[0xe0];
33283328
};
33293329

3330+
struct mlx5_ifc_nic_cap_reg_bits {
3331+
u8 reserved_at_0[0x1a];
3332+
u8 vhca_icm_ctrl[0x1];
3333+
u8 reserved_at_1b[0x5];
3334+
3335+
u8 reserved_at_20[0x60];
3336+
};
3337+
33303338
struct mlx5_ifc_default_timeout_bits {
33313339
u8 to_multiplier[0x3];
33323340
u8 reserved_at_3[0x9];
@@ -3363,6 +3371,18 @@ struct mlx5_ifc_dtor_reg_bits {
33633371
u8 reserved_at_1c0[0x20];
33643372
};
33653373

3374+
struct mlx5_ifc_vhca_icm_ctrl_reg_bits {
3375+
u8 vhca_id_valid[0x1];
3376+
u8 reserved_at_1[0xf];
3377+
u8 vhca_id[0x10];
3378+
3379+
u8 reserved_at_20[0xa0];
3380+
3381+
u8 cur_alloc_icm[0x20];
3382+
3383+
u8 reserved_at_e0[0x120];
3384+
};
3385+
33663386
enum {
33673387
MLX5_CQ_ERROR_SYNDROME_CQ_OVERRUN = 0x1,
33683388
MLX5_CQ_ERROR_SYNDROME_CQ_ACCESS_VIOLATION_ERROR = 0x2,

0 commit comments

Comments
 (0)