-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
dev_infiniband_rdma.txt
1468 lines (1317 loc) · 34.6 KB
/
dev_infiniband_rdma.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright 2019 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
# TODO: This needs some fixups according to PR review:
# https://github.com/google/syzkaller/pull/1053
# In the meantime, add it as is.
include <uapi/linux/fcntl.h>
include <rdma/ib_verbs.h>
include <rdma/rdma_user_ioctl.h>
include <rdma/ib_user_ioctl_verbs.h>
include <rdma/mlx5-abi.h>
include <uapi/rdma/ib_user_ioctl_cmds.h>
include <uapi/rdma/mlx5_user_ioctl_cmds.h>
# resources
resource fd_rdma[fd]
resource pd_handle[int32]
resource ah_handle[int32]
resource mr_handle[int32]
resource mr_rkey[int32]
resource mr_lkey[int32]
resource cq_handle[int32]
resource qp_handle[int32]
resource qp_number[int32]
resource mw_handle[int32]
resource srq_handle[int32]
resource xrcd_handle[int32]
resource wq_handle[int32]
resource ind_tbl_handle[int32]
resource flow_handle[int32]
# defines
define IB_USER_VERBS_EX_CMD_QUERY_DEVICE 0x80000001
define IB_USER_VERBS_EX_CMD_CREATE_FLOW 0x80000032
define IB_USER_VERBS_EX_CMD_DESTROY_FLOW 0x80000033
define MLX5_CREATE_DCT 0x8
define MLX5_CREATE_DCI 0x16
define IB_USER_VERBS_CMD_FLAG_EXTENDED 0x80000000
define IB_USER_VERBS_CMD_FLAGS_SHIFT 24
define IB_USER_VERBS_CMD_THRESHOLD 50
define IB_USER_VERBS_CMD_CREATE_CQ 0x12
define IB_USER_VERBS_CMD_CREATE_QP 0x18
define EX_CREATE_CQ_CMD IB_USER_VERBS_CMD_FLAG_EXTENDED | IB_USER_VERBS_CMD_CREATE_CQ
define EX_CREATE_QP_CMD IB_USER_VERBS_CMD_FLAG_EXTENDED | IB_USER_VERBS_CMD_CREATE_QP
# flags
rdma_dev_open_flags = O_RDWR, O_CLOEXEC
ib_access_flags = IB_ACCESS_LOCAL_WRITE, IB_ACCESS_REMOTE_WRITE, IB_ACCESS_REMOTE_READ, IB_ACCESS_REMOTE_ATOMIC, IB_ACCESS_MW_BIND, IB_ZERO_BASED, IB_ACCESS_ON_DEMAND
ib_mr_rereg_flags = IB_MR_REREG_TRANS, IB_MR_REREG_PD, IB_MR_REREG_ACCESS, IB_MR_REREG_SUPPORTED
ib_qp_type = IB_QPT_SMI, IB_QPT_GSI, IB_QPT_RC, IB_QPT_UC, IB_QPT_UD, IB_QPT_RAW_IPV6, IB_QPT_RAW_ETHERTYPE, IB_QPT_RAW_PACKET, IB_QPT_XRC_INI, IB_QPT_XRC_TGT
ib_qp_create_flags = IB_QP_CREATE_IPOIB_UD_LSO, IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK, IB_QP_CREATE_CROSS_CHANNEL, IB_QP_CREATE_MANAGED_SEND, IB_QP_CREATE_MANAGED_RECV, IB_QP_CREATE_NETIF_QP, IB_QP_CREATE_INTEGRITY_EN, IB_QP_CREATE_SCATTER_FCS
ib_send_flags = IB_SEND_FENCE, IB_SEND_SIGNALED, IB_SEND_SOLICITED, IB_SEND_INLINE, IB_SEND_IP_CSUM
ib_flow_flags = IB_FLOW_ATTR_FLAGS_DONT_TRAP
ib_ipv4_flags = IB_IPV4_DONT_FRAG, IB_IPV4_MORE_FRAG
mlx5_create_qp_flags = MLX5_QP_FLAG_SIGNATURE, MLX5_QP_FLAG_SCATTER_CQE, MLX5_QP_FLAG_TUNNEL_OFFLOADS, MLX5_QP_FLAG_BFREG_INDEX, MLX5_CREATE_DCT, MLX5_CREATE_DCI
mlx5_create_cq_flags = 0
create_cq_ex_flags = IB_UVERBS_CQ_FLAGS_TIMESTAMP_COMPLETION, IB_UVERBS_CQ_FLAGS_IGNORE_OVERRUN
create_cq_ex_mask = 0x0, 0x1
mlx5_comp_cqe_res_format = MLX5_IB_CQE_RES_FORMAT_HASH, MLX5_IB_CQE_RES_FORMAT_CSUM
wq_type = IB_WQT_RQ
create_wq_flags = IB_WQ_FLAGS_CVLAN_STRIPPING, IB_WQ_FLAGS_SCATTER_FCS, IB_WQ_FLAGS_DELAY_DROP, IB_WQ_FLAGS_PCI_WRITE_END_PADDING
modify_wq_attr_flags = IB_WQ_STATE, IB_WQ_CUR_STATE, IB_WQ_FLAGS
modify_wq_flags = IB_WQ_FLAGS_CVLAN_STRIPPING, IB_WQ_FLAGS_SCATTER_FCS, IB_WQ_FLAGS_DELAY_DROP, IB_WQ_FLAGS_PCI_WRITE_END_PADDING
srq_type = IB_SRQT_BASIC, IB_SRQT_XRC, IB_SRQT_TM
create_srq_ex_flags = MLX5_SRQ_FLAG_SIGNATURE
# structs
# =======
# context
# ===========
mlx5_get_context_cmd_resp {
async_fd fd
num_comp_vectors int32
qp_tab_size int32
bf_reg_size int32
tot_uuars int32
cache_line_size int32
max_sq_desc_sz int16
max_rq_desc_sz int16
max_send_wqebb int32
max_recv_wr int32
max_srq_recv_wr int32
num_ports int16
reserved1 const[0x0, int16]
comp_mask int32[0:1]
response_length int32
cqe_version_cmds_supp_uhw int16
reserved2 const[0x0, int16]
hca_core_clock_offset int64
log_uar_size int32
num_uars_per_page int32
num_dyn_bfregs int32
reserved3 const[0x0, int32]
}
mlx5_get_context_cmd {
# TODO: are there named consts for commands?
command const[0x0, int32]
# TODO: these probably should be replaced with bytesize8 of something.
in_words const[0xc, int16]
out_words const[0x12, int16]
response ptr[out, mlx5_get_context_cmd_resp]
total_num_uuars int32
num_low_latency_uuars int32
flags int32
comp_mask int32
cqe_version int16
reserved1 const[0x0, int16]
reserved2 const[0x0, int32]
lib_caps int64
}
# query_device
# ================
query_device_resp_ex {
fw_ver int64
node_guid int64
sys_image_guid int64
max_mr_size int64
page_size_cap int64
vendor_id int32
vendor_part_id int32
hw_ver int32
max_qp int32
max_qp_wr int32
device_cap_flags int32
max_sge int32
max_sge_rd int32
max_cq int32
max_cqe int32
max_mr int32
max_qp_rd_atom int32
max_ee_rd_atom int32
max_res_rd_atom int32
max_qp_init_rd_atom int32
max_ee_init_rd_atom int32
atomic_cap int32
max_ee int32
max_rdd int32
max_mw int32
max_raw_ipv6_qp int32
max_raw_ethy_qp int32
max_mcast_grp int32
max_mcast_qp_attach int32
max_total_mcast_qp_attach int32
max_ah int32
max_fmr int32
max_map_per_fmr int32
max_srq int32
max_srq_wr int32
max_srq_sge int32
max_pkeys int16
local_ca_ack_delay int8
phys_port_cnt int8
reserved const[0x0, int32]
comp_mask const[0x0, int32]
response_length int32
general_caps int64
rc_odp_caps int32
uc_odp_caps int32
ud_odp_caps int32
reserved_odp const[0x0, int32]
timestamp_mask int64
hca_core_clock int64
device_cap_flags_ex int64
supported_qpts int32
max_rwq_indirection_tables int32
max_rwq_indirection_table_size int32
reserved_rss const[0x0, int32]
max_wq_type_rq int32
raw_packet_caps int32
max_rndv_hdr_size int32
max_num_tags int32
flags int32
max_ops int32
max_sge_tm int32
reserved_tm int32
max_cq_moderation_count int16
max_cq_moderation_period int16
reserved_cq_mod int32
max_dm_size int64
}
query_device_cmd_ex {
command const[IB_USER_VERBS_EX_CMD_QUERY_DEVICE, int32]
in_words const[0x1, int16]
out_words bytesize4[response, int16]
response ptr[out, query_device_resp_ex]
provider_in_words const[0x0, int16]
provider_out_words const[0x8, int16]
reserved const[0x0, int32]
comp_mask const[0x0, int32]
reserved1 const[0x0, int32]
}
# query_port
# ==============
query_port_cmd {
command const[0x2, int32]
in_words const[0x6, int16]
out_words const[0xa, int16]
response int64
port_num const[0x1, int8]
reserved array[int8, 7]
driver_data array[int64]
}
# pd
# ======
alloc_pd_cmd {
command const[0x3, int32]
in_words bytesize4[parent, int16]
out_words bytesize4[response, int16]
response ptr[out, alloc_pd_cmd_resp]
driver_data array[int64]
}
mlx5_alloc_pd_cmd {
command const[0x3, int32]
in_words bytesize4[parent, int16]
out_words bytesize4[response, int16]
response ptr[out, mlx5_alloc_pd_cmd_resp]
driver_data array[int64]
}
alloc_pd_cmd_resp {
pd_handle pd_handle
}
mlx5_alloc_pd_cmd_resp {
pd_handle pd_handle
pdn int32
}
dealloc_pd_cmd {
command const[0x4, int32]
in_words const[0x6, int16]
out_words const[0, int16]
pd_handle pd_handle
}
# ah
# ===
create_ah_cmd_resp {
ah_handle ah_handle
}
create_ah_cmd {
command const[0x5, int32]
in_words bytesize4[parent, int16]
out_words bytesize4[response, int16]
response ptr[out, create_ah_cmd_resp]
user_handle int64
pd_handle pd_handle
reserved const[0x0, int32]
dgid array[int8, 16]
flow_label int32
sgid_index const[0x0, int8]
hop_limit int8
traffic_class int8
reserved1 int8
dlid int16
sl int8
src_path_bits int8
static_rate int8
is_global int8
port_num const[0x1, int8]
reserved2 int8
}
destroy_ah_cmd {
command const[0x8, int32]
in_words bytesize4[parent, int16]
out_words const[0x0, int16]
}
# mr
# ======
reg_mr_resp {
mr_handle mr_handle
lkey mr_lkey
rkey mr_rkey
}
reg_mr_cmd {
command const[0x9, int32]
in_words const[0xc, int16]
out_words const[0x3, int16]
response ptr[out, reg_mr_resp]
start ptr[in, int64]
length len[start, int64]
hca_va ptr[out, int64]
pd_handle pd_handle
access_flags flags[ib_access_flags, int32]
driver_data array[int64]
}
rereg_mr_resp {
lkey mr_lkey
rkey mr_rkey
}
rereg_mr_cmd {
command const[0xb, int32]
in_words const[0xe, int16]
out_words const[0x2, int16]
response ptr[out, rereg_mr_resp]
mr_handle mr_handle
flags flags[ib_mr_rereg_flags, int32]
start ptr[in, int64]
length len[start, int64]
hca_va ptr[out, int64]
pd_handle pd_handle
access_flags flags[ib_access_flags, int32]
driver_data array[int64]
}
dereg_mr_cmd {
command const[0xd, int32]
in_words const[0x3, int16]
out_words const[0x0, int16]
mr_handle mr_handle
}
alloc_mw_resp {
mw_handle mw_handle
rkey mr_rkey
}
alloc_mw_cmd {
command const[0xe, int32]
in_words const[0x6, int16]
out_words const[0x2, int16]
response ptr[out, alloc_mw_resp]
pd_handle pd_handle
mw_type int8[1:2]
reserved0 const[0x0, int8]
reserved1 const[0x0, int16]
}
dealloc_mw_cmd {
command const[0x10, int32]
in_words const[0x4, int16]
out_words const[0x0, int16]
mw_handle mw_handle
reserved const[0x0, int32]
}
# completion channel
# ==================
create_comp_channel_resp {
fd fd
}
create_comp_channel_cmd {
command const[0x11, int32]
in_words const[0x6, int16]
out_words const[0x1, int16]
response ptr[out, create_comp_channel_resp]
}
# cq
# ======
create_cq_resp {
cq_handle cq_handle
cqe int32
}
mlx5_create_cq_cmd {
command const[EX_CREATE_CQ_CMD, int32]
in_words bytesize4[parent, int16]
out_words bytesize4[response, int16]
response ptr[out, create_cq_resp]
provider_in_words const[0x5, int16]
provider_out_words const[0x1, int16]
reserved0 const[0x0, int32]
user_handle int64
cqe int32
comp_vector int32
comp_channel const[0xffffffff, int32]
comp_mask flags[create_cq_ex_mask, int32]
reserved1 const[0x0, int32]
buf_addr ptr[in, array[int8, 4096]]
db_addr ptr[in, array[int8, 4096]]
cqe_size const[0x40, int32]
cqe_comp_en int8[0:1]
cqe_comp_res_format flags[mlx5_comp_cqe_res_format, int8]
flags flags[mlx5_create_cq_flags, int16]
}
# this fails a lot on Mellanox HW. Leaving for others providers' sake and
# adding mlx5_create_cq instead, which defines driver data properly.
create_cq_cmd {
command const[0x12, int32]
in_words const[0x10, int16]
out_words const[0x3, int16]
reponse ptr[out, create_cq_resp]
user_handle int64
cqe int32
comp_vector int32
comp_channel int32
reserved const[0x0, int32]
driver_data array[int64]
}
create_cq_ex_cmd {
command const[EX_CREATE_CQ_CMD, int32]
in_words const[0x4, int16]
out_words const[0x2, int16]
response ptr[out, create_cq_resp]
provider_in_words const[0x5, int16]
provider_out_words const[0x1, int16]
reserved0 const[0x0, int32]
user_handle int64
cqe int32
comp_vector const[0x0, int32]
comp_channel const[0xffffffff, int32]
comp_mask flags[create_cq_ex_mask, int32]
flags flags[create_cq_ex_flags, int32]
reserved1 const[0x0, int32]
}
resize_cq_resp {
cqe int32
reserved const[0x0, int32]
driver_data array[int64]
}
resize_cq_cmd {
command const[0x13, int32]
in_words const[0xa, int16]
out_words const[0x2, int16]
response ptr[out, resize_cq_resp]
cq_handle cq_handle
cqe int32
driver_data array[int64]
}
destroy_cq_resp {
comp_events_reported int32
async_events_reported int32
}
destroy_cq_cmd {
command const[0x14, int32]
in_words const[0x6, int16]
out_words const[0x2, int16]
response ptr[out, destroy_cq_resp]
cq_handle cq_handle
reserved const[0x0, int32]
}
kern_wc {
wr_id int64
status int32
opcode int32
vendor_err int32
byte_len int32
imm_data int32
qp_num int32
src_qp int32
wc_flags int32
pkey_index int16
slid int16
sl int8
dlid_path_bits int8
port_num int8
reserved const[0x0, int8]
}
poll_cq_resp {
count int32
reserved const[0x0, int32]
wc array[kern_wc]
}
poll_cq_cmd {
command const[0x15, int32]
in_words const[0x6, int16]
out_words const[0x2, int16]
response ptr[out, poll_cq_resp]
cq_handle cq_handle
ne int32
}
req_notify_cq_cmd {
command const[0x17, int32]
in_words const[0x4, int16]
out_words const[0x0, int16]
cq_handle cq_handle
solicited int32[0x0:0x1]
}
# qp_ex
# =========
create_qp_resp {
qp_handle qp_handle
qpn qp_number
max_send_wr int32
max_recv_wr int32
max_send_sge int32
max_recv_sge int32
max_inline_data int32
reserved const[0x0, int32]
}
create_qp_cmd {
command const[0x18, int32]
in_words bytesize4[parent, int16]
out_words bytesize4[response, int16]
response ptr[out, create_qp_resp]
user_handle int64
pd_handle pd_handle
send_cq_handle cq_handle
recv_cq_handle cq_handle
srq_handle srq_handle
max_send_wr int32
max_recv_wr int32
max_send_sge int32
max_recv_sge int32
max_inline_data int32
sq_sig_all int8
qp_type flags[ib_qp_type, int8]
is_srq int8[0:1]
reserved1 const[0x0, int8]
driver_data array[int64]
}
mlx5_create_qp_cmd {
command const[EX_CREATE_QP_CMD, int32]
in_words bytesize4[parent, int16]
out_words bytesize4[response, int16]
response ptr[out, create_qp_resp]
user_handle int64
pd_handle pd_handle
send_cq_handle cq_handle
recv_cq_handle cq_handle
srq_handle srq_handle
max_send_wr int32
max_recv_wr int32
max_send_sge int32
max_recv_sge int32
max_inline_data int32
sq_sig_all int8
qp_type flags[ib_qp_type, int8]
is_srq int8[0:1]
reserved0 const[0x0, int8]
buf_addr ptr[in, array[int8, 4096]]
db_addr ptr[in, array[int8, 4096]]
sq_wqe_count int32
rq_wqe_count int32
rq_wqe_shift int32
flags flags[mlx5_create_qp_flags, int32]
uidx int32
bfreg_index int32
sq_buf_addr ptr[in, array[int8, 4096]]
} [packed]
mlx5_create_qp_resp {
qp_handle qp_handle
qpn qp_number
max_send_wr int32
max_recv_wr int32
max_send_sge int32
max_recv_sge int32
max_inline_data int32
reserved0 const[0x0, int32]
uuar_index int32
}
mlx5_create_dv_qp_cmd {
command const[0x18, int32]
in_words const[0x1c, int16]
out_words const[0x9, int16]
response ptr[out, mlx5_create_qp_resp]
user_handle int64
pd_handle pd_handle
send_cq_handle cq_handle
recv_cq_handle cq_handle
srq_handle srq_handle
max_send_wr int32
max_recv_wr int32
max_send_sge int32
max_recv_sge int32
max_inline_data int32
sq_sig_all int8
qp_type const[0xff, int8]
is_srq int8
reserved0 const[0x0, int8]
driver_data array[int64]
buf_addr ptr[in, array[int8, 4096]]
db_addr ptr[in, array[int8, 4096]]
sq_wqe_count int32
rq_wqe_count int32
rq_wqe_shift int32
flags int32
uidx int32
reserved1 const[0x0, int32]
access_key int64
} [packed]
destroy_qp_resp {
events_reported int32
}
destroy_qp_cmd {
command const[0x1b, int32]
in_words const[0x6, int16]
out_words const[0x1, int16]
response ptr[out, destroy_qp_resp]
qp_handle qp_handle
reserved const[0x0, int32]
}
query_qp_resp {
dest_dgid array[int8, 16]
dest_flow_label int32
dest_dlid int16
dest_reserved const[0x0, int16]
dest_sgid_index int8
dest_hop_limit int8
dest_traffic_class int8
dest_sl int8
dest_src_path_bits int8
dest_static_rate int8
dest_is_global int8
dest_port_num int8
alt_dest_dgid array[int8, 16]
alt_dest_flow_label int32
alt_dest_dlid int16
alt_dest_reserved const[0x0, int16]
alt_dest_sgid_index int8
alt_dest_hop_limit int8
alt_dest_traffic_class int8
alt_dest_sl int8
alt_dest_src_path_bits int8
alt_dest_static_rate int8
alt_dest_is_global int8
alt_dest_port_num int8
max_send_wr int32
max_recv_wr int32
max_send_sge int32
max_recv_sge int32
max_inline_data int32
qkey int32
rq_psn int32
sq_psn int32
dest_qp_num int32
qp_access_flags int32
pkey_index int16
alt_pkey_index int16
qp_state int8
cur_qp_state int8
path_mtu int8
path_mig_state int8
sq_draining int8
max_rd_atomic int8
max_dest_rd_atomic int8
min_rnr_timer int8
port_num int8
timeout int8
retry_cnt int8
rnr_retry int8
alt_port_num int8
alt_timeout int8
sq_sig_all int8
reserved0 const[0x0, int8]
reserved1 const[0x0, int32]
driver_data array[int64]
}
query_qp_cmd {
command const[0x19, int32]
in_words const[0x6, int16]
out_words const[0x20, int16]
response ptr[out, query_qp_resp]
qp_handle qp_handle
attr_mask flags[ib_qp_create_flags, int32]
driver_data array[int64]
}
modify_qp_cmd {
command const[0x1a, int32]
in_words const[0x1e, int16]
out_words const[0x0, int16]
dest_dgid array[int8, 16]
dest_flow_label int32
dest_dlid int16
dest_reserved int16
dest_sgid_index int8
dest_hop_limit int8
dest_traffic_class int8
dest_sl int8
dest_src_path_bits int8
dest_static_rate int8
dest_is_global int8
dest_port_num int8
alt_dest_dgid array[int8, 16]
alt_dest_flow_label int32
alt_dest_dlid int16
alt_dest_reserved int16
alt_dest_sgid_index int8
alt_dest_hop_limit int8
alt_dest_traffic_class int8
alt_dest_sl int8
alt_dest_src_path_bits int8
alt_dest_static_rate int8
alt_dest_is_global int8
alt_dest_port_num int8
qp_handle int32
attr_mask int32
qkey int32
rq_psn int32
sq_psn int32
dest_qp_num int32
qp_access_flags int32
pkey_index int16
alt_pkey_index int16
qp_state int8
cur_qp_state int8
path_mtu int8
path_mig_state int8
en_sqd_async_notify int8
max_rd_atomic int8
max_dest_rd_atomic int8
min_rnr_timer int8
port_num int8
timeout int8
retry_cnt int8
rnr_retry int8
alt_port_num int8
alt_timeout int8
reserved const[0x0, int16]
}
# wq
#====
create_wq_resp {
comp_mask int32
response_length int32
wq_handle wq_handle
max_wr int32
max_sge int32
wqn int32
}
create_wq_cmd {
command const[0x80000034, int32]
in_words const[0x5, int16]
out_words bytesize4[response, int16]
response ptr[out, create_wq_resp]
provider_in_words const[0x6, int16]
provider_out_words const[0x1, int16]
cmd_hdr_reserved const[0x0, int32]
comp_mask const[0x0, int32]
wq_type flags[wq_type, int32]
user_handle int64
pd_handle pd_handle
cq_handle cq_handle
max_wr int32
max_sge int32
create_flags flags[create_wq_flags, int32]
reserved const[0x0, int32]
}
mlx5_create_wq_resp {
comp_mask int32
response_length const[0x6, int32]
wq_handle wq_handle
max_wr int32
max_sge int32
wqn int32
mlx5_response_length bytesize4[parent, int32]
reserver const[0x0, int32]
}
mlx5_create_wq_cmd {
command const[0x80000034, int32]
in_words const[0x5, int16]
out_words bytesize4[response, int16]
response ptr[out, mlx5_create_wq_resp]
provider_in_words const[0x6, int16]
provider_out_words const[0x1, int16]
cmd_hdr_reserved const[0x0, int32]
comp_mask const[0x0, int32]
wq_type flags[wq_type, int32]
user_handle int64
pd_handle pd_handle
cq_handle cq_handle
max_wr int32
max_sge int32
create_flags flags[create_wq_flags, int32]
reserved const[0x0, int32]
buf_addr ptr[in, array[int8, 4096]]
db_addr ptr[in, array[int8, 4096]]
rq_wqe_count int32
rq_wqe_shift int32
user_index int32
flags const[0x0, int32]
provider_comp_mask const[0x0, int32]
single_stride_log_num_of_bytes const[0x0, int32]
single_wqe_log_num_of_strides const[0x0, int32]
two_byte_shift_en int32[0:1]
}
destroy_wq_resp {
comp_mask int32
response_length int32
events_reported int32
reserved const[0x0, int32]
}
destroy_wq_cmd {
command const[0x80000036, int32]
in_words const[0x1, int16]
out_words const[0x2, int16]
response ptr[out, destroy_wq_resp]
provider_in_words const[0x0, int16]
provider_out_words const[0x0, int16]
cmd_hdr_reserved const[0x0, int32]
comp_mask int32[0x0:0xf]
wq_handle wq_handle
}
mlx5_modify_wq_cmd {
command const[0x80000035, int32]
in_words const[0x3, int16]
out_words const[0x0, int16]
response const[0x0, int64]
provider_in_words const[0x1, int16]
provider_out_words const[0x0, int16]
cmd_hdr_reserved const[0x0, int32]
attr_mask flags[modify_wq_attr_flags, int32]
wq_handle wq_handle
wq_state int32[0:3]
current_wq_state int32[0:3]
flags flags[modify_wq_flags, int32]
flags_mask flags[modify_wq_flags, int32]
comp_mask const[0x0, int32]
reserved const[0x0, int32]
}
# RSS (indirection table)
#========================
create_rwq_ind_table_resp {
comp_mask int32
response_length bytesize4[parent, int32]
ind_tbl_handle ind_tbl_handle
ind_tbl_num int32
}
# currently hard coded to use 2 WQs. Need to figure out how to
# make it a variable.
create_rwq_ind_table_cmd {
command const[0x80000037, int32]
in_words const[0x2, int16]
out_words const[0x2, int16]
response ptr[out, create_rwq_ind_table_resp]
provider_in_words const[0x0, int16]
provider_out_words const[0x0, int16]
cmd_hdr_reserved const[0x0, int32]
comp_mask const[0x0, int32]
log_ind_tbl_size const[0x1, int32]
wq_handles array[wq_handle, 2]
}
destroy_rwq_ind_table_cmd {
comp_mask int32
ind_tbl_handle ind_tbl_handle
}
# Send WR
#========
rdma {
remote_addr int64
rkey mr_rkey
reserved const[0x0, int32]
}
atomic {
remote_addr int64
compare_add int64
swap int64
rkey mr_rkey
reserved const[0x0, int32]
}
ud {
ah int32
remote_qpn int32
remote_qkey int32
reserved const[0x0, int32]
}
xrc {
remote_srqn int32
}
wr [
rdma rdma
atomic atomic
ud ud
]
kern_send_wr {
wr_id int64
num_sge int32
opcode int32[0:20]
send_flags flags[ib_send_flags, int32]
imm_data int32
wr wr
qp_type xrc
}
post_send_cmd {
command const[0x1c, int32]
in_words const[0x8, int16]
out_words const[0x1, int16]
response ptr[out, post_send_resp]
qp_handle qp_handle
wr_count int32
sge_count int32
wqe_size int32
send_wr array[kern_send_wr]
}
post_send_resp {
bad_wr int32
}
post_recv_cmd {
command const[0x1d, int32]
in_words const[0x8, int16]
out_words const[0x1, int16]
response ptr[out, post_recv_resp]
qp_handle qp_handle
wr_count int32
sge_count int32
wqe_size int32
recv_wr array[kern_recv_wr]
}
post_recv_resp {
bad_wr int32
}
attach_mcast_cmd {
command const[0x1e, int32]
in_words const[0x8, int16]
out_words const[0x0, int16]
gid array[int8, 0x10]
qp_handle qp_handle
mlid int16
reserved const[0x0, int16]
driver_data array[int64]
}
detach_mcast_cmd {
command const[0x1f, int32]
in_words const[0x8, int16]
out_words const[0x0, int16]
gid array[int8, 0x10]
qp_handle qp_handle
mlid int16
reserved const[0x0, int16]
driver_data array[int64]
}
create_srq_resp {
srq_handle srq_handle
max_wr int32
max_sge int32
srqn int32
}
create_srq_cmd {
command const[0x20, int32]
in_words const[0xa, int16]
out_words const[0x4, int16]
response ptr[out, create_srq_resp]
user_handle int64
pd_handle pd_handle
max_wr int32
max_sge int32
srq_limit int32
driver_data array[int64]