Skip to content

Commit a6a217d

Browse files
aharonl-nvidiarleon
authored andcommitted
net/mlx5: Add new timestamp mode bits
These fields declare which timestamp mode is supported by the device per RQ/SQ/QP. In addition add the ts_format field to the select the mode for RQ/SQ/QP. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Aharon Landau <[email protected]> Signed-off-by: Maor Gottlieb <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
1 parent ab0da5a commit a6a217d

File tree

1 file changed

+49
-5
lines changed

1 file changed

+49
-5
lines changed

include/linux/mlx5/mlx5_ifc.h

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -932,11 +932,18 @@ struct mlx5_ifc_per_protocol_networking_offload_caps_bits {
932932
u8 reserved_at_200[0x600];
933933
};
934934

935+
enum {
936+
MLX5_QP_TIMESTAMP_FORMAT_CAP_FREE_RUNNING = 0x0,
937+
MLX5_QP_TIMESTAMP_FORMAT_CAP_REAL_TIME = 0x1,
938+
MLX5_QP_TIMESTAMP_FORMAT_CAP_FREE_RUNNING_AND_REAL_TIME = 0x2,
939+
};
940+
935941
struct mlx5_ifc_roce_cap_bits {
936942
u8 roce_apm[0x1];
937943
u8 reserved_at_1[0x3];
938944
u8 sw_r_roce_src_udp_port[0x1];
939-
u8 reserved_at_5[0x1b];
945+
u8 reserved_at_5[0x19];
946+
u8 qp_ts_format[0x2];
940947

941948
u8 reserved_at_20[0x60];
942949

@@ -1253,6 +1260,18 @@ enum {
12531260
MLX5_STEERING_FORMAT_CONNECTX_6DX = 1,
12541261
};
12551262

1263+
enum {
1264+
MLX5_SQ_TIMESTAMP_FORMAT_CAP_FREE_RUNNING = 0x0,
1265+
MLX5_SQ_TIMESTAMP_FORMAT_CAP_REAL_TIME = 0x1,
1266+
MLX5_SQ_TIMESTAMP_FORMAT_CAP_FREE_RUNNING_AND_REAL_TIME = 0x2,
1267+
};
1268+
1269+
enum {
1270+
MLX5_RQ_TIMESTAMP_FORMAT_CAP_FREE_RUNNING = 0x0,
1271+
MLX5_RQ_TIMESTAMP_FORMAT_CAP_REAL_TIME = 0x1,
1272+
MLX5_RQ_TIMESTAMP_FORMAT_CAP_FREE_RUNNING_AND_REAL_TIME = 0x2,
1273+
};
1274+
12561275
struct mlx5_ifc_cmd_hca_cap_bits {
12571276
u8 reserved_at_0[0x1f];
12581277
u8 vhca_resource_manager[0x1];
@@ -1564,7 +1583,8 @@ struct mlx5_ifc_cmd_hca_cap_bits {
15641583

15651584
u8 general_obj_types[0x40];
15661585

1567-
u8 reserved_at_440[0x4];
1586+
u8 sq_ts_format[0x2];
1587+
u8 rq_ts_format[0x2];
15681588
u8 steering_format_version[0x4];
15691589
u8 create_qp_start_hint[0x18];
15701590

@@ -2868,6 +2888,12 @@ enum {
28682888
MLX5_QPC_CS_RES_UP_TO_64B = 0x2,
28692889
};
28702890

2891+
enum {
2892+
MLX5_QPC_TIMESTAMP_FORMAT_FREE_RUNNING = 0x0,
2893+
MLX5_QPC_TIMESTAMP_FORMAT_DEFAULT = 0x1,
2894+
MLX5_QPC_TIMESTAMP_FORMAT_REAL_TIME = 0x2,
2895+
};
2896+
28712897
struct mlx5_ifc_qpc_bits {
28722898
u8 state[0x4];
28732899
u8 lag_tx_port_affinity[0x4];
@@ -2896,7 +2922,9 @@ struct mlx5_ifc_qpc_bits {
28962922
u8 log_rq_stride[0x3];
28972923
u8 no_sq[0x1];
28982924
u8 log_sq_size[0x4];
2899-
u8 reserved_at_55[0x6];
2925+
u8 reserved_at_55[0x3];
2926+
u8 ts_format[0x2];
2927+
u8 reserved_at_5a[0x1];
29002928
u8 rlky[0x1];
29012929
u8 ulp_stateless_offload_mode[0x4];
29022930

@@ -3312,6 +3340,12 @@ enum {
33123340
MLX5_SQC_STATE_ERR = 0x3,
33133341
};
33143342

3343+
enum {
3344+
MLX5_SQC_TIMESTAMP_FORMAT_FREE_RUNNING = 0x0,
3345+
MLX5_SQC_TIMESTAMP_FORMAT_DEFAULT = 0x1,
3346+
MLX5_SQC_TIMESTAMP_FORMAT_REAL_TIME = 0x2,
3347+
};
3348+
33153349
struct mlx5_ifc_sqc_bits {
33163350
u8 rlky[0x1];
33173351
u8 cd_master[0x1];
@@ -3323,7 +3357,9 @@ struct mlx5_ifc_sqc_bits {
33233357
u8 reg_umr[0x1];
33243358
u8 allow_swp[0x1];
33253359
u8 hairpin[0x1];
3326-
u8 reserved_at_f[0x11];
3360+
u8 reserved_at_f[0xb];
3361+
u8 ts_format[0x2];
3362+
u8 reserved_at_1c[0x4];
33273363

33283364
u8 reserved_at_20[0x8];
33293365
u8 user_index[0x18];
@@ -3414,6 +3450,12 @@ enum {
34143450
MLX5_RQC_STATE_ERR = 0x3,
34153451
};
34163452

3453+
enum {
3454+
MLX5_RQC_TIMESTAMP_FORMAT_FREE_RUNNING = 0x0,
3455+
MLX5_RQC_TIMESTAMP_FORMAT_DEFAULT = 0x1,
3456+
MLX5_RQC_TIMESTAMP_FORMAT_REAL_TIME = 0x2,
3457+
};
3458+
34173459
struct mlx5_ifc_rqc_bits {
34183460
u8 rlky[0x1];
34193461
u8 delay_drop_en[0x1];
@@ -3424,7 +3466,9 @@ struct mlx5_ifc_rqc_bits {
34243466
u8 reserved_at_c[0x1];
34253467
u8 flush_in_error_en[0x1];
34263468
u8 hairpin[0x1];
3427-
u8 reserved_at_f[0x11];
3469+
u8 reserved_at_f[0xb];
3470+
u8 ts_format[0x2];
3471+
u8 reserved_at_1c[0x4];
34283472

34293473
u8 reserved_at_20[0x8];
34303474
u8 user_index[0x18];

0 commit comments

Comments
 (0)