Skip to content

Commit 8a06a79

Browse files
Eli CohenSaeed Mahameed
authored andcommitted
net/mlx5: Add interface changes required for VDPA
Rename mlx5_ifc_device_virtio_emulation_cap_bits to mlx5_ifc_virtio_emulation_cap_bits to match names produced by the tools producing these auto generated files. In addition missing capabilities that will be required by VDPA implementation. Signed-off-by: Eli Cohen <[email protected]> Reviewed-by: Parav Pandit <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 2a913f2 commit 8a06a79

File tree

2 files changed

+100
-16
lines changed

2 files changed

+100
-16
lines changed

include/linux/mlx5/device.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,11 +1361,11 @@ enum mlx5_qcam_feature_groups {
13611361
MLX5_ADDR_OF(device_event_cap, (mdev)->caps.hca_cur[MLX5_CAP_DEV_EVENT], cap)
13621362

13631363
#define MLX5_CAP_DEV_VDPA_EMULATION(mdev, cap)\
1364-
MLX5_GET(device_virtio_emulation_cap, \
1364+
MLX5_GET(virtio_emulation_cap, \
13651365
(mdev)->caps.hca_cur[MLX5_CAP_VDPA_EMULATION], cap)
13661366

13671367
#define MLX5_CAP64_DEV_VDPA_EMULATION(mdev, cap)\
1368-
MLX5_GET64(device_virtio_emulation_cap, \
1368+
MLX5_GET64(virtio_emulation_cap, \
13691369
(mdev)->caps.hca_cur[MLX5_CAP_VDPA_EMULATION], cap)
13701370

13711371
#define MLX5_CAP_IPSEC(mdev, cap)\

include/linux/mlx5/mlx5_ifc.h

Lines changed: 98 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ enum {
9393

9494
enum {
9595
MLX5_OBJ_TYPE_GENEVE_TLV_OPT = 0x000b,
96+
MLX5_OBJ_TYPE_VIRTIO_NET_Q = 0x000d,
9697
MLX5_OBJ_TYPE_MKEY = 0xff01,
9798
MLX5_OBJ_TYPE_QP = 0xff02,
9899
MLX5_OBJ_TYPE_PSV = 0xff03,
@@ -981,17 +982,40 @@ struct mlx5_ifc_device_event_cap_bits {
981982
u8 user_unaffiliated_events[4][0x40];
982983
};
983984

984-
struct mlx5_ifc_device_virtio_emulation_cap_bits {
985-
u8 reserved_at_0[0x20];
985+
struct mlx5_ifc_virtio_emulation_cap_bits {
986+
u8 desc_tunnel_offload_type[0x1];
987+
u8 eth_frame_offload_type[0x1];
988+
u8 virtio_version_1_0[0x1];
989+
u8 device_features_bits_mask[0xd];
990+
u8 event_mode[0x8];
991+
u8 virtio_queue_type[0x8];
986992

987-
u8 reserved_at_20[0x13];
993+
u8 max_tunnel_desc[0x10];
994+
u8 reserved_at_30[0x3];
988995
u8 log_doorbell_stride[0x5];
989996
u8 reserved_at_38[0x3];
990997
u8 log_doorbell_bar_size[0x5];
991998

992999
u8 doorbell_bar_offset[0x40];
9931000

994-
u8 reserved_at_80[0x780];
1001+
u8 max_emulated_devices[0x8];
1002+
u8 max_num_virtio_queues[0x18];
1003+
1004+
u8 reserved_at_a0[0x60];
1005+
1006+
u8 umem_1_buffer_param_a[0x20];
1007+
1008+
u8 umem_1_buffer_param_b[0x20];
1009+
1010+
u8 umem_2_buffer_param_a[0x20];
1011+
1012+
u8 umem_2_buffer_param_b[0x20];
1013+
1014+
u8 umem_3_buffer_param_a[0x20];
1015+
1016+
u8 umem_3_buffer_param_b[0x20];
1017+
1018+
u8 reserved_at_1c0[0x640];
9951019
};
9961020

9971021
enum {
@@ -1216,7 +1240,9 @@ struct mlx5_ifc_cmd_hca_cap_bits {
12161240

12171241
u8 max_sgl_for_optimized_performance[0x8];
12181242
u8 log_max_cq_sz[0x8];
1219-
u8 reserved_at_d0[0xb];
1243+
u8 reserved_at_d0[0x9];
1244+
u8 virtio_net_device_emualtion_manager[0x1];
1245+
u8 virtio_blk_device_emualtion_manager[0x1];
12201246
u8 log_max_cq[0x5];
12211247

12221248
u8 log_max_eq_sz[0x8];
@@ -2952,7 +2978,7 @@ union mlx5_ifc_hca_cap_union_bits {
29522978
struct mlx5_ifc_fpga_cap_bits fpga_cap;
29532979
struct mlx5_ifc_tls_cap_bits tls_cap;
29542980
struct mlx5_ifc_device_mem_cap_bits device_mem_cap;
2955-
struct mlx5_ifc_device_virtio_emulation_cap_bits virtio_emulation_cap;
2981+
struct mlx5_ifc_virtio_emulation_cap_bits virtio_emulation_cap;
29562982
u8 reserved_at_0[0x8000];
29572983
};
29582984

@@ -3298,15 +3324,18 @@ struct mlx5_ifc_scheduling_context_bits {
32983324
};
32993325

33003326
struct mlx5_ifc_rqtc_bits {
3301-
u8 reserved_at_0[0xa0];
3327+
u8 reserved_at_0[0xa0];
33023328

3303-
u8 reserved_at_a0[0x10];
3304-
u8 rqt_max_size[0x10];
3329+
u8 reserved_at_a0[0x5];
3330+
u8 list_q_type[0x3];
3331+
u8 reserved_at_a8[0x8];
3332+
u8 rqt_max_size[0x10];
33053333

3306-
u8 reserved_at_c0[0x10];
3307-
u8 rqt_actual_size[0x10];
3334+
u8 rq_vhca_id_format[0x1];
3335+
u8 reserved_at_c1[0xf];
3336+
u8 rqt_actual_size[0x10];
33083337

3309-
u8 reserved_at_e0[0x6a0];
3338+
u8 reserved_at_e0[0x6a0];
33103339

33113340
struct mlx5_ifc_rq_num_bits rq_num[];
33123341
};
@@ -7084,7 +7113,7 @@ struct mlx5_ifc_destroy_mkey_out_bits {
70847113

70857114
struct mlx5_ifc_destroy_mkey_in_bits {
70867115
u8 opcode[0x10];
7087-
u8 reserved_at_10[0x10];
7116+
u8 uid[0x10];
70887117

70897118
u8 reserved_at_20[0x10];
70907119
u8 op_mod[0x10];
@@ -7782,7 +7811,7 @@ struct mlx5_ifc_create_mkey_out_bits {
77827811

77837812
struct mlx5_ifc_create_mkey_in_bits {
77847813
u8 opcode[0x10];
7785-
u8 reserved_at_10[0x10];
7814+
u8 uid[0x10];
77867815

77877816
u8 reserved_at_20[0x10];
77887817
u8 op_mod[0x10];
@@ -10312,6 +10341,40 @@ struct mlx5_ifc_create_umem_in_bits {
1031210341
struct mlx5_ifc_umem_bits umem;
1031310342
};
1031410343

10344+
struct mlx5_ifc_create_umem_out_bits {
10345+
u8 status[0x8];
10346+
u8 reserved_at_8[0x18];
10347+
10348+
u8 syndrome[0x20];
10349+
10350+
u8 reserved_at_40[0x8];
10351+
u8 umem_id[0x18];
10352+
10353+
u8 reserved_at_60[0x20];
10354+
};
10355+
10356+
struct mlx5_ifc_destroy_umem_in_bits {
10357+
u8 opcode[0x10];
10358+
u8 uid[0x10];
10359+
10360+
u8 reserved_at_20[0x10];
10361+
u8 op_mod[0x10];
10362+
10363+
u8 reserved_at_40[0x8];
10364+
u8 umem_id[0x18];
10365+
10366+
u8 reserved_at_60[0x20];
10367+
};
10368+
10369+
struct mlx5_ifc_destroy_umem_out_bits {
10370+
u8 status[0x8];
10371+
u8 reserved_at_8[0x18];
10372+
10373+
u8 syndrome[0x20];
10374+
10375+
u8 reserved_at_40[0x40];
10376+
};
10377+
1031510378
struct mlx5_ifc_create_uctx_in_bits {
1031610379
u8 opcode[0x10];
1031710380
u8 reserved_at_10[0x10];
@@ -10324,6 +10387,18 @@ struct mlx5_ifc_create_uctx_in_bits {
1032410387
struct mlx5_ifc_uctx_bits uctx;
1032510388
};
1032610389

10390+
struct mlx5_ifc_create_uctx_out_bits {
10391+
u8 status[0x8];
10392+
u8 reserved_at_8[0x18];
10393+
10394+
u8 syndrome[0x20];
10395+
10396+
u8 reserved_at_40[0x10];
10397+
u8 uid[0x10];
10398+
10399+
u8 reserved_at_60[0x20];
10400+
};
10401+
1032710402
struct mlx5_ifc_destroy_uctx_in_bits {
1032810403
u8 opcode[0x10];
1032910404
u8 reserved_at_10[0x10];
@@ -10337,6 +10412,15 @@ struct mlx5_ifc_destroy_uctx_in_bits {
1033710412
u8 reserved_at_60[0x20];
1033810413
};
1033910414

10415+
struct mlx5_ifc_destroy_uctx_out_bits {
10416+
u8 status[0x8];
10417+
u8 reserved_at_8[0x18];
10418+
10419+
u8 syndrome[0x20];
10420+
10421+
u8 reserved_at_40[0x40];
10422+
};
10423+
1034010424
struct mlx5_ifc_create_sw_icm_in_bits {
1034110425
struct mlx5_ifc_general_obj_in_cmd_hdr_bits hdr;
1034210426
struct mlx5_ifc_sw_icm_bits sw_icm;

0 commit comments

Comments
 (0)