rdma 0.3.0

Low-level RDMA API
Documentation
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
/* automatically generated by rust-bindgen 0.59.2 */

pub const IBV_ACCESS_OPTIONAL_FIRST: u32 = 1048576;
pub const IBV_DEVICE_RAW_SCATTER_FCS: u64 = 17179869184;
pub const IBV_DEVICE_PCI_WRITE_END_PADDING: u64 = 68719476736;
pub const IBV_PATH_RECORD_REVERSIBLE: u32 = 128;
pub const IBV_PATH_FLAG_GMP: u32 = 1;
pub const IBV_PATH_FLAG_PRIMARY: u32 = 2;
pub const IBV_PATH_FLAG_ALTERNATE: u32 = 4;
pub const IBV_PATH_FLAG_OUTBOUND: u32 = 8;
pub const IBV_PATH_FLAG_INBOUND: u32 = 16;
pub const IBV_PATH_FLAG_INBOUND_REVERSE: u32 = 32;
pub const IBV_PATH_FLAG_BIDIRECTIONAL: u32 = 40;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __uint16_t = ::std::os::raw::c_ushort;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __uint64_t = ::std::os::raw::c_ulong;
pub type __time_t = ::std::os::raw::c_long;
pub type __syscall_slong_t = ::std::os::raw::c_long;
pub type __socklen_t = ::std::os::raw::c_uint;
pub type __u16 = ::std::os::raw::c_ushort;
pub type __u32 = ::std::os::raw::c_uint;
pub type __u64 = ::std::os::raw::c_ulonglong;
pub type __be16 = __u16;
pub type __be32 = __u32;
pub type __be64 = __u64;
pub const IB_UVERBS_FLOW_ACTION_ESP_KEYMAT_AES_GCM: ib_uverbs_flow_action_esp_keymat = 0;
pub type ib_uverbs_flow_action_esp_keymat = ::std::os::raw::c_uint;
pub const IB_UVERBS_FLOW_ACTION_ESP_REPLAY_NONE: ib_uverbs_flow_action_esp_replay = 0;
pub const IB_UVERBS_FLOW_ACTION_ESP_REPLAY_BMP: ib_uverbs_flow_action_esp_replay = 1;
pub type ib_uverbs_flow_action_esp_replay = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ib_uverbs_flow_action_esp_encap {
    pub __bindgen_anon_1: ib_uverbs_flow_action_esp_encap__bindgen_ty_1,
    pub __bindgen_anon_2: ib_uverbs_flow_action_esp_encap__bindgen_ty_2,
    pub len: __u16,
    pub type_: __u16,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ib_uverbs_flow_action_esp_encap__bindgen_ty_1 {
    pub val_ptr: *mut ::std::os::raw::c_void,
    pub val_ptr_data_u64: __u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ib_uverbs_flow_action_esp_encap__bindgen_ty_2 {
    pub next_ptr: *mut ib_uverbs_flow_action_esp_encap,
    pub next_ptr_data_u64: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ib_uverbs_flow_action_esp {
    pub spi: __u32,
    pub seq: __u32,
    pub tfc_pad: __u32,
    pub flags: __u32,
    pub hard_limit_pkts: __u64,
}
pub const IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH: ib_uverbs_advise_mr_advice = 0;
pub const IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH_WRITE: ib_uverbs_advise_mr_advice = 1;
pub const IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH_NO_FAULT: ib_uverbs_advise_mr_advice = 2;
pub type ib_uverbs_advise_mr_advice = ::std::os::raw::c_uint;
pub const RDMA_DRIVER_UNKNOWN: rdma_driver_id = 0;
pub const RDMA_DRIVER_MLX5: rdma_driver_id = 1;
pub const RDMA_DRIVER_MLX4: rdma_driver_id = 2;
pub const RDMA_DRIVER_CXGB3: rdma_driver_id = 3;
pub const RDMA_DRIVER_CXGB4: rdma_driver_id = 4;
pub const RDMA_DRIVER_MTHCA: rdma_driver_id = 5;
pub const RDMA_DRIVER_BNXT_RE: rdma_driver_id = 6;
pub const RDMA_DRIVER_OCRDMA: rdma_driver_id = 7;
pub const RDMA_DRIVER_NES: rdma_driver_id = 8;
pub const RDMA_DRIVER_I40IW: rdma_driver_id = 9;
pub const RDMA_DRIVER_IRDMA: rdma_driver_id = 9;
pub const RDMA_DRIVER_VMW_PVRDMA: rdma_driver_id = 10;
pub const RDMA_DRIVER_QEDR: rdma_driver_id = 11;
pub const RDMA_DRIVER_HNS: rdma_driver_id = 12;
pub const RDMA_DRIVER_USNIC: rdma_driver_id = 13;
pub const RDMA_DRIVER_RXE: rdma_driver_id = 14;
pub const RDMA_DRIVER_HFI1: rdma_driver_id = 15;
pub const RDMA_DRIVER_QIB: rdma_driver_id = 16;
pub const RDMA_DRIVER_EFA: rdma_driver_id = 17;
pub const RDMA_DRIVER_SIW: rdma_driver_id = 18;
pub type rdma_driver_id = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub union ibv_gid {
    pub raw: [u8; 16usize],
    pub global: ibv_gid__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_gid__bindgen_ty_1 {
    pub subnet_prefix: __be64,
    pub interface_id: __be64,
}
pub const IBV_GID_TYPE_IB: ibv_gid_type = 0;
pub const IBV_GID_TYPE_ROCE_V1: ibv_gid_type = 1;
pub const IBV_GID_TYPE_ROCE_V2: ibv_gid_type = 2;
pub type ibv_gid_type = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ibv_gid_entry {
    pub gid: ibv_gid,
    pub gid_index: u32,
    pub port_num: u32,
    pub gid_type: u32,
    pub ndev_ifindex: u32,
}
pub const IBV_NODE_UNKNOWN: ibv_node_type = -1;
pub const IBV_NODE_CA: ibv_node_type = 1;
pub const IBV_NODE_SWITCH: ibv_node_type = 2;
pub const IBV_NODE_ROUTER: ibv_node_type = 3;
pub const IBV_NODE_RNIC: ibv_node_type = 4;
pub const IBV_NODE_USNIC: ibv_node_type = 5;
pub const IBV_NODE_USNIC_UDP: ibv_node_type = 6;
pub const IBV_NODE_UNSPECIFIED: ibv_node_type = 7;
pub type ibv_node_type = ::std::os::raw::c_int;
pub const IBV_TRANSPORT_UNKNOWN: ibv_transport_type = -1;
pub const IBV_TRANSPORT_IB: ibv_transport_type = 0;
pub const IBV_TRANSPORT_IWARP: ibv_transport_type = 1;
pub const IBV_TRANSPORT_USNIC: ibv_transport_type = 2;
pub const IBV_TRANSPORT_USNIC_UDP: ibv_transport_type = 3;
pub const IBV_TRANSPORT_UNSPECIFIED: ibv_transport_type = 4;
pub type ibv_transport_type = ::std::os::raw::c_int;
pub const IBV_DEVICE_RESIZE_MAX_WR: ibv_device_cap_flags = 1;
pub const IBV_DEVICE_BAD_PKEY_CNTR: ibv_device_cap_flags = 2;
pub const IBV_DEVICE_BAD_QKEY_CNTR: ibv_device_cap_flags = 4;
pub const IBV_DEVICE_RAW_MULTI: ibv_device_cap_flags = 8;
pub const IBV_DEVICE_AUTO_PATH_MIG: ibv_device_cap_flags = 16;
pub const IBV_DEVICE_CHANGE_PHY_PORT: ibv_device_cap_flags = 32;
pub const IBV_DEVICE_UD_AV_PORT_ENFORCE: ibv_device_cap_flags = 64;
pub const IBV_DEVICE_CURR_QP_STATE_MOD: ibv_device_cap_flags = 128;
pub const IBV_DEVICE_SHUTDOWN_PORT: ibv_device_cap_flags = 256;
pub const IBV_DEVICE_INIT_TYPE: ibv_device_cap_flags = 512;
pub const IBV_DEVICE_PORT_ACTIVE_EVENT: ibv_device_cap_flags = 1024;
pub const IBV_DEVICE_SYS_IMAGE_GUID: ibv_device_cap_flags = 2048;
pub const IBV_DEVICE_RC_RNR_NAK_GEN: ibv_device_cap_flags = 4096;
pub const IBV_DEVICE_SRQ_RESIZE: ibv_device_cap_flags = 8192;
pub const IBV_DEVICE_N_NOTIFY_CQ: ibv_device_cap_flags = 16384;
pub const IBV_DEVICE_MEM_WINDOW: ibv_device_cap_flags = 131072;
pub const IBV_DEVICE_UD_IP_CSUM: ibv_device_cap_flags = 262144;
pub const IBV_DEVICE_XRC: ibv_device_cap_flags = 1048576;
pub const IBV_DEVICE_MEM_MGT_EXTENSIONS: ibv_device_cap_flags = 2097152;
pub const IBV_DEVICE_MEM_WINDOW_TYPE_2A: ibv_device_cap_flags = 8388608;
pub const IBV_DEVICE_MEM_WINDOW_TYPE_2B: ibv_device_cap_flags = 16777216;
pub const IBV_DEVICE_RC_IP_CSUM: ibv_device_cap_flags = 33554432;
pub const IBV_DEVICE_RAW_IP_CSUM: ibv_device_cap_flags = 67108864;
pub const IBV_DEVICE_MANAGED_FLOW_STEERING: ibv_device_cap_flags = 536870912;
pub type ibv_device_cap_flags = ::std::os::raw::c_uint;
pub const IBV_FORK_DISABLED: ibv_fork_status = 0;
pub const IBV_FORK_ENABLED: ibv_fork_status = 1;
pub const IBV_FORK_UNNEEDED: ibv_fork_status = 2;
pub type ibv_fork_status = ::std::os::raw::c_uint;
pub const IBV_ATOMIC_NONE: ibv_atomic_cap = 0;
pub const IBV_ATOMIC_HCA: ibv_atomic_cap = 1;
pub const IBV_ATOMIC_GLOB: ibv_atomic_cap = 2;
pub type ibv_atomic_cap = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_alloc_dm_attr {
    pub length: usize,
    pub log_align_req: u32,
    pub comp_mask: u32,
}
pub const IBV_DM_MASK_HANDLE: ibv_dm_mask = 1;
pub type ibv_dm_mask = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_dm {
    pub context: *mut ibv_context,
    pub memcpy_to_dm: ::std::option::Option<
        unsafe extern "C" fn(
            dm: *mut ibv_dm,
            dm_offset: u64,
            host_addr: *const ::std::os::raw::c_void,
            length: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub memcpy_from_dm: ::std::option::Option<
        unsafe extern "C" fn(
            host_addr: *mut ::std::os::raw::c_void,
            dm: *mut ibv_dm,
            dm_offset: u64,
            length: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub comp_mask: u32,
    pub handle: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_device_attr {
    pub fw_ver: [::std::os::raw::c_char; 64usize],
    pub node_guid: __be64,
    pub sys_image_guid: __be64,
    pub max_mr_size: u64,
    pub page_size_cap: u64,
    pub vendor_id: u32,
    pub vendor_part_id: u32,
    pub hw_ver: u32,
    pub max_qp: ::std::os::raw::c_int,
    pub max_qp_wr: ::std::os::raw::c_int,
    pub device_cap_flags: ::std::os::raw::c_uint,
    pub max_sge: ::std::os::raw::c_int,
    pub max_sge_rd: ::std::os::raw::c_int,
    pub max_cq: ::std::os::raw::c_int,
    pub max_cqe: ::std::os::raw::c_int,
    pub max_mr: ::std::os::raw::c_int,
    pub max_pd: ::std::os::raw::c_int,
    pub max_qp_rd_atom: ::std::os::raw::c_int,
    pub max_ee_rd_atom: ::std::os::raw::c_int,
    pub max_res_rd_atom: ::std::os::raw::c_int,
    pub max_qp_init_rd_atom: ::std::os::raw::c_int,
    pub max_ee_init_rd_atom: ::std::os::raw::c_int,
    pub atomic_cap: ibv_atomic_cap,
    pub max_ee: ::std::os::raw::c_int,
    pub max_rdd: ::std::os::raw::c_int,
    pub max_mw: ::std::os::raw::c_int,
    pub max_raw_ipv6_qp: ::std::os::raw::c_int,
    pub max_raw_ethy_qp: ::std::os::raw::c_int,
    pub max_mcast_grp: ::std::os::raw::c_int,
    pub max_mcast_qp_attach: ::std::os::raw::c_int,
    pub max_total_mcast_qp_attach: ::std::os::raw::c_int,
    pub max_ah: ::std::os::raw::c_int,
    pub max_fmr: ::std::os::raw::c_int,
    pub max_map_per_fmr: ::std::os::raw::c_int,
    pub max_srq: ::std::os::raw::c_int,
    pub max_srq_wr: ::std::os::raw::c_int,
    pub max_srq_sge: ::std::os::raw::c_int,
    pub max_pkeys: u16,
    pub local_ca_ack_delay: u8,
    pub phys_port_cnt: u8,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_query_device_ex_input {
    pub comp_mask: u32,
}
pub const IBV_ODP_SUPPORT_SEND: ibv_odp_transport_cap_bits = 1;
pub const IBV_ODP_SUPPORT_RECV: ibv_odp_transport_cap_bits = 2;
pub const IBV_ODP_SUPPORT_WRITE: ibv_odp_transport_cap_bits = 4;
pub const IBV_ODP_SUPPORT_READ: ibv_odp_transport_cap_bits = 8;
pub const IBV_ODP_SUPPORT_ATOMIC: ibv_odp_transport_cap_bits = 16;
pub const IBV_ODP_SUPPORT_SRQ_RECV: ibv_odp_transport_cap_bits = 32;
pub type ibv_odp_transport_cap_bits = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_odp_caps {
    pub general_caps: u64,
    pub per_transport_caps: ibv_odp_caps__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_odp_caps__bindgen_ty_1 {
    pub rc_odp_caps: u32,
    pub uc_odp_caps: u32,
    pub ud_odp_caps: u32,
}
pub const IBV_ODP_SUPPORT: ibv_odp_general_caps = 1;
pub const IBV_ODP_SUPPORT_IMPLICIT: ibv_odp_general_caps = 2;
pub type ibv_odp_general_caps = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_tso_caps {
    pub max_tso: u32,
    pub supported_qpts: u32,
}
pub const IBV_RX_HASH_FUNC_TOEPLITZ: ibv_rx_hash_function_flags = 1;
pub type ibv_rx_hash_function_flags = ::std::os::raw::c_uint;
pub const IBV_RX_HASH_SRC_IPV4: ibv_rx_hash_fields = 1;
pub const IBV_RX_HASH_DST_IPV4: ibv_rx_hash_fields = 2;
pub const IBV_RX_HASH_SRC_IPV6: ibv_rx_hash_fields = 4;
pub const IBV_RX_HASH_DST_IPV6: ibv_rx_hash_fields = 8;
pub const IBV_RX_HASH_SRC_PORT_TCP: ibv_rx_hash_fields = 16;
pub const IBV_RX_HASH_DST_PORT_TCP: ibv_rx_hash_fields = 32;
pub const IBV_RX_HASH_SRC_PORT_UDP: ibv_rx_hash_fields = 64;
pub const IBV_RX_HASH_DST_PORT_UDP: ibv_rx_hash_fields = 128;
pub const IBV_RX_HASH_IPSEC_SPI: ibv_rx_hash_fields = 256;
pub const IBV_RX_HASH_INNER: ibv_rx_hash_fields = 2147483648;
pub type ibv_rx_hash_fields = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_rss_caps {
    pub supported_qpts: u32,
    pub max_rwq_indirection_tables: u32,
    pub max_rwq_indirection_table_size: u32,
    pub rx_hash_fields_mask: u64,
    pub rx_hash_function: u8,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_packet_pacing_caps {
    pub qp_rate_limit_min: u32,
    pub qp_rate_limit_max: u32,
    pub supported_qpts: u32,
}
pub const IBV_RAW_PACKET_CAP_CVLAN_STRIPPING: ibv_raw_packet_caps = 1;
pub const IBV_RAW_PACKET_CAP_SCATTER_FCS: ibv_raw_packet_caps = 2;
pub const IBV_RAW_PACKET_CAP_IP_CSUM: ibv_raw_packet_caps = 4;
pub const IBV_RAW_PACKET_CAP_DELAY_DROP: ibv_raw_packet_caps = 8;
pub type ibv_raw_packet_caps = ::std::os::raw::c_uint;
pub const IBV_TM_CAP_RC: ibv_tm_cap_flags = 1;
pub type ibv_tm_cap_flags = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_tm_caps {
    pub max_rndv_hdr_size: u32,
    pub max_num_tags: u32,
    pub flags: u32,
    pub max_ops: u32,
    pub max_sge: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_cq_moderation_caps {
    pub max_cq_count: u16,
    pub max_cq_period: u16,
}
pub const IBV_PCI_ATOMIC_OPERATION_4_BYTE_SIZE_SUP: ibv_pci_atomic_op_size = 1;
pub const IBV_PCI_ATOMIC_OPERATION_8_BYTE_SIZE_SUP: ibv_pci_atomic_op_size = 2;
pub const IBV_PCI_ATOMIC_OPERATION_16_BYTE_SIZE_SUP: ibv_pci_atomic_op_size = 4;
pub type ibv_pci_atomic_op_size = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_pci_atomic_caps {
    pub fetch_add: u16,
    pub swap: u16,
    pub compare_swap: u16,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_device_attr_ex {
    pub orig_attr: ibv_device_attr,
    pub comp_mask: u32,
    pub odp_caps: ibv_odp_caps,
    pub completion_timestamp_mask: u64,
    pub hca_core_clock: u64,
    pub device_cap_flags_ex: u64,
    pub tso_caps: ibv_tso_caps,
    pub rss_caps: ibv_rss_caps,
    pub max_wq_type_rq: u32,
    pub packet_pacing_caps: ibv_packet_pacing_caps,
    pub raw_packet_caps: u32,
    pub tm_caps: ibv_tm_caps,
    pub cq_mod_caps: ibv_cq_moderation_caps,
    pub max_dm_size: u64,
    pub pci_atomic_caps: ibv_pci_atomic_caps,
    pub xrc_odp_caps: u32,
    pub phys_port_cnt_ex: u32,
}
pub const IBV_MTU_256: ibv_mtu = 1;
pub const IBV_MTU_512: ibv_mtu = 2;
pub const IBV_MTU_1024: ibv_mtu = 3;
pub const IBV_MTU_2048: ibv_mtu = 4;
pub const IBV_MTU_4096: ibv_mtu = 5;
pub type ibv_mtu = ::std::os::raw::c_uint;
pub const IBV_PORT_NOP: ibv_port_state = 0;
pub const IBV_PORT_DOWN: ibv_port_state = 1;
pub const IBV_PORT_INIT: ibv_port_state = 2;
pub const IBV_PORT_ARMED: ibv_port_state = 3;
pub const IBV_PORT_ACTIVE: ibv_port_state = 4;
pub const IBV_PORT_ACTIVE_DEFER: ibv_port_state = 5;
pub type ibv_port_state = ::std::os::raw::c_uint;
pub const IBV_LINK_LAYER_UNSPECIFIED: ::std::os::raw::c_uint = 0;
pub const IBV_LINK_LAYER_INFINIBAND: ::std::os::raw::c_uint = 1;
pub const IBV_LINK_LAYER_ETHERNET: ::std::os::raw::c_uint = 2;
pub type _bindgen_ty_13 = ::std::os::raw::c_uint;
pub const IBV_PORT_SM: ibv_port_cap_flags = 2;
pub const IBV_PORT_NOTICE_SUP: ibv_port_cap_flags = 4;
pub const IBV_PORT_TRAP_SUP: ibv_port_cap_flags = 8;
pub const IBV_PORT_OPT_IPD_SUP: ibv_port_cap_flags = 16;
pub const IBV_PORT_AUTO_MIGR_SUP: ibv_port_cap_flags = 32;
pub const IBV_PORT_SL_MAP_SUP: ibv_port_cap_flags = 64;
pub const IBV_PORT_MKEY_NVRAM: ibv_port_cap_flags = 128;
pub const IBV_PORT_PKEY_NVRAM: ibv_port_cap_flags = 256;
pub const IBV_PORT_LED_INFO_SUP: ibv_port_cap_flags = 512;
pub const IBV_PORT_SYS_IMAGE_GUID_SUP: ibv_port_cap_flags = 2048;
pub const IBV_PORT_PKEY_SW_EXT_PORT_TRAP_SUP: ibv_port_cap_flags = 4096;
pub const IBV_PORT_EXTENDED_SPEEDS_SUP: ibv_port_cap_flags = 16384;
pub const IBV_PORT_CAP_MASK2_SUP: ibv_port_cap_flags = 32768;
pub const IBV_PORT_CM_SUP: ibv_port_cap_flags = 65536;
pub const IBV_PORT_SNMP_TUNNEL_SUP: ibv_port_cap_flags = 131072;
pub const IBV_PORT_REINIT_SUP: ibv_port_cap_flags = 262144;
pub const IBV_PORT_DEVICE_MGMT_SUP: ibv_port_cap_flags = 524288;
pub const IBV_PORT_VENDOR_CLASS_SUP: ibv_port_cap_flags = 1048576;
pub const IBV_PORT_DR_NOTICE_SUP: ibv_port_cap_flags = 2097152;
pub const IBV_PORT_CAP_MASK_NOTICE_SUP: ibv_port_cap_flags = 4194304;
pub const IBV_PORT_BOOT_MGMT_SUP: ibv_port_cap_flags = 8388608;
pub const IBV_PORT_LINK_LATENCY_SUP: ibv_port_cap_flags = 16777216;
pub const IBV_PORT_CLIENT_REG_SUP: ibv_port_cap_flags = 33554432;
pub const IBV_PORT_IP_BASED_GIDS: ibv_port_cap_flags = 67108864;
pub type ibv_port_cap_flags = ::std::os::raw::c_uint;
pub const IBV_PORT_SET_NODE_DESC_SUP: ibv_port_cap_flags2 = 1;
pub const IBV_PORT_INFO_EXT_SUP: ibv_port_cap_flags2 = 2;
pub const IBV_PORT_VIRT_SUP: ibv_port_cap_flags2 = 4;
pub const IBV_PORT_SWITCH_PORT_STATE_TABLE_SUP: ibv_port_cap_flags2 = 8;
pub const IBV_PORT_LINK_WIDTH_2X_SUP: ibv_port_cap_flags2 = 16;
pub const IBV_PORT_LINK_SPEED_HDR_SUP: ibv_port_cap_flags2 = 32;
pub const IBV_PORT_LINK_SPEED_NDR_SUP: ibv_port_cap_flags2 = 1024;
pub type ibv_port_cap_flags2 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_port_attr {
    pub state: ibv_port_state,
    pub max_mtu: ibv_mtu,
    pub active_mtu: ibv_mtu,
    pub gid_tbl_len: ::std::os::raw::c_int,
    pub port_cap_flags: u32,
    pub max_msg_sz: u32,
    pub bad_pkey_cntr: u32,
    pub qkey_viol_cntr: u32,
    pub pkey_tbl_len: u16,
    pub lid: u16,
    pub sm_lid: u16,
    pub lmc: u8,
    pub max_vl_num: u8,
    pub sm_sl: u8,
    pub subnet_timeout: u8,
    pub init_type_reply: u8,
    pub active_width: u8,
    pub active_speed: u8,
    pub phys_state: u8,
    pub link_layer: u8,
    pub flags: u8,
    pub port_cap_flags2: u16,
}
pub const IBV_EVENT_CQ_ERR: ibv_event_type = 0;
pub const IBV_EVENT_QP_FATAL: ibv_event_type = 1;
pub const IBV_EVENT_QP_REQ_ERR: ibv_event_type = 2;
pub const IBV_EVENT_QP_ACCESS_ERR: ibv_event_type = 3;
pub const IBV_EVENT_COMM_EST: ibv_event_type = 4;
pub const IBV_EVENT_SQ_DRAINED: ibv_event_type = 5;
pub const IBV_EVENT_PATH_MIG: ibv_event_type = 6;
pub const IBV_EVENT_PATH_MIG_ERR: ibv_event_type = 7;
pub const IBV_EVENT_DEVICE_FATAL: ibv_event_type = 8;
pub const IBV_EVENT_PORT_ACTIVE: ibv_event_type = 9;
pub const IBV_EVENT_PORT_ERR: ibv_event_type = 10;
pub const IBV_EVENT_LID_CHANGE: ibv_event_type = 11;
pub const IBV_EVENT_PKEY_CHANGE: ibv_event_type = 12;
pub const IBV_EVENT_SM_CHANGE: ibv_event_type = 13;
pub const IBV_EVENT_SRQ_ERR: ibv_event_type = 14;
pub const IBV_EVENT_SRQ_LIMIT_REACHED: ibv_event_type = 15;
pub const IBV_EVENT_QP_LAST_WQE_REACHED: ibv_event_type = 16;
pub const IBV_EVENT_CLIENT_REREGISTER: ibv_event_type = 17;
pub const IBV_EVENT_GID_CHANGE: ibv_event_type = 18;
pub const IBV_EVENT_WQ_FATAL: ibv_event_type = 19;
pub type ibv_event_type = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ibv_async_event {
    pub element: ibv_async_event__bindgen_ty_1,
    pub event_type: ibv_event_type,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ibv_async_event__bindgen_ty_1 {
    pub cq: *mut ibv_cq,
    pub qp: *mut ibv_qp,
    pub srq: *mut ibv_srq,
    pub wq: *mut ibv_wq,
    pub port_num: ::std::os::raw::c_int,
}
pub const IBV_WC_SUCCESS: ibv_wc_status = 0;
pub const IBV_WC_LOC_LEN_ERR: ibv_wc_status = 1;
pub const IBV_WC_LOC_QP_OP_ERR: ibv_wc_status = 2;
pub const IBV_WC_LOC_EEC_OP_ERR: ibv_wc_status = 3;
pub const IBV_WC_LOC_PROT_ERR: ibv_wc_status = 4;
pub const IBV_WC_WR_FLUSH_ERR: ibv_wc_status = 5;
pub const IBV_WC_MW_BIND_ERR: ibv_wc_status = 6;
pub const IBV_WC_BAD_RESP_ERR: ibv_wc_status = 7;
pub const IBV_WC_LOC_ACCESS_ERR: ibv_wc_status = 8;
pub const IBV_WC_REM_INV_REQ_ERR: ibv_wc_status = 9;
pub const IBV_WC_REM_ACCESS_ERR: ibv_wc_status = 10;
pub const IBV_WC_REM_OP_ERR: ibv_wc_status = 11;
pub const IBV_WC_RETRY_EXC_ERR: ibv_wc_status = 12;
pub const IBV_WC_RNR_RETRY_EXC_ERR: ibv_wc_status = 13;
pub const IBV_WC_LOC_RDD_VIOL_ERR: ibv_wc_status = 14;
pub const IBV_WC_REM_INV_RD_REQ_ERR: ibv_wc_status = 15;
pub const IBV_WC_REM_ABORT_ERR: ibv_wc_status = 16;
pub const IBV_WC_INV_EECN_ERR: ibv_wc_status = 17;
pub const IBV_WC_INV_EEC_STATE_ERR: ibv_wc_status = 18;
pub const IBV_WC_FATAL_ERR: ibv_wc_status = 19;
pub const IBV_WC_RESP_TIMEOUT_ERR: ibv_wc_status = 20;
pub const IBV_WC_GENERAL_ERR: ibv_wc_status = 21;
pub const IBV_WC_TM_ERR: ibv_wc_status = 22;
pub const IBV_WC_TM_RNDV_INCOMPLETE: ibv_wc_status = 23;
pub type ibv_wc_status = ::std::os::raw::c_uint;
extern "C" {
    pub fn ibv_wc_status_str(status: ibv_wc_status) -> *const ::std::os::raw::c_char;
}
pub const IBV_WC_SEND: ibv_wc_opcode = 0;
pub const IBV_WC_RDMA_WRITE: ibv_wc_opcode = 1;
pub const IBV_WC_RDMA_READ: ibv_wc_opcode = 2;
pub const IBV_WC_COMP_SWAP: ibv_wc_opcode = 3;
pub const IBV_WC_FETCH_ADD: ibv_wc_opcode = 4;
pub const IBV_WC_BIND_MW: ibv_wc_opcode = 5;
pub const IBV_WC_LOCAL_INV: ibv_wc_opcode = 6;
pub const IBV_WC_TSO: ibv_wc_opcode = 7;
pub const IBV_WC_RECV: ibv_wc_opcode = 128;
pub const IBV_WC_RECV_RDMA_WITH_IMM: ibv_wc_opcode = 129;
pub const IBV_WC_TM_ADD: ibv_wc_opcode = 130;
pub const IBV_WC_TM_DEL: ibv_wc_opcode = 131;
pub const IBV_WC_TM_SYNC: ibv_wc_opcode = 132;
pub const IBV_WC_TM_RECV: ibv_wc_opcode = 133;
pub const IBV_WC_TM_NO_TAG: ibv_wc_opcode = 134;
pub const IBV_WC_DRIVER1: ibv_wc_opcode = 135;
pub const IBV_WC_DRIVER2: ibv_wc_opcode = 136;
pub const IBV_WC_DRIVER3: ibv_wc_opcode = 137;
pub type ibv_wc_opcode = ::std::os::raw::c_uint;
pub const IBV_WC_IP_CSUM_OK_SHIFT: ::std::os::raw::c_uint = 2;
pub type _bindgen_ty_14 = ::std::os::raw::c_uint;
pub const IBV_WC_EX_WITH_BYTE_LEN: ibv_create_cq_wc_flags = 1;
pub const IBV_WC_EX_WITH_IMM: ibv_create_cq_wc_flags = 2;
pub const IBV_WC_EX_WITH_QP_NUM: ibv_create_cq_wc_flags = 4;
pub const IBV_WC_EX_WITH_SRC_QP: ibv_create_cq_wc_flags = 8;
pub const IBV_WC_EX_WITH_SLID: ibv_create_cq_wc_flags = 16;
pub const IBV_WC_EX_WITH_SL: ibv_create_cq_wc_flags = 32;
pub const IBV_WC_EX_WITH_DLID_PATH_BITS: ibv_create_cq_wc_flags = 64;
pub const IBV_WC_EX_WITH_COMPLETION_TIMESTAMP: ibv_create_cq_wc_flags = 128;
pub const IBV_WC_EX_WITH_CVLAN: ibv_create_cq_wc_flags = 256;
pub const IBV_WC_EX_WITH_FLOW_TAG: ibv_create_cq_wc_flags = 512;
pub const IBV_WC_EX_WITH_TM_INFO: ibv_create_cq_wc_flags = 1024;
pub const IBV_WC_EX_WITH_COMPLETION_TIMESTAMP_WALLCLOCK: ibv_create_cq_wc_flags = 2048;
pub type ibv_create_cq_wc_flags = ::std::os::raw::c_uint;
pub const IBV_WC_STANDARD_FLAGS: ::std::os::raw::c_uint = 127;
pub type _bindgen_ty_15 = ::std::os::raw::c_uint;
pub const IBV_CREATE_CQ_SUP_WC_FLAGS: ::std::os::raw::c_uint = 4095;
pub type _bindgen_ty_16 = ::std::os::raw::c_uint;
pub const IBV_WC_GRH: ibv_wc_flags = 1;
pub const IBV_WC_WITH_IMM: ibv_wc_flags = 2;
pub const IBV_WC_IP_CSUM_OK: ibv_wc_flags = 4;
pub const IBV_WC_WITH_INV: ibv_wc_flags = 8;
pub const IBV_WC_TM_SYNC_REQ: ibv_wc_flags = 16;
pub const IBV_WC_TM_MATCH: ibv_wc_flags = 32;
pub const IBV_WC_TM_DATA_VALID: ibv_wc_flags = 64;
pub type ibv_wc_flags = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ibv_wc {
    pub wr_id: u64,
    pub status: ibv_wc_status,
    pub opcode: ibv_wc_opcode,
    pub vendor_err: u32,
    pub byte_len: u32,
    pub __bindgen_anon_1: ibv_wc__bindgen_ty_1,
    pub qp_num: u32,
    pub src_qp: u32,
    pub wc_flags: ::std::os::raw::c_uint,
    pub pkey_index: u16,
    pub slid: u16,
    pub sl: u8,
    pub dlid_path_bits: u8,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ibv_wc__bindgen_ty_1 {
    pub imm_data: __be32,
    pub invalidated_rkey: u32,
}
pub const IBV_ACCESS_LOCAL_WRITE: ibv_access_flags = 1;
pub const IBV_ACCESS_REMOTE_WRITE: ibv_access_flags = 2;
pub const IBV_ACCESS_REMOTE_READ: ibv_access_flags = 4;
pub const IBV_ACCESS_REMOTE_ATOMIC: ibv_access_flags = 8;
pub const IBV_ACCESS_MW_BIND: ibv_access_flags = 16;
pub const IBV_ACCESS_ZERO_BASED: ibv_access_flags = 32;
pub const IBV_ACCESS_ON_DEMAND: ibv_access_flags = 64;
pub const IBV_ACCESS_HUGETLB: ibv_access_flags = 128;
pub const IBV_ACCESS_RELAXED_ORDERING: ibv_access_flags = 1048576;
pub type ibv_access_flags = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_mw_bind_info {
    pub mr: *mut ibv_mr,
    pub addr: u64,
    pub length: u64,
    pub mw_access_flags: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_pd {
    pub context: *mut ibv_context,
    pub handle: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_td_init_attr {
    pub comp_mask: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_td {
    pub context: *mut ibv_context,
}
pub const IBV_XRCD_INIT_ATTR_FD: ibv_xrcd_init_attr_mask = 1;
pub const IBV_XRCD_INIT_ATTR_OFLAGS: ibv_xrcd_init_attr_mask = 2;
pub const IBV_XRCD_INIT_ATTR_RESERVED: ibv_xrcd_init_attr_mask = 4;
pub type ibv_xrcd_init_attr_mask = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_xrcd_init_attr {
    pub comp_mask: u32,
    pub fd: ::std::os::raw::c_int,
    pub oflags: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_xrcd {
    pub context: *mut ibv_context,
}
pub const IBV_REREG_MR_CHANGE_TRANSLATION: ibv_rereg_mr_flags = 1;
pub const IBV_REREG_MR_CHANGE_PD: ibv_rereg_mr_flags = 2;
pub const IBV_REREG_MR_CHANGE_ACCESS: ibv_rereg_mr_flags = 4;
pub const IBV_REREG_MR_FLAGS_SUPPORTED: ibv_rereg_mr_flags = 7;
pub type ibv_rereg_mr_flags = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_mr {
    pub context: *mut ibv_context,
    pub pd: *mut ibv_pd,
    pub addr: *mut ::std::os::raw::c_void,
    pub length: usize,
    pub handle: u32,
    pub lkey: u32,
    pub rkey: u32,
}
pub const IBV_MW_TYPE_1: ibv_mw_type = 1;
pub const IBV_MW_TYPE_2: ibv_mw_type = 2;
pub type ibv_mw_type = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_mw {
    pub context: *mut ibv_context,
    pub pd: *mut ibv_pd,
    pub rkey: u32,
    pub handle: u32,
    pub type_: ibv_mw_type,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ibv_global_route {
    pub dgid: ibv_gid,
    pub flow_label: u32,
    pub sgid_index: u8,
    pub hop_limit: u8,
    pub traffic_class: u8,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ibv_grh {
    pub version_tclass_flow: __be32,
    pub paylen: __be16,
    pub next_hdr: u8,
    pub hop_limit: u8,
    pub sgid: ibv_gid,
    pub dgid: ibv_gid,
}
pub const IBV_RATE_MAX: ibv_rate = 0;
pub const IBV_RATE_2_5_GBPS: ibv_rate = 2;
pub const IBV_RATE_5_GBPS: ibv_rate = 5;
pub const IBV_RATE_10_GBPS: ibv_rate = 3;
pub const IBV_RATE_20_GBPS: ibv_rate = 6;
pub const IBV_RATE_30_GBPS: ibv_rate = 4;
pub const IBV_RATE_40_GBPS: ibv_rate = 7;
pub const IBV_RATE_60_GBPS: ibv_rate = 8;
pub const IBV_RATE_80_GBPS: ibv_rate = 9;
pub const IBV_RATE_120_GBPS: ibv_rate = 10;
pub const IBV_RATE_14_GBPS: ibv_rate = 11;
pub const IBV_RATE_56_GBPS: ibv_rate = 12;
pub const IBV_RATE_112_GBPS: ibv_rate = 13;
pub const IBV_RATE_168_GBPS: ibv_rate = 14;
pub const IBV_RATE_25_GBPS: ibv_rate = 15;
pub const IBV_RATE_100_GBPS: ibv_rate = 16;
pub const IBV_RATE_200_GBPS: ibv_rate = 17;
pub const IBV_RATE_300_GBPS: ibv_rate = 18;
pub const IBV_RATE_28_GBPS: ibv_rate = 19;
pub const IBV_RATE_50_GBPS: ibv_rate = 20;
pub const IBV_RATE_400_GBPS: ibv_rate = 21;
pub const IBV_RATE_600_GBPS: ibv_rate = 22;
pub const IBV_RATE_800_GBPS: ibv_rate = 23;
pub const IBV_RATE_1200_GBPS: ibv_rate = 24;
pub type ibv_rate = ::std::os::raw::c_uint;
extern "C" {
    #[doc = " ibv_rate_to_mult - Convert the IB rate enum to a multiple of the"]
    #[doc = " base rate of 2.5 Gbit/sec.  For example, IBV_RATE_5_GBPS will be"]
    #[doc = " converted to 2, since 5 Gbit/sec is 2 * 2.5 Gbit/sec."]
    #[doc = " @rate: rate to convert."]
    pub fn ibv_rate_to_mult(rate: ibv_rate) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_rate_to_mbps - Convert the IB rate enum to Mbit/sec."]
    #[doc = " For example, IBV_RATE_5_GBPS will return the value 5000."]
    #[doc = " @rate: rate to convert."]
    pub fn ibv_rate_to_mbps(rate: ibv_rate) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ibv_ah_attr {
    pub grh: ibv_global_route,
    pub dlid: u16,
    pub sl: u8,
    pub src_path_bits: u8,
    pub static_rate: u8,
    pub is_global: u8,
    pub port_num: u8,
}
pub const IBV_SRQ_MAX_WR: ibv_srq_attr_mask = 1;
pub const IBV_SRQ_LIMIT: ibv_srq_attr_mask = 2;
pub type ibv_srq_attr_mask = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_srq_attr {
    pub max_wr: u32,
    pub max_sge: u32,
    pub srq_limit: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_srq_init_attr {
    pub srq_context: *mut ::std::os::raw::c_void,
    pub attr: ibv_srq_attr,
}
pub const IBV_SRQT_BASIC: ibv_srq_type = 0;
pub const IBV_SRQT_XRC: ibv_srq_type = 1;
pub const IBV_SRQT_TM: ibv_srq_type = 2;
pub type ibv_srq_type = ::std::os::raw::c_uint;
pub const IBV_SRQ_INIT_ATTR_TYPE: ibv_srq_init_attr_mask = 1;
pub const IBV_SRQ_INIT_ATTR_PD: ibv_srq_init_attr_mask = 2;
pub const IBV_SRQ_INIT_ATTR_XRCD: ibv_srq_init_attr_mask = 4;
pub const IBV_SRQ_INIT_ATTR_CQ: ibv_srq_init_attr_mask = 8;
pub const IBV_SRQ_INIT_ATTR_TM: ibv_srq_init_attr_mask = 16;
pub const IBV_SRQ_INIT_ATTR_RESERVED: ibv_srq_init_attr_mask = 32;
pub type ibv_srq_init_attr_mask = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_tm_cap {
    pub max_num_tags: u32,
    pub max_ops: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_srq_init_attr_ex {
    pub srq_context: *mut ::std::os::raw::c_void,
    pub attr: ibv_srq_attr,
    pub comp_mask: u32,
    pub srq_type: ibv_srq_type,
    pub pd: *mut ibv_pd,
    pub xrcd: *mut ibv_xrcd,
    pub cq: *mut ibv_cq,
    pub tm_cap: ibv_tm_cap,
}
pub const IBV_WQT_RQ: ibv_wq_type = 0;
pub type ibv_wq_type = ::std::os::raw::c_uint;
pub const IBV_WQ_INIT_ATTR_FLAGS: ibv_wq_init_attr_mask = 1;
pub const IBV_WQ_INIT_ATTR_RESERVED: ibv_wq_init_attr_mask = 2;
pub type ibv_wq_init_attr_mask = ::std::os::raw::c_uint;
pub const IBV_WQ_FLAGS_CVLAN_STRIPPING: ibv_wq_flags = 1;
pub const IBV_WQ_FLAGS_SCATTER_FCS: ibv_wq_flags = 2;
pub const IBV_WQ_FLAGS_DELAY_DROP: ibv_wq_flags = 4;
pub const IBV_WQ_FLAGS_PCI_WRITE_END_PADDING: ibv_wq_flags = 8;
pub const IBV_WQ_FLAGS_RESERVED: ibv_wq_flags = 16;
pub type ibv_wq_flags = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_wq_init_attr {
    pub wq_context: *mut ::std::os::raw::c_void,
    pub wq_type: ibv_wq_type,
    pub max_wr: u32,
    pub max_sge: u32,
    pub pd: *mut ibv_pd,
    pub cq: *mut ibv_cq,
    pub comp_mask: u32,
    pub create_flags: u32,
}
pub const IBV_WQS_RESET: ibv_wq_state = 0;
pub const IBV_WQS_RDY: ibv_wq_state = 1;
pub const IBV_WQS_ERR: ibv_wq_state = 2;
pub const IBV_WQS_UNKNOWN: ibv_wq_state = 3;
pub type ibv_wq_state = ::std::os::raw::c_uint;
pub const IBV_WQ_ATTR_STATE: ibv_wq_attr_mask = 1;
pub const IBV_WQ_ATTR_CURR_STATE: ibv_wq_attr_mask = 2;
pub const IBV_WQ_ATTR_FLAGS: ibv_wq_attr_mask = 4;
pub const IBV_WQ_ATTR_RESERVED: ibv_wq_attr_mask = 8;
pub type ibv_wq_attr_mask = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_wq_attr {
    pub attr_mask: u32,
    pub wq_state: ibv_wq_state,
    pub curr_wq_state: ibv_wq_state,
    pub flags: u32,
    pub flags_mask: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_rwq_ind_table {
    pub context: *mut ibv_context,
    pub ind_tbl_handle: ::std::os::raw::c_int,
    pub ind_tbl_num: ::std::os::raw::c_int,
    pub comp_mask: u32,
}
pub const IBV_CREATE_IND_TABLE_RESERVED: ibv_ind_table_init_attr_mask = 1;
pub type ibv_ind_table_init_attr_mask = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_rwq_ind_table_init_attr {
    pub log_ind_tbl_size: u32,
    pub ind_tbl: *mut *mut ibv_wq,
    pub comp_mask: u32,
}
pub const IBV_QPT_RC: ibv_qp_type = 2;
pub const IBV_QPT_UC: ibv_qp_type = 3;
pub const IBV_QPT_UD: ibv_qp_type = 4;
pub const IBV_QPT_RAW_PACKET: ibv_qp_type = 8;
pub const IBV_QPT_XRC_SEND: ibv_qp_type = 9;
pub const IBV_QPT_XRC_RECV: ibv_qp_type = 10;
pub const IBV_QPT_DRIVER: ibv_qp_type = 255;
pub type ibv_qp_type = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_qp_cap {
    pub max_send_wr: u32,
    pub max_recv_wr: u32,
    pub max_send_sge: u32,
    pub max_recv_sge: u32,
    pub max_inline_data: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_qp_init_attr {
    pub qp_context: *mut ::std::os::raw::c_void,
    pub send_cq: *mut ibv_cq,
    pub recv_cq: *mut ibv_cq,
    pub srq: *mut ibv_srq,
    pub cap: ibv_qp_cap,
    pub qp_type: ibv_qp_type,
    pub sq_sig_all: ::std::os::raw::c_int,
}
pub const IBV_QP_INIT_ATTR_PD: ibv_qp_init_attr_mask = 1;
pub const IBV_QP_INIT_ATTR_XRCD: ibv_qp_init_attr_mask = 2;
pub const IBV_QP_INIT_ATTR_CREATE_FLAGS: ibv_qp_init_attr_mask = 4;
pub const IBV_QP_INIT_ATTR_MAX_TSO_HEADER: ibv_qp_init_attr_mask = 8;
pub const IBV_QP_INIT_ATTR_IND_TABLE: ibv_qp_init_attr_mask = 16;
pub const IBV_QP_INIT_ATTR_RX_HASH: ibv_qp_init_attr_mask = 32;
pub const IBV_QP_INIT_ATTR_SEND_OPS_FLAGS: ibv_qp_init_attr_mask = 64;
pub type ibv_qp_init_attr_mask = ::std::os::raw::c_uint;
pub const IBV_QP_CREATE_BLOCK_SELF_MCAST_LB: ibv_qp_create_flags = 2;
pub const IBV_QP_CREATE_SCATTER_FCS: ibv_qp_create_flags = 256;
pub const IBV_QP_CREATE_CVLAN_STRIPPING: ibv_qp_create_flags = 512;
pub const IBV_QP_CREATE_SOURCE_QPN: ibv_qp_create_flags = 1024;
pub const IBV_QP_CREATE_PCI_WRITE_END_PADDING: ibv_qp_create_flags = 2048;
pub type ibv_qp_create_flags = ::std::os::raw::c_uint;
pub const IBV_QP_EX_WITH_RDMA_WRITE: ibv_qp_create_send_ops_flags = 1;
pub const IBV_QP_EX_WITH_RDMA_WRITE_WITH_IMM: ibv_qp_create_send_ops_flags = 2;
pub const IBV_QP_EX_WITH_SEND: ibv_qp_create_send_ops_flags = 4;
pub const IBV_QP_EX_WITH_SEND_WITH_IMM: ibv_qp_create_send_ops_flags = 8;
pub const IBV_QP_EX_WITH_RDMA_READ: ibv_qp_create_send_ops_flags = 16;
pub const IBV_QP_EX_WITH_ATOMIC_CMP_AND_SWP: ibv_qp_create_send_ops_flags = 32;
pub const IBV_QP_EX_WITH_ATOMIC_FETCH_AND_ADD: ibv_qp_create_send_ops_flags = 64;
pub const IBV_QP_EX_WITH_LOCAL_INV: ibv_qp_create_send_ops_flags = 128;
pub const IBV_QP_EX_WITH_BIND_MW: ibv_qp_create_send_ops_flags = 256;
pub const IBV_QP_EX_WITH_SEND_WITH_INV: ibv_qp_create_send_ops_flags = 512;
pub const IBV_QP_EX_WITH_TSO: ibv_qp_create_send_ops_flags = 1024;
pub type ibv_qp_create_send_ops_flags = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_rx_hash_conf {
    pub rx_hash_function: u8,
    pub rx_hash_key_len: u8,
    pub rx_hash_key: *mut u8,
    pub rx_hash_fields_mask: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_qp_init_attr_ex {
    pub qp_context: *mut ::std::os::raw::c_void,
    pub send_cq: *mut ibv_cq,
    pub recv_cq: *mut ibv_cq,
    pub srq: *mut ibv_srq,
    pub cap: ibv_qp_cap,
    pub qp_type: ibv_qp_type,
    pub sq_sig_all: ::std::os::raw::c_int,
    pub comp_mask: u32,
    pub pd: *mut ibv_pd,
    pub xrcd: *mut ibv_xrcd,
    pub create_flags: u32,
    pub max_tso_header: u16,
    pub rwq_ind_tbl: *mut ibv_rwq_ind_table,
    pub rx_hash_conf: ibv_rx_hash_conf,
    pub source_qpn: u32,
    pub send_ops_flags: u64,
}
pub const IBV_QP_OPEN_ATTR_NUM: ibv_qp_open_attr_mask = 1;
pub const IBV_QP_OPEN_ATTR_XRCD: ibv_qp_open_attr_mask = 2;
pub const IBV_QP_OPEN_ATTR_CONTEXT: ibv_qp_open_attr_mask = 4;
pub const IBV_QP_OPEN_ATTR_TYPE: ibv_qp_open_attr_mask = 8;
pub const IBV_QP_OPEN_ATTR_RESERVED: ibv_qp_open_attr_mask = 16;
pub type ibv_qp_open_attr_mask = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_qp_open_attr {
    pub comp_mask: u32,
    pub qp_num: u32,
    pub xrcd: *mut ibv_xrcd,
    pub qp_context: *mut ::std::os::raw::c_void,
    pub qp_type: ibv_qp_type,
}
pub const IBV_QP_STATE: ibv_qp_attr_mask = 1;
pub const IBV_QP_CUR_STATE: ibv_qp_attr_mask = 2;
pub const IBV_QP_EN_SQD_ASYNC_NOTIFY: ibv_qp_attr_mask = 4;
pub const IBV_QP_ACCESS_FLAGS: ibv_qp_attr_mask = 8;
pub const IBV_QP_PKEY_INDEX: ibv_qp_attr_mask = 16;
pub const IBV_QP_PORT: ibv_qp_attr_mask = 32;
pub const IBV_QP_QKEY: ibv_qp_attr_mask = 64;
pub const IBV_QP_AV: ibv_qp_attr_mask = 128;
pub const IBV_QP_PATH_MTU: ibv_qp_attr_mask = 256;
pub const IBV_QP_TIMEOUT: ibv_qp_attr_mask = 512;
pub const IBV_QP_RETRY_CNT: ibv_qp_attr_mask = 1024;
pub const IBV_QP_RNR_RETRY: ibv_qp_attr_mask = 2048;
pub const IBV_QP_RQ_PSN: ibv_qp_attr_mask = 4096;
pub const IBV_QP_MAX_QP_RD_ATOMIC: ibv_qp_attr_mask = 8192;
pub const IBV_QP_ALT_PATH: ibv_qp_attr_mask = 16384;
pub const IBV_QP_MIN_RNR_TIMER: ibv_qp_attr_mask = 32768;
pub const IBV_QP_SQ_PSN: ibv_qp_attr_mask = 65536;
pub const IBV_QP_MAX_DEST_RD_ATOMIC: ibv_qp_attr_mask = 131072;
pub const IBV_QP_PATH_MIG_STATE: ibv_qp_attr_mask = 262144;
pub const IBV_QP_CAP: ibv_qp_attr_mask = 524288;
pub const IBV_QP_DEST_QPN: ibv_qp_attr_mask = 1048576;
pub const IBV_QP_RATE_LIMIT: ibv_qp_attr_mask = 33554432;
pub type ibv_qp_attr_mask = ::std::os::raw::c_uint;
pub const IBV_QPS_RESET: ibv_qp_state = 0;
pub const IBV_QPS_INIT: ibv_qp_state = 1;
pub const IBV_QPS_RTR: ibv_qp_state = 2;
pub const IBV_QPS_RTS: ibv_qp_state = 3;
pub const IBV_QPS_SQD: ibv_qp_state = 4;
pub const IBV_QPS_SQE: ibv_qp_state = 5;
pub const IBV_QPS_ERR: ibv_qp_state = 6;
pub const IBV_QPS_UNKNOWN: ibv_qp_state = 7;
pub type ibv_qp_state = ::std::os::raw::c_uint;
pub const IBV_MIG_MIGRATED: ibv_mig_state = 0;
pub const IBV_MIG_REARM: ibv_mig_state = 1;
pub const IBV_MIG_ARMED: ibv_mig_state = 2;
pub type ibv_mig_state = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ibv_qp_attr {
    pub qp_state: ibv_qp_state,
    pub cur_qp_state: ibv_qp_state,
    pub path_mtu: ibv_mtu,
    pub path_mig_state: ibv_mig_state,
    pub qkey: u32,
    pub rq_psn: u32,
    pub sq_psn: u32,
    pub dest_qp_num: u32,
    pub qp_access_flags: ::std::os::raw::c_uint,
    pub cap: ibv_qp_cap,
    pub ah_attr: ibv_ah_attr,
    pub alt_ah_attr: ibv_ah_attr,
    pub pkey_index: u16,
    pub alt_pkey_index: u16,
    pub en_sqd_async_notify: u8,
    pub sq_draining: u8,
    pub max_rd_atomic: u8,
    pub max_dest_rd_atomic: u8,
    pub min_rnr_timer: u8,
    pub port_num: u8,
    pub timeout: u8,
    pub retry_cnt: u8,
    pub rnr_retry: u8,
    pub alt_port_num: u8,
    pub alt_timeout: u8,
    pub rate_limit: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_qp_rate_limit_attr {
    pub rate_limit: u32,
    pub max_burst_sz: u32,
    pub typical_pkt_sz: u16,
    pub comp_mask: u32,
}
pub const IBV_WR_RDMA_WRITE: ibv_wr_opcode = 0;
pub const IBV_WR_RDMA_WRITE_WITH_IMM: ibv_wr_opcode = 1;
pub const IBV_WR_SEND: ibv_wr_opcode = 2;
pub const IBV_WR_SEND_WITH_IMM: ibv_wr_opcode = 3;
pub const IBV_WR_RDMA_READ: ibv_wr_opcode = 4;
pub const IBV_WR_ATOMIC_CMP_AND_SWP: ibv_wr_opcode = 5;
pub const IBV_WR_ATOMIC_FETCH_AND_ADD: ibv_wr_opcode = 6;
pub const IBV_WR_LOCAL_INV: ibv_wr_opcode = 7;
pub const IBV_WR_BIND_MW: ibv_wr_opcode = 8;
pub const IBV_WR_SEND_WITH_INV: ibv_wr_opcode = 9;
pub const IBV_WR_TSO: ibv_wr_opcode = 10;
pub const IBV_WR_DRIVER1: ibv_wr_opcode = 11;
pub type ibv_wr_opcode = ::std::os::raw::c_uint;
pub const IBV_SEND_FENCE: ibv_send_flags = 1;
pub const IBV_SEND_SIGNALED: ibv_send_flags = 2;
pub const IBV_SEND_SOLICITED: ibv_send_flags = 4;
pub const IBV_SEND_INLINE: ibv_send_flags = 8;
pub const IBV_SEND_IP_CSUM: ibv_send_flags = 16;
pub type ibv_send_flags = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_data_buf {
    pub addr: *mut ::std::os::raw::c_void,
    pub length: usize,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_sge {
    pub addr: u64,
    pub length: u32,
    pub lkey: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ibv_send_wr {
    pub wr_id: u64,
    pub next: *mut ibv_send_wr,
    pub sg_list: *mut ibv_sge,
    pub num_sge: ::std::os::raw::c_int,
    pub opcode: ibv_wr_opcode,
    pub send_flags: ::std::os::raw::c_uint,
    pub __bindgen_anon_1: ibv_send_wr__bindgen_ty_1,
    pub wr: ibv_send_wr__bindgen_ty_2,
    pub qp_type: ibv_send_wr__bindgen_ty_3,
    pub __bindgen_anon_2: ibv_send_wr__bindgen_ty_4,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ibv_send_wr__bindgen_ty_1 {
    pub imm_data: __be32,
    pub invalidate_rkey: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ibv_send_wr__bindgen_ty_2 {
    pub rdma: ibv_send_wr__bindgen_ty_2__bindgen_ty_1,
    pub atomic: ibv_send_wr__bindgen_ty_2__bindgen_ty_2,
    pub ud: ibv_send_wr__bindgen_ty_2__bindgen_ty_3,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_send_wr__bindgen_ty_2__bindgen_ty_1 {
    pub remote_addr: u64,
    pub rkey: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_send_wr__bindgen_ty_2__bindgen_ty_2 {
    pub remote_addr: u64,
    pub compare_add: u64,
    pub swap: u64,
    pub rkey: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_send_wr__bindgen_ty_2__bindgen_ty_3 {
    pub ah: *mut ibv_ah,
    pub remote_qpn: u32,
    pub remote_qkey: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ibv_send_wr__bindgen_ty_3 {
    pub xrc: ibv_send_wr__bindgen_ty_3__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_send_wr__bindgen_ty_3__bindgen_ty_1 {
    pub remote_srqn: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ibv_send_wr__bindgen_ty_4 {
    pub bind_mw: ibv_send_wr__bindgen_ty_4__bindgen_ty_1,
    pub tso: ibv_send_wr__bindgen_ty_4__bindgen_ty_2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_send_wr__bindgen_ty_4__bindgen_ty_1 {
    pub mw: *mut ibv_mw,
    pub rkey: u32,
    pub bind_info: ibv_mw_bind_info,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_send_wr__bindgen_ty_4__bindgen_ty_2 {
    pub hdr: *mut ::std::os::raw::c_void,
    pub hdr_sz: u16,
    pub mss: u16,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_recv_wr {
    pub wr_id: u64,
    pub next: *mut ibv_recv_wr,
    pub sg_list: *mut ibv_sge,
    pub num_sge: ::std::os::raw::c_int,
}
pub const IBV_WR_TAG_ADD: ibv_ops_wr_opcode = 0;
pub const IBV_WR_TAG_DEL: ibv_ops_wr_opcode = 1;
pub const IBV_WR_TAG_SYNC: ibv_ops_wr_opcode = 2;
pub type ibv_ops_wr_opcode = ::std::os::raw::c_uint;
pub const IBV_OPS_SIGNALED: ibv_ops_flags = 1;
pub const IBV_OPS_TM_SYNC: ibv_ops_flags = 2;
pub type ibv_ops_flags = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_ops_wr {
    pub wr_id: u64,
    pub next: *mut ibv_ops_wr,
    pub opcode: ibv_ops_wr_opcode,
    pub flags: ::std::os::raw::c_int,
    pub tm: ibv_ops_wr__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_ops_wr__bindgen_ty_1 {
    pub unexpected_cnt: u32,
    pub handle: u32,
    pub add: ibv_ops_wr__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_ops_wr__bindgen_ty_1__bindgen_ty_1 {
    pub recv_wr_id: u64,
    pub sg_list: *mut ibv_sge,
    pub num_sge: ::std::os::raw::c_int,
    pub tag: u64,
    pub mask: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_mw_bind {
    pub wr_id: u64,
    pub send_flags: ::std::os::raw::c_uint,
    pub bind_info: ibv_mw_bind_info,
}
#[repr(C)]
pub struct ibv_srq {
    pub context: *mut ibv_context,
    pub srq_context: *mut ::std::os::raw::c_void,
    pub pd: *mut ibv_pd,
    pub handle: u32,
    pub mutex: pthread_mutex_t,
    pub cond: pthread_cond_t,
    pub events_completed: u32,
}
#[repr(C)]
pub struct ibv_wq {
    pub context: *mut ibv_context,
    pub wq_context: *mut ::std::os::raw::c_void,
    pub pd: *mut ibv_pd,
    pub cq: *mut ibv_cq,
    pub wq_num: u32,
    pub handle: u32,
    pub state: ibv_wq_state,
    pub wq_type: ibv_wq_type,
    pub post_recv: ::std::option::Option<
        unsafe extern "C" fn(
            current: *mut ibv_wq,
            recv_wr: *mut ibv_recv_wr,
            bad_recv_wr: *mut *mut ibv_recv_wr,
        ) -> ::std::os::raw::c_int,
    >,
    pub mutex: pthread_mutex_t,
    pub cond: pthread_cond_t,
    pub events_completed: u32,
    pub comp_mask: u32,
}
#[repr(C)]
pub struct ibv_qp {
    pub context: *mut ibv_context,
    pub qp_context: *mut ::std::os::raw::c_void,
    pub pd: *mut ibv_pd,
    pub send_cq: *mut ibv_cq,
    pub recv_cq: *mut ibv_cq,
    pub srq: *mut ibv_srq,
    pub handle: u32,
    pub qp_num: u32,
    pub state: ibv_qp_state,
    pub qp_type: ibv_qp_type,
    pub mutex: pthread_mutex_t,
    pub cond: pthread_cond_t,
    pub events_completed: u32,
}
#[repr(C)]
pub struct ibv_qp_ex {
    pub qp_base: ibv_qp,
    pub comp_mask: u64,
    pub wr_id: u64,
    pub wr_flags: ::std::os::raw::c_uint,
    pub wr_atomic_cmp_swp: ::std::option::Option<
        unsafe extern "C" fn(
            qp: *mut ibv_qp_ex,
            rkey: u32,
            remote_addr: u64,
            compare: u64,
            swap: u64,
        ),
    >,
    pub wr_atomic_fetch_add: ::std::option::Option<
        unsafe extern "C" fn(qp: *mut ibv_qp_ex, rkey: u32, remote_addr: u64, add: u64),
    >,
    pub wr_bind_mw: ::std::option::Option<
        unsafe extern "C" fn(
            qp: *mut ibv_qp_ex,
            mw: *mut ibv_mw,
            rkey: u32,
            bind_info: *const ibv_mw_bind_info,
        ),
    >,
    pub wr_local_inv:
        ::std::option::Option<unsafe extern "C" fn(qp: *mut ibv_qp_ex, invalidate_rkey: u32)>,
    pub wr_rdma_read: ::std::option::Option<
        unsafe extern "C" fn(qp: *mut ibv_qp_ex, rkey: u32, remote_addr: u64),
    >,
    pub wr_rdma_write: ::std::option::Option<
        unsafe extern "C" fn(qp: *mut ibv_qp_ex, rkey: u32, remote_addr: u64),
    >,
    pub wr_rdma_write_imm: ::std::option::Option<
        unsafe extern "C" fn(qp: *mut ibv_qp_ex, rkey: u32, remote_addr: u64, imm_data: __be32),
    >,
    pub wr_send: ::std::option::Option<unsafe extern "C" fn(qp: *mut ibv_qp_ex)>,
    pub wr_send_imm:
        ::std::option::Option<unsafe extern "C" fn(qp: *mut ibv_qp_ex, imm_data: __be32)>,
    pub wr_send_inv:
        ::std::option::Option<unsafe extern "C" fn(qp: *mut ibv_qp_ex, invalidate_rkey: u32)>,
    pub wr_send_tso: ::std::option::Option<
        unsafe extern "C" fn(
            qp: *mut ibv_qp_ex,
            hdr: *mut ::std::os::raw::c_void,
            hdr_sz: u16,
            mss: u16,
        ),
    >,
    pub wr_set_ud_addr: ::std::option::Option<
        unsafe extern "C" fn(
            qp: *mut ibv_qp_ex,
            ah: *mut ibv_ah,
            remote_qpn: u32,
            remote_qkey: u32,
        ),
    >,
    pub wr_set_xrc_srqn:
        ::std::option::Option<unsafe extern "C" fn(qp: *mut ibv_qp_ex, remote_srqn: u32)>,
    pub wr_set_inline_data: ::std::option::Option<
        unsafe extern "C" fn(qp: *mut ibv_qp_ex, addr: *mut ::std::os::raw::c_void, length: usize),
    >,
    pub wr_set_inline_data_list: ::std::option::Option<
        unsafe extern "C" fn(qp: *mut ibv_qp_ex, num_buf: usize, buf_list: *const ibv_data_buf),
    >,
    pub wr_set_sge: ::std::option::Option<
        unsafe extern "C" fn(qp: *mut ibv_qp_ex, lkey: u32, addr: u64, length: u32),
    >,
    pub wr_set_sge_list: ::std::option::Option<
        unsafe extern "C" fn(qp: *mut ibv_qp_ex, num_sge: usize, sg_list: *const ibv_sge),
    >,
    pub wr_start: ::std::option::Option<unsafe extern "C" fn(qp: *mut ibv_qp_ex)>,
    pub wr_complete:
        ::std::option::Option<unsafe extern "C" fn(qp: *mut ibv_qp_ex) -> ::std::os::raw::c_int>,
    pub wr_abort: ::std::option::Option<unsafe extern "C" fn(qp: *mut ibv_qp_ex)>,
}
extern "C" {
    pub fn ibv_qp_to_qp_ex(qp: *mut ibv_qp) -> *mut ibv_qp_ex;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_ece {
    pub vendor_id: u32,
    pub options: u32,
    pub comp_mask: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_comp_channel {
    pub context: *mut ibv_context,
    pub fd: ::std::os::raw::c_int,
    pub refcnt: ::std::os::raw::c_int,
}
#[repr(C)]
pub struct ibv_cq {
    pub context: *mut ibv_context,
    pub channel: *mut ibv_comp_channel,
    pub cq_context: *mut ::std::os::raw::c_void,
    pub handle: u32,
    pub cqe: ::std::os::raw::c_int,
    pub mutex: pthread_mutex_t,
    pub cond: pthread_cond_t,
    pub comp_events_completed: u32,
    pub async_events_completed: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_poll_cq_attr {
    pub comp_mask: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_wc_tm_info {
    pub tag: u64,
    pub priv_: u32,
}
#[repr(C)]
pub struct ibv_cq_ex {
    pub context: *mut ibv_context,
    pub channel: *mut ibv_comp_channel,
    pub cq_context: *mut ::std::os::raw::c_void,
    pub handle: u32,
    pub cqe: ::std::os::raw::c_int,
    pub mutex: pthread_mutex_t,
    pub cond: pthread_cond_t,
    pub comp_events_completed: u32,
    pub async_events_completed: u32,
    pub comp_mask: u32,
    pub status: ibv_wc_status,
    pub wr_id: u64,
    pub start_poll: ::std::option::Option<
        unsafe extern "C" fn(
            current: *mut ibv_cq_ex,
            attr: *mut ibv_poll_cq_attr,
        ) -> ::std::os::raw::c_int,
    >,
    pub next_poll: ::std::option::Option<
        unsafe extern "C" fn(current: *mut ibv_cq_ex) -> ::std::os::raw::c_int,
    >,
    pub end_poll: ::std::option::Option<unsafe extern "C" fn(current: *mut ibv_cq_ex)>,
    pub read_opcode:
        ::std::option::Option<unsafe extern "C" fn(current: *mut ibv_cq_ex) -> ibv_wc_opcode>,
    pub read_vendor_err:
        ::std::option::Option<unsafe extern "C" fn(current: *mut ibv_cq_ex) -> u32>,
    pub read_byte_len: ::std::option::Option<unsafe extern "C" fn(current: *mut ibv_cq_ex) -> u32>,
    pub read_imm_data:
        ::std::option::Option<unsafe extern "C" fn(current: *mut ibv_cq_ex) -> __be32>,
    pub read_qp_num: ::std::option::Option<unsafe extern "C" fn(current: *mut ibv_cq_ex) -> u32>,
    pub read_src_qp: ::std::option::Option<unsafe extern "C" fn(current: *mut ibv_cq_ex) -> u32>,
    pub read_wc_flags: ::std::option::Option<
        unsafe extern "C" fn(current: *mut ibv_cq_ex) -> ::std::os::raw::c_uint,
    >,
    pub read_slid: ::std::option::Option<unsafe extern "C" fn(current: *mut ibv_cq_ex) -> u32>,
    pub read_sl: ::std::option::Option<unsafe extern "C" fn(current: *mut ibv_cq_ex) -> u8>,
    pub read_dlid_path_bits:
        ::std::option::Option<unsafe extern "C" fn(current: *mut ibv_cq_ex) -> u8>,
    pub read_completion_ts:
        ::std::option::Option<unsafe extern "C" fn(current: *mut ibv_cq_ex) -> u64>,
    pub read_cvlan: ::std::option::Option<unsafe extern "C" fn(current: *mut ibv_cq_ex) -> u16>,
    pub read_flow_tag: ::std::option::Option<unsafe extern "C" fn(current: *mut ibv_cq_ex) -> u32>,
    pub read_tm_info: ::std::option::Option<
        unsafe extern "C" fn(current: *mut ibv_cq_ex, tm_info: *mut ibv_wc_tm_info),
    >,
    pub read_completion_wallclock_ns:
        ::std::option::Option<unsafe extern "C" fn(current: *mut ibv_cq_ex) -> u64>,
}
pub const IBV_CQ_ATTR_MODERATE: ibv_cq_attr_mask = 1;
pub const IBV_CQ_ATTR_RESERVED: ibv_cq_attr_mask = 2;
pub type ibv_cq_attr_mask = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_moderate_cq {
    pub cq_count: u16,
    pub cq_period: u16,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_modify_cq_attr {
    pub attr_mask: u32,
    pub moderate: ibv_moderate_cq,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_ah {
    pub context: *mut ibv_context,
    pub pd: *mut ibv_pd,
    pub handle: u32,
}
pub const IBV_FLOW_ATTR_FLAGS_DONT_TRAP: ibv_flow_flags = 2;
pub const IBV_FLOW_ATTR_FLAGS_EGRESS: ibv_flow_flags = 4;
pub type ibv_flow_flags = ::std::os::raw::c_uint;
pub const IBV_FLOW_ATTR_NORMAL: ibv_flow_attr_type = 0;
pub const IBV_FLOW_ATTR_ALL_DEFAULT: ibv_flow_attr_type = 1;
pub const IBV_FLOW_ATTR_MC_DEFAULT: ibv_flow_attr_type = 2;
pub const IBV_FLOW_ATTR_SNIFFER: ibv_flow_attr_type = 3;
pub type ibv_flow_attr_type = ::std::os::raw::c_uint;
pub const IBV_FLOW_SPEC_ETH: ibv_flow_spec_type = 32;
pub const IBV_FLOW_SPEC_IPV4: ibv_flow_spec_type = 48;
pub const IBV_FLOW_SPEC_IPV6: ibv_flow_spec_type = 49;
pub const IBV_FLOW_SPEC_IPV4_EXT: ibv_flow_spec_type = 50;
pub const IBV_FLOW_SPEC_ESP: ibv_flow_spec_type = 52;
pub const IBV_FLOW_SPEC_TCP: ibv_flow_spec_type = 64;
pub const IBV_FLOW_SPEC_UDP: ibv_flow_spec_type = 65;
pub const IBV_FLOW_SPEC_VXLAN_TUNNEL: ibv_flow_spec_type = 80;
pub const IBV_FLOW_SPEC_GRE: ibv_flow_spec_type = 81;
pub const IBV_FLOW_SPEC_MPLS: ibv_flow_spec_type = 96;
pub const IBV_FLOW_SPEC_INNER: ibv_flow_spec_type = 256;
pub const IBV_FLOW_SPEC_ACTION_TAG: ibv_flow_spec_type = 4096;
pub const IBV_FLOW_SPEC_ACTION_DROP: ibv_flow_spec_type = 4097;
pub const IBV_FLOW_SPEC_ACTION_HANDLE: ibv_flow_spec_type = 4098;
pub const IBV_FLOW_SPEC_ACTION_COUNT: ibv_flow_spec_type = 4099;
pub type ibv_flow_spec_type = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_eth_filter {
    pub dst_mac: [u8; 6usize],
    pub src_mac: [u8; 6usize],
    pub ether_type: u16,
    pub vlan_tag: u16,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_spec_eth {
    pub type_: ibv_flow_spec_type,
    pub size: u16,
    pub val: ibv_flow_eth_filter,
    pub mask: ibv_flow_eth_filter,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_ipv4_filter {
    pub src_ip: u32,
    pub dst_ip: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_spec_ipv4 {
    pub type_: ibv_flow_spec_type,
    pub size: u16,
    pub val: ibv_flow_ipv4_filter,
    pub mask: ibv_flow_ipv4_filter,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_ipv4_ext_filter {
    pub src_ip: u32,
    pub dst_ip: u32,
    pub proto: u8,
    pub tos: u8,
    pub ttl: u8,
    pub flags: u8,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_spec_ipv4_ext {
    pub type_: ibv_flow_spec_type,
    pub size: u16,
    pub val: ibv_flow_ipv4_ext_filter,
    pub mask: ibv_flow_ipv4_ext_filter,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_ipv6_filter {
    pub src_ip: [u8; 16usize],
    pub dst_ip: [u8; 16usize],
    pub flow_label: u32,
    pub next_hdr: u8,
    pub traffic_class: u8,
    pub hop_limit: u8,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_spec_ipv6 {
    pub type_: ibv_flow_spec_type,
    pub size: u16,
    pub val: ibv_flow_ipv6_filter,
    pub mask: ibv_flow_ipv6_filter,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_esp_filter {
    pub spi: u32,
    pub seq: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_spec_esp {
    pub type_: ibv_flow_spec_type,
    pub size: u16,
    pub val: ibv_flow_esp_filter,
    pub mask: ibv_flow_esp_filter,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_tcp_udp_filter {
    pub dst_port: u16,
    pub src_port: u16,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_spec_tcp_udp {
    pub type_: ibv_flow_spec_type,
    pub size: u16,
    pub val: ibv_flow_tcp_udp_filter,
    pub mask: ibv_flow_tcp_udp_filter,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_gre_filter {
    pub c_ks_res0_ver: u16,
    pub protocol: u16,
    pub key: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_spec_gre {
    pub type_: ibv_flow_spec_type,
    pub size: u16,
    pub val: ibv_flow_gre_filter,
    pub mask: ibv_flow_gre_filter,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_mpls_filter {
    pub label: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_spec_mpls {
    pub type_: ibv_flow_spec_type,
    pub size: u16,
    pub val: ibv_flow_mpls_filter,
    pub mask: ibv_flow_mpls_filter,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_tunnel_filter {
    pub tunnel_id: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_spec_tunnel {
    pub type_: ibv_flow_spec_type,
    pub size: u16,
    pub val: ibv_flow_tunnel_filter,
    pub mask: ibv_flow_tunnel_filter,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_spec_action_tag {
    pub type_: ibv_flow_spec_type,
    pub size: u16,
    pub tag_id: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_spec_action_drop {
    pub type_: ibv_flow_spec_type,
    pub size: u16,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_spec_action_handle {
    pub type_: ibv_flow_spec_type,
    pub size: u16,
    pub action: *const ibv_flow_action,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_spec_counter_action {
    pub type_: ibv_flow_spec_type,
    pub size: u16,
    pub counters: *mut ibv_counters,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ibv_flow_spec {
    pub __bindgen_anon_1: ibv_flow_spec__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ibv_flow_spec__bindgen_ty_1 {
    pub hdr: ibv_flow_spec__bindgen_ty_1__bindgen_ty_1,
    pub eth: ibv_flow_spec_eth,
    pub ipv4: ibv_flow_spec_ipv4,
    pub tcp_udp: ibv_flow_spec_tcp_udp,
    pub ipv4_ext: ibv_flow_spec_ipv4_ext,
    pub ipv6: ibv_flow_spec_ipv6,
    pub esp: ibv_flow_spec_esp,
    pub tunnel: ibv_flow_spec_tunnel,
    pub gre: ibv_flow_spec_gre,
    pub mpls: ibv_flow_spec_mpls,
    pub flow_tag: ibv_flow_spec_action_tag,
    pub drop: ibv_flow_spec_action_drop,
    pub handle: ibv_flow_spec_action_handle,
    pub flow_count: ibv_flow_spec_counter_action,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_spec__bindgen_ty_1__bindgen_ty_1 {
    pub type_: ibv_flow_spec_type,
    pub size: u16,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_attr {
    pub comp_mask: u32,
    pub type_: ibv_flow_attr_type,
    pub size: u16,
    pub priority: u16,
    pub num_of_specs: u8,
    pub port: u8,
    pub flags: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow {
    pub comp_mask: u32,
    pub context: *mut ibv_context,
    pub handle: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_action {
    pub context: *mut ibv_context,
}
pub const IBV_FLOW_ACTION_ESP_MASK_ESN: ibv_flow_action_esp_mask = 1;
pub type ibv_flow_action_esp_mask = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_flow_action_esp_attr {
    pub esp_attr: *mut ib_uverbs_flow_action_esp,
    pub keymat_proto: ib_uverbs_flow_action_esp_keymat,
    pub keymat_len: u16,
    pub keymat_ptr: *mut ::std::os::raw::c_void,
    pub replay_proto: ib_uverbs_flow_action_esp_replay,
    pub replay_len: u16,
    pub replay_ptr: *mut ::std::os::raw::c_void,
    pub esp_encap: *mut ib_uverbs_flow_action_esp_encap,
    pub comp_mask: u32,
    pub esn: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _ibv_device_ops {
    pub _dummy1: ::std::option::Option<
        unsafe extern "C" fn(
            device: *mut ibv_device,
            cmd_fd: ::std::os::raw::c_int,
        ) -> *mut ibv_context,
    >,
    pub _dummy2: ::std::option::Option<unsafe extern "C" fn(context: *mut ibv_context)>,
}
pub const IBV_SYSFS_NAME_MAX: ::std::os::raw::c_uint = 64;
pub const IBV_SYSFS_PATH_MAX: ::std::os::raw::c_uint = 256;
pub type _bindgen_ty_17 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_device {
    pub _ops: _ibv_device_ops,
    pub node_type: ibv_node_type,
    pub transport_type: ibv_transport_type,
    pub name: [::std::os::raw::c_char; 64usize],
    pub dev_name: [::std::os::raw::c_char; 64usize],
    pub dev_path: [::std::os::raw::c_char; 256usize],
    pub ibdev_path: [::std::os::raw::c_char; 256usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _compat_ibv_port_attr {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_context_ops {
    pub _compat_query_device: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut ibv_context,
            device_attr: *mut ibv_device_attr,
        ) -> ::std::os::raw::c_int,
    >,
    pub _compat_query_port: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut ibv_context,
            port_num: u8,
            port_attr: *mut _compat_ibv_port_attr,
        ) -> ::std::os::raw::c_int,
    >,
    pub _compat_alloc_pd:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub _compat_dealloc_pd:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub _compat_reg_mr:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub _compat_rereg_mr:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub _compat_dereg_mr:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub alloc_mw: ::std::option::Option<
        unsafe extern "C" fn(pd: *mut ibv_pd, type_: ibv_mw_type) -> *mut ibv_mw,
    >,
    pub bind_mw: ::std::option::Option<
        unsafe extern "C" fn(
            qp: *mut ibv_qp,
            mw: *mut ibv_mw,
            mw_bind: *mut ibv_mw_bind,
        ) -> ::std::os::raw::c_int,
    >,
    pub dealloc_mw:
        ::std::option::Option<unsafe extern "C" fn(mw: *mut ibv_mw) -> ::std::os::raw::c_int>,
    pub _compat_create_cq:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub poll_cq: ::std::option::Option<
        unsafe extern "C" fn(
            cq: *mut ibv_cq,
            num_entries: ::std::os::raw::c_int,
            wc: *mut ibv_wc,
        ) -> ::std::os::raw::c_int,
    >,
    pub req_notify_cq: ::std::option::Option<
        unsafe extern "C" fn(
            cq: *mut ibv_cq,
            solicited_only: ::std::os::raw::c_int,
        ) -> ::std::os::raw::c_int,
    >,
    pub _compat_cq_event:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub _compat_resize_cq:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub _compat_destroy_cq:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub _compat_create_srq:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub _compat_modify_srq:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub _compat_query_srq:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub _compat_destroy_srq:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub post_srq_recv: ::std::option::Option<
        unsafe extern "C" fn(
            srq: *mut ibv_srq,
            recv_wr: *mut ibv_recv_wr,
            bad_recv_wr: *mut *mut ibv_recv_wr,
        ) -> ::std::os::raw::c_int,
    >,
    pub _compat_create_qp:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub _compat_query_qp:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub _compat_modify_qp:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub _compat_destroy_qp:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub post_send: ::std::option::Option<
        unsafe extern "C" fn(
            qp: *mut ibv_qp,
            wr: *mut ibv_send_wr,
            bad_wr: *mut *mut ibv_send_wr,
        ) -> ::std::os::raw::c_int,
    >,
    pub post_recv: ::std::option::Option<
        unsafe extern "C" fn(
            qp: *mut ibv_qp,
            wr: *mut ibv_recv_wr,
            bad_wr: *mut *mut ibv_recv_wr,
        ) -> ::std::os::raw::c_int,
    >,
    pub _compat_create_ah:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub _compat_destroy_ah:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub _compat_attach_mcast:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub _compat_detach_mcast:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub _compat_async_event:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
}
#[repr(C)]
pub struct ibv_context {
    pub device: *mut ibv_device,
    pub ops: ibv_context_ops,
    pub cmd_fd: ::std::os::raw::c_int,
    pub async_fd: ::std::os::raw::c_int,
    pub num_comp_vectors: ::std::os::raw::c_int,
    pub mutex: pthread_mutex_t,
    pub abi_compat: *mut ::std::os::raw::c_void,
}
pub const IBV_CQ_INIT_ATTR_MASK_FLAGS: ibv_cq_init_attr_mask = 1;
pub const IBV_CQ_INIT_ATTR_MASK_PD: ibv_cq_init_attr_mask = 2;
pub type ibv_cq_init_attr_mask = ::std::os::raw::c_uint;
pub const IBV_CREATE_CQ_ATTR_SINGLE_THREADED: ibv_create_cq_attr_flags = 1;
pub const IBV_CREATE_CQ_ATTR_IGNORE_OVERRUN: ibv_create_cq_attr_flags = 2;
pub type ibv_create_cq_attr_flags = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_cq_init_attr_ex {
    pub cqe: u32,
    pub cq_context: *mut ::std::os::raw::c_void,
    pub channel: *mut ibv_comp_channel,
    pub comp_vector: u32,
    pub wc_flags: u64,
    pub comp_mask: u32,
    pub flags: u32,
    pub parent_domain: *mut ibv_pd,
}
pub const IBV_PARENT_DOMAIN_INIT_ATTR_ALLOCATORS: ibv_parent_domain_init_attr_mask = 1;
pub const IBV_PARENT_DOMAIN_INIT_ATTR_PD_CONTEXT: ibv_parent_domain_init_attr_mask = 2;
pub type ibv_parent_domain_init_attr_mask = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_parent_domain_init_attr {
    pub pd: *mut ibv_pd,
    pub td: *mut ibv_td,
    pub comp_mask: u32,
    pub alloc: ::std::option::Option<
        unsafe extern "C" fn(
            pd: *mut ibv_pd,
            pd_context: *mut ::std::os::raw::c_void,
            size: usize,
            alignment: usize,
            resource_type: u64,
        ) -> *mut ::std::os::raw::c_void,
    >,
    pub free: ::std::option::Option<
        unsafe extern "C" fn(
            pd: *mut ibv_pd,
            pd_context: *mut ::std::os::raw::c_void,
            ptr: *mut ::std::os::raw::c_void,
            resource_type: u64,
        ),
    >,
    pub pd_context: *mut ::std::os::raw::c_void,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_counters_init_attr {
    pub comp_mask: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_counters {
    pub context: *mut ibv_context,
}
pub const IBV_COUNTER_PACKETS: ibv_counter_description = 0;
pub const IBV_COUNTER_BYTES: ibv_counter_description = 1;
pub type ibv_counter_description = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ibv_counter_attach_attr {
    pub counter_desc: ibv_counter_description,
    pub index: u32,
    pub comp_mask: u32,
}
pub const IBV_READ_COUNTERS_ATTR_PREFER_CACHED: ibv_read_counters_flags = 1;
pub type ibv_read_counters_flags = ::std::os::raw::c_uint;
pub const IBV_VALUES_MASK_RAW_CLOCK: ibv_values_mask = 1;
pub const IBV_VALUES_MASK_RESERVED: ibv_values_mask = 2;
pub type ibv_values_mask = ::std::os::raw::c_uint;
#[repr(C)]
pub struct ibv_values_ex {
    pub comp_mask: u32,
    pub raw_clock: timespec,
}
#[repr(C)]
pub struct verbs_context {
    pub query_port: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut ibv_context,
            port_num: u8,
            port_attr: *mut ibv_port_attr,
            port_attr_len: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub advise_mr: ::std::option::Option<
        unsafe extern "C" fn(
            pd: *mut ibv_pd,
            advice: ib_uverbs_advise_mr_advice,
            flags: u32,
            sg_list: *mut ibv_sge,
            num_sges: u32,
        ) -> ::std::os::raw::c_int,
    >,
    pub alloc_null_mr: ::std::option::Option<unsafe extern "C" fn(pd: *mut ibv_pd) -> *mut ibv_mr>,
    pub read_counters: ::std::option::Option<
        unsafe extern "C" fn(
            counters: *mut ibv_counters,
            counters_value: *mut u64,
            ncounters: u32,
            flags: u32,
        ) -> ::std::os::raw::c_int,
    >,
    pub attach_counters_point_flow: ::std::option::Option<
        unsafe extern "C" fn(
            counters: *mut ibv_counters,
            attr: *mut ibv_counter_attach_attr,
            flow: *mut ibv_flow,
        ) -> ::std::os::raw::c_int,
    >,
    pub create_counters: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut ibv_context,
            init_attr: *mut ibv_counters_init_attr,
        ) -> *mut ibv_counters,
    >,
    pub destroy_counters: ::std::option::Option<
        unsafe extern "C" fn(counters: *mut ibv_counters) -> ::std::os::raw::c_int,
    >,
    pub reg_dm_mr: ::std::option::Option<
        unsafe extern "C" fn(
            pd: *mut ibv_pd,
            dm: *mut ibv_dm,
            dm_offset: u64,
            length: usize,
            access: ::std::os::raw::c_uint,
        ) -> *mut ibv_mr,
    >,
    pub alloc_dm: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut ibv_context,
            attr: *mut ibv_alloc_dm_attr,
        ) -> *mut ibv_dm,
    >,
    pub free_dm:
        ::std::option::Option<unsafe extern "C" fn(dm: *mut ibv_dm) -> ::std::os::raw::c_int>,
    pub modify_flow_action_esp: ::std::option::Option<
        unsafe extern "C" fn(
            action: *mut ibv_flow_action,
            attr: *mut ibv_flow_action_esp_attr,
        ) -> ::std::os::raw::c_int,
    >,
    pub destroy_flow_action: ::std::option::Option<
        unsafe extern "C" fn(action: *mut ibv_flow_action) -> ::std::os::raw::c_int,
    >,
    pub create_flow_action_esp: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut ibv_context,
            attr: *mut ibv_flow_action_esp_attr,
        ) -> *mut ibv_flow_action,
    >,
    pub modify_qp_rate_limit: ::std::option::Option<
        unsafe extern "C" fn(
            qp: *mut ibv_qp,
            attr: *mut ibv_qp_rate_limit_attr,
        ) -> ::std::os::raw::c_int,
    >,
    pub alloc_parent_domain: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut ibv_context,
            attr: *mut ibv_parent_domain_init_attr,
        ) -> *mut ibv_pd,
    >,
    pub dealloc_td:
        ::std::option::Option<unsafe extern "C" fn(td: *mut ibv_td) -> ::std::os::raw::c_int>,
    pub alloc_td: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut ibv_context,
            init_attr: *mut ibv_td_init_attr,
        ) -> *mut ibv_td,
    >,
    pub modify_cq: ::std::option::Option<
        unsafe extern "C" fn(
            cq: *mut ibv_cq,
            attr: *mut ibv_modify_cq_attr,
        ) -> ::std::os::raw::c_int,
    >,
    pub post_srq_ops: ::std::option::Option<
        unsafe extern "C" fn(
            srq: *mut ibv_srq,
            op: *mut ibv_ops_wr,
            bad_op: *mut *mut ibv_ops_wr,
        ) -> ::std::os::raw::c_int,
    >,
    pub destroy_rwq_ind_table: ::std::option::Option<
        unsafe extern "C" fn(rwq_ind_table: *mut ibv_rwq_ind_table) -> ::std::os::raw::c_int,
    >,
    pub create_rwq_ind_table: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut ibv_context,
            init_attr: *mut ibv_rwq_ind_table_init_attr,
        ) -> *mut ibv_rwq_ind_table,
    >,
    pub destroy_wq:
        ::std::option::Option<unsafe extern "C" fn(wq: *mut ibv_wq) -> ::std::os::raw::c_int>,
    pub modify_wq: ::std::option::Option<
        unsafe extern "C" fn(wq: *mut ibv_wq, wq_attr: *mut ibv_wq_attr) -> ::std::os::raw::c_int,
    >,
    pub create_wq: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut ibv_context,
            wq_init_attr: *mut ibv_wq_init_attr,
        ) -> *mut ibv_wq,
    >,
    pub query_rt_values: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut ibv_context,
            values: *mut ibv_values_ex,
        ) -> ::std::os::raw::c_int,
    >,
    pub create_cq_ex: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut ibv_context,
            init_attr: *mut ibv_cq_init_attr_ex,
        ) -> *mut ibv_cq_ex,
    >,
    pub priv_: *mut verbs_ex_private,
    pub query_device_ex: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut ibv_context,
            input: *const ibv_query_device_ex_input,
            attr: *mut ibv_device_attr_ex,
            attr_size: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub ibv_destroy_flow:
        ::std::option::Option<unsafe extern "C" fn(flow: *mut ibv_flow) -> ::std::os::raw::c_int>,
    pub ABI_placeholder2: ::std::option::Option<unsafe extern "C" fn()>,
    pub ibv_create_flow: ::std::option::Option<
        unsafe extern "C" fn(qp: *mut ibv_qp, flow_attr: *mut ibv_flow_attr) -> *mut ibv_flow,
    >,
    pub ABI_placeholder1: ::std::option::Option<unsafe extern "C" fn()>,
    pub open_qp: ::std::option::Option<
        unsafe extern "C" fn(context: *mut ibv_context, attr: *mut ibv_qp_open_attr) -> *mut ibv_qp,
    >,
    pub create_qp_ex: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut ibv_context,
            qp_init_attr_ex: *mut ibv_qp_init_attr_ex,
        ) -> *mut ibv_qp,
    >,
    pub get_srq_num: ::std::option::Option<
        unsafe extern "C" fn(srq: *mut ibv_srq, srq_num: *mut u32) -> ::std::os::raw::c_int,
    >,
    pub create_srq_ex: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut ibv_context,
            srq_init_attr_ex: *mut ibv_srq_init_attr_ex,
        ) -> *mut ibv_srq,
    >,
    pub open_xrcd: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut ibv_context,
            xrcd_init_attr: *mut ibv_xrcd_init_attr,
        ) -> *mut ibv_xrcd,
    >,
    pub close_xrcd:
        ::std::option::Option<unsafe extern "C" fn(xrcd: *mut ibv_xrcd) -> ::std::os::raw::c_int>,
    pub _ABI_placeholder3: u64,
    pub sz: usize,
    pub context: ibv_context,
}
extern "C" {
    #[doc = " ibv_get_device_list - Get list of IB devices currently available"]
    #[doc = " @num_devices: optional.  if non-NULL, set to the number of devices"]
    #[doc = " returned in the array."]
    #[doc = ""]
    #[doc = " Return a NULL-terminated array of IB devices.  The array can be"]
    #[doc = " released with ibv_free_device_list()."]
    pub fn ibv_get_device_list(num_devices: *mut ::std::os::raw::c_int) -> *mut *mut ibv_device;
}
extern "C" {
    #[doc = " ibv_free_device_list - Free list from ibv_get_device_list()"]
    #[doc = ""]
    #[doc = " Free an array of devices returned from ibv_get_device_list().  Once"]
    #[doc = " the array is freed, pointers to devices that were not opened with"]
    #[doc = " ibv_open_device() are no longer valid.  Client code must open all"]
    #[doc = " devices it intends to use before calling ibv_free_device_list()."]
    pub fn ibv_free_device_list(list: *mut *mut ibv_device);
}
extern "C" {
    #[doc = " ibv_get_device_name - Return kernel device name"]
    pub fn ibv_get_device_name(device: *mut ibv_device) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " ibv_get_device_index - Return kernel device index"]
    #[doc = ""]
    #[doc = " Available for the kernel with support of IB device query"]
    #[doc = " over netlink interface. For the unsupported kernels, the"]
    #[doc = " relevant -1 will be returned."]
    pub fn ibv_get_device_index(device: *mut ibv_device) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_get_device_guid - Return device's node GUID"]
    pub fn ibv_get_device_guid(device: *mut ibv_device) -> __be64;
}
extern "C" {
    #[doc = " ibv_open_device - Initialize device for use"]
    pub fn ibv_open_device(device: *mut ibv_device) -> *mut ibv_context;
}
extern "C" {
    #[doc = " ibv_close_device - Release device"]
    pub fn ibv_close_device(context: *mut ibv_context) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_import_device - Import device"]
    pub fn ibv_import_device(cmd_fd: ::std::os::raw::c_int) -> *mut ibv_context;
}
extern "C" {
    #[doc = " ibv_import_pd - Import a protetion domain"]
    pub fn ibv_import_pd(context: *mut ibv_context, pd_handle: u32) -> *mut ibv_pd;
}
extern "C" {
    #[doc = " ibv_unimport_pd - Unimport a protetion domain"]
    pub fn ibv_unimport_pd(pd: *mut ibv_pd);
}
extern "C" {
    #[doc = " ibv_import_mr - Import a memory region"]
    pub fn ibv_import_mr(pd: *mut ibv_pd, mr_handle: u32) -> *mut ibv_mr;
}
extern "C" {
    #[doc = " ibv_unimport_mr - Unimport a memory region"]
    pub fn ibv_unimport_mr(mr: *mut ibv_mr);
}
extern "C" {
    #[doc = " ibv_import_dm - Import a device memory"]
    pub fn ibv_import_dm(context: *mut ibv_context, dm_handle: u32) -> *mut ibv_dm;
}
extern "C" {
    #[doc = " ibv_unimport_dm - Unimport a device memory"]
    pub fn ibv_unimport_dm(dm: *mut ibv_dm);
}
extern "C" {
    #[doc = " ibv_get_async_event - Get next async event"]
    #[doc = " @event: Pointer to use to return async event"]
    #[doc = ""]
    #[doc = " All async events returned by ibv_get_async_event() must eventually"]
    #[doc = " be acknowledged with ibv_ack_async_event()."]
    pub fn ibv_get_async_event(
        context: *mut ibv_context,
        event: *mut ibv_async_event,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_ack_async_event - Acknowledge an async event"]
    #[doc = " @event: Event to be acknowledged."]
    #[doc = ""]
    #[doc = " All async events which are returned by ibv_get_async_event() must"]
    #[doc = " be acknowledged.  To avoid races, destroying an object (CQ, SRQ or"]
    #[doc = " QP) will wait for all affiliated events to be acknowledged, so"]
    #[doc = " there should be a one-to-one correspondence between acks and"]
    #[doc = " successful gets."]
    pub fn ibv_ack_async_event(event: *mut ibv_async_event);
}
extern "C" {
    #[doc = " ibv_query_device - Get device properties"]
    pub fn ibv_query_device(
        context: *mut ibv_context,
        device_attr: *mut ibv_device_attr,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_query_gid - Get a GID table entry"]
    pub fn ibv_query_gid(
        context: *mut ibv_context,
        port_num: u8,
        index: ::std::os::raw::c_int,
        gid: *mut ibv_gid,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn _ibv_query_gid_ex(
        context: *mut ibv_context,
        port_num: u32,
        gid_index: u32,
        entry: *mut ibv_gid_entry,
        flags: u32,
        entry_size: usize,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_query_pkey - Get a P_Key table entry"]
    pub fn ibv_query_pkey(
        context: *mut ibv_context,
        port_num: u8,
        index: ::std::os::raw::c_int,
        pkey: *mut __be16,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_get_pkey_index - Translate a P_Key into a P_Key index"]
    pub fn ibv_get_pkey_index(
        context: *mut ibv_context,
        port_num: u8,
        pkey: __be16,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_alloc_pd - Allocate a protection domain"]
    pub fn ibv_alloc_pd(context: *mut ibv_context) -> *mut ibv_pd;
}
extern "C" {
    #[doc = " ibv_dealloc_pd - Free a protection domain"]
    pub fn ibv_dealloc_pd(pd: *mut ibv_pd) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_reg_mr_iova2 - Register memory region with a virtual offset address"]
    #[doc = ""]
    #[doc = " This version will be called if ibv_reg_mr or ibv_reg_mr_iova were called"]
    #[doc = " with at least one potential access flag from the IBV_OPTIONAL_ACCESS_RANGE"]
    #[doc = " flags range The optional access flags will be masked if running over kernel"]
    #[doc = " that does not support passing them."]
    pub fn ibv_reg_mr_iova2(
        pd: *mut ibv_pd,
        addr: *mut ::std::os::raw::c_void,
        length: usize,
        iova: u64,
        access: ::std::os::raw::c_uint,
    ) -> *mut ibv_mr;
}
extern "C" {
    #[doc = " ibv_reg_mr_iova - Register a memory region with a virtual offset"]
    #[doc = " address"]
    pub fn ibv_reg_mr_iova(
        pd: *mut ibv_pd,
        addr: *mut ::std::os::raw::c_void,
        length: usize,
        iova: u64,
        access: ::std::os::raw::c_int,
    ) -> *mut ibv_mr;
}
extern "C" {
    #[doc = " ibv_reg_dmabuf_mr - Register a dambuf-based memory region"]
    pub fn ibv_reg_dmabuf_mr(
        pd: *mut ibv_pd,
        offset: u64,
        length: usize,
        iova: u64,
        fd: ::std::os::raw::c_int,
        access: ::std::os::raw::c_int,
    ) -> *mut ibv_mr;
}
pub const IBV_REREG_MR_ERR_INPUT: ibv_rereg_mr_err_code = -1;
pub const IBV_REREG_MR_ERR_DONT_FORK_NEW: ibv_rereg_mr_err_code = -2;
pub const IBV_REREG_MR_ERR_DO_FORK_OLD: ibv_rereg_mr_err_code = -3;
pub const IBV_REREG_MR_ERR_CMD: ibv_rereg_mr_err_code = -4;
pub const IBV_REREG_MR_ERR_CMD_AND_DO_FORK_NEW: ibv_rereg_mr_err_code = -5;
pub type ibv_rereg_mr_err_code = ::std::os::raw::c_int;
extern "C" {
    #[doc = " ibv_rereg_mr - Re-Register a memory region"]
    pub fn ibv_rereg_mr(
        mr: *mut ibv_mr,
        flags: ::std::os::raw::c_int,
        pd: *mut ibv_pd,
        addr: *mut ::std::os::raw::c_void,
        length: usize,
        access: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_dereg_mr - Deregister a memory region"]
    pub fn ibv_dereg_mr(mr: *mut ibv_mr) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_create_comp_channel - Create a completion event channel"]
    pub fn ibv_create_comp_channel(context: *mut ibv_context) -> *mut ibv_comp_channel;
}
extern "C" {
    #[doc = " ibv_destroy_comp_channel - Destroy a completion event channel"]
    pub fn ibv_destroy_comp_channel(channel: *mut ibv_comp_channel) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_create_cq - Create a completion queue"]
    #[doc = " @context - Context CQ will be attached to"]
    #[doc = " @cqe - Minimum number of entries required for CQ"]
    #[doc = " @cq_context - Consumer-supplied context returned for completion events"]
    #[doc = " @channel - Completion channel where completion events will be queued."]
    #[doc = "     May be NULL if completion events will not be used."]
    #[doc = " @comp_vector - Completion vector used to signal completion events."]
    #[doc = "     Must be >= 0 and < context->num_comp_vectors."]
    pub fn ibv_create_cq(
        context: *mut ibv_context,
        cqe: ::std::os::raw::c_int,
        cq_context: *mut ::std::os::raw::c_void,
        channel: *mut ibv_comp_channel,
        comp_vector: ::std::os::raw::c_int,
    ) -> *mut ibv_cq;
}
extern "C" {
    #[doc = " ibv_resize_cq - Modifies the capacity of the CQ."]
    #[doc = " @cq: The CQ to resize."]
    #[doc = " @cqe: The minimum size of the CQ."]
    #[doc = ""]
    #[doc = " Users can examine the cq structure to determine the actual CQ size."]
    pub fn ibv_resize_cq(cq: *mut ibv_cq, cqe: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_destroy_cq - Destroy a completion queue"]
    pub fn ibv_destroy_cq(cq: *mut ibv_cq) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_get_cq_event - Read next CQ event"]
    #[doc = " @channel: Channel to get next event from."]
    #[doc = " @cq: Used to return pointer to CQ."]
    #[doc = " @cq_context: Used to return consumer-supplied CQ context."]
    #[doc = ""]
    #[doc = " All completion events returned by ibv_get_cq_event() must"]
    #[doc = " eventually be acknowledged with ibv_ack_cq_events()."]
    pub fn ibv_get_cq_event(
        channel: *mut ibv_comp_channel,
        cq: *mut *mut ibv_cq,
        cq_context: *mut *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_ack_cq_events - Acknowledge CQ completion events"]
    #[doc = " @cq: CQ to acknowledge events for"]
    #[doc = " @nevents: Number of events to acknowledge."]
    #[doc = ""]
    #[doc = " All completion events which are returned by ibv_get_cq_event() must"]
    #[doc = " be acknowledged.  To avoid races, ibv_destroy_cq() will wait for"]
    #[doc = " all completion events to be acknowledged, so there should be a"]
    #[doc = " one-to-one correspondence between acks and successful gets.  An"]
    #[doc = " application may accumulate multiple completion events and"]
    #[doc = " acknowledge them in a single call to ibv_ack_cq_events() by passing"]
    #[doc = " the number of events to ack in @nevents."]
    pub fn ibv_ack_cq_events(cq: *mut ibv_cq, nevents: ::std::os::raw::c_uint);
}
extern "C" {
    #[doc = " ibv_create_srq - Creates a SRQ associated with the specified protection"]
    #[doc = "   domain."]
    #[doc = " @pd: The protection domain associated with the SRQ."]
    #[doc = " @srq_init_attr: A list of initial attributes required to create the SRQ."]
    #[doc = ""]
    #[doc = " srq_attr->max_wr and srq_attr->max_sge are read the determine the"]
    #[doc = " requested size of the SRQ, and set to the actual values allocated"]
    #[doc = " on return.  If ibv_create_srq() succeeds, then max_wr and max_sge"]
    #[doc = " will always be at least as large as the requested values."]
    pub fn ibv_create_srq(pd: *mut ibv_pd, srq_init_attr: *mut ibv_srq_init_attr) -> *mut ibv_srq;
}
extern "C" {
    #[doc = " ibv_modify_srq - Modifies the attributes for the specified SRQ."]
    #[doc = " @srq: The SRQ to modify."]
    #[doc = " @srq_attr: On input, specifies the SRQ attributes to modify.  On output,"]
    #[doc = "   the current values of selected SRQ attributes are returned."]
    #[doc = " @srq_attr_mask: A bit-mask used to specify which attributes of the SRQ"]
    #[doc = "   are being modified."]
    #[doc = ""]
    #[doc = " The mask may contain IBV_SRQ_MAX_WR to resize the SRQ and/or"]
    #[doc = " IBV_SRQ_LIMIT to set the SRQ's limit and request notification when"]
    #[doc = " the number of receives queued drops below the limit."]
    pub fn ibv_modify_srq(
        srq: *mut ibv_srq,
        srq_attr: *mut ibv_srq_attr,
        srq_attr_mask: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_query_srq - Returns the attribute list and current values for the"]
    #[doc = "   specified SRQ."]
    #[doc = " @srq: The SRQ to query."]
    #[doc = " @srq_attr: The attributes of the specified SRQ."]
    pub fn ibv_query_srq(srq: *mut ibv_srq, srq_attr: *mut ibv_srq_attr) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_destroy_srq - Destroys the specified SRQ."]
    #[doc = " @srq: The SRQ to destroy."]
    pub fn ibv_destroy_srq(srq: *mut ibv_srq) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_create_qp - Create a queue pair."]
    pub fn ibv_create_qp(pd: *mut ibv_pd, qp_init_attr: *mut ibv_qp_init_attr) -> *mut ibv_qp;
}
extern "C" {
    #[doc = " ibv_modify_qp - Modify a queue pair."]
    pub fn ibv_modify_qp(
        qp: *mut ibv_qp,
        attr: *mut ibv_qp_attr,
        attr_mask: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_query_qp_data_in_order - Checks whether the data is guaranteed to be"]
    #[doc = "   written in-order."]
    #[doc = " @qp: The QP to query."]
    #[doc = " @op: Operation type."]
    #[doc = " @flags: Extra field for future input. For now must be 0."]
    #[doc = ""]
    #[doc = " Return Value"]
    #[doc = " ibv_query_qp_data_in_order() returns 1 if the data is guaranteed to be"]
    #[doc = "   written in-order, 0 otherwise."]
    pub fn ibv_query_qp_data_in_order(
        qp: *mut ibv_qp,
        op: ibv_wr_opcode,
        flags: u32,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_query_qp - Returns the attribute list and current values for the"]
    #[doc = "   specified QP."]
    #[doc = " @qp: The QP to query."]
    #[doc = " @attr: The attributes of the specified QP."]
    #[doc = " @attr_mask: A bit-mask used to select specific attributes to query."]
    #[doc = " @init_attr: Additional attributes of the selected QP."]
    #[doc = ""]
    #[doc = " The qp_attr_mask may be used to limit the query to gathering only the"]
    #[doc = " selected attributes."]
    pub fn ibv_query_qp(
        qp: *mut ibv_qp,
        attr: *mut ibv_qp_attr,
        attr_mask: ::std::os::raw::c_int,
        init_attr: *mut ibv_qp_init_attr,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_destroy_qp - Destroy a queue pair."]
    pub fn ibv_destroy_qp(qp: *mut ibv_qp) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_create_ah - Create an address handle."]
    pub fn ibv_create_ah(pd: *mut ibv_pd, attr: *mut ibv_ah_attr) -> *mut ibv_ah;
}
extern "C" {
    #[doc = " ibv_init_ah_from_wc - Initializes address handle attributes from a"]
    #[doc = "   work completion."]
    #[doc = " @context: Device context on which the received message arrived."]
    #[doc = " @port_num: Port on which the received message arrived."]
    #[doc = " @wc: Work completion associated with the received message."]
    #[doc = " @grh: References the received global route header.  This parameter is"]
    #[doc = "   ignored unless the work completion indicates that the GRH is valid."]
    #[doc = " @ah_attr: Returned attributes that can be used when creating an address"]
    #[doc = "   handle for replying to the message."]
    pub fn ibv_init_ah_from_wc(
        context: *mut ibv_context,
        port_num: u8,
        wc: *mut ibv_wc,
        grh: *mut ibv_grh,
        ah_attr: *mut ibv_ah_attr,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_create_ah_from_wc - Creates an address handle associated with the"]
    #[doc = "   sender of the specified work completion."]
    #[doc = " @pd: The protection domain associated with the address handle."]
    #[doc = " @wc: Work completion information associated with a received message."]
    #[doc = " @grh: References the received global route header.  This parameter is"]
    #[doc = "   ignored unless the work completion indicates that the GRH is valid."]
    #[doc = " @port_num: The outbound port number to associate with the address."]
    #[doc = ""]
    #[doc = " The address handle is used to reference a local or global destination"]
    #[doc = " in all UD QP post sends."]
    pub fn ibv_create_ah_from_wc(
        pd: *mut ibv_pd,
        wc: *mut ibv_wc,
        grh: *mut ibv_grh,
        port_num: u8,
    ) -> *mut ibv_ah;
}
extern "C" {
    #[doc = " ibv_destroy_ah - Destroy an address handle."]
    pub fn ibv_destroy_ah(ah: *mut ibv_ah) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_attach_mcast - Attaches the specified QP to a multicast group."]
    #[doc = " @qp: QP to attach to the multicast group.  The QP must be a UD QP."]
    #[doc = " @gid: Multicast group GID."]
    #[doc = " @lid: Multicast group LID in host byte order."]
    #[doc = ""]
    #[doc = " In order to route multicast packets correctly, subnet"]
    #[doc = " administration must have created the multicast group and configured"]
    #[doc = " the fabric appropriately.  The port associated with the specified"]
    #[doc = " QP must also be a member of the multicast group."]
    pub fn ibv_attach_mcast(
        qp: *mut ibv_qp,
        gid: *const ibv_gid,
        lid: u16,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_detach_mcast - Detaches the specified QP from a multicast group."]
    #[doc = " @qp: QP to detach from the multicast group."]
    #[doc = " @gid: Multicast group GID."]
    #[doc = " @lid: Multicast group LID in host byte order."]
    pub fn ibv_detach_mcast(
        qp: *mut ibv_qp,
        gid: *const ibv_gid,
        lid: u16,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_fork_init - Prepare data structures so that fork() may be used"]
    #[doc = " safely.  If this function is not called or returns a non-zero"]
    #[doc = " status, then libibverbs data structures are not fork()-safe and the"]
    #[doc = " effect of an application calling fork() is undefined."]
    pub fn ibv_fork_init() -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_is_fork_initialized - Check if fork support"]
    #[doc = " (ibv_fork_init) was enabled."]
    pub fn ibv_is_fork_initialized() -> ibv_fork_status;
}
extern "C" {
    #[doc = " ibv_node_type_str - Return string describing node_type enum value"]
    pub fn ibv_node_type_str(node_type: ibv_node_type) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " ibv_port_state_str - Return string describing port_state enum value"]
    pub fn ibv_port_state_str(port_state: ibv_port_state) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " ibv_event_type_str - Return string describing event_type enum value"]
    pub fn ibv_event_type_str(event: ibv_event_type) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn ibv_resolve_eth_l2_from_gid(
        context: *mut ibv_context,
        attr: *mut ibv_ah_attr,
        eth_mac: *mut u8,
        vid: *mut u16,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_set_ece - Set ECE options"]
    pub fn ibv_set_ece(qp: *mut ibv_qp, ece: *mut ibv_ece) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " ibv_query_ece - Get accepted ECE options"]
    pub fn ibv_query_ece(qp: *mut ibv_qp, ece: *mut ibv_ece) -> ::std::os::raw::c_int;
}
pub type sa_family_t = ::std::os::raw::c_ushort;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sockaddr {
    pub sa_family: sa_family_t,
    pub sa_data: [::std::os::raw::c_char; 14usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sockaddr_storage {
    pub ss_family: sa_family_t,
    pub __ss_padding: [::std::os::raw::c_char; 118usize],
    pub __ss_align: ::std::os::raw::c_ulong,
}
pub type in_addr_t = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct in_addr {
    pub s_addr: in_addr_t,
}
pub type in_port_t = u16;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct in6_addr {
    pub __in6_u: in6_addr__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union in6_addr__bindgen_ty_1 {
    pub __u6_addr8: [u8; 16usize],
    pub __u6_addr16: [u16; 8usize],
    pub __u6_addr32: [u32; 4usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sockaddr_in {
    pub sin_family: sa_family_t,
    pub sin_port: in_port_t,
    pub sin_addr: in_addr,
    pub sin_zero: [::std::os::raw::c_uchar; 8usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct sockaddr_in6 {
    pub sin6_family: sa_family_t,
    pub sin6_port: in_port_t,
    pub sin6_flowinfo: u32,
    pub sin6_addr: in6_addr,
    pub sin6_scope_id: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ibv_sa_path_rec {
    pub dgid: ibv_gid,
    pub sgid: ibv_gid,
    pub dlid: __be16,
    pub slid: __be16,
    pub raw_traffic: ::std::os::raw::c_int,
    pub flow_label: __be32,
    pub hop_limit: u8,
    pub traffic_class: u8,
    pub reversible: ::std::os::raw::c_int,
    pub numb_path: u8,
    pub pkey: __be16,
    pub sl: u8,
    pub mtu_selector: u8,
    pub mtu: u8,
    pub rate_selector: u8,
    pub rate: u8,
    pub packet_life_time_selector: u8,
    pub packet_life_time: u8,
    pub preference: u8,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ibv_sa_mcmember_rec {
    pub mgid: ibv_gid,
    pub port_gid: ibv_gid,
    pub qkey: u32,
    pub mlid: u16,
    pub mtu_selector: u8,
    pub mtu: u8,
    pub traffic_class: u8,
    pub pkey: u16,
    pub rate_selector: u8,
    pub rate: u8,
    pub packet_life_time_selector: u8,
    pub packet_life_time: u8,
    pub sl: u8,
    pub flow_label: u32,
    pub hop_limit: u8,
    pub scope: u8,
    pub join_state: u8,
    pub proxy_join: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ibv_sa_service_rec {
    pub id: u64,
    pub gid: ibv_gid,
    pub pkey: u16,
    pub lease: u32,
    pub key: [u8; 16usize],
    pub name: [u8; 64usize],
    pub data8: [u8; 16usize],
    pub data16: [u16; 8usize],
    pub data32: [u32; 4usize],
    pub data64: [u64; 2usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ibv_path_record {
    pub service_id: __be64,
    pub dgid: ibv_gid,
    pub sgid: ibv_gid,
    pub dlid: __be16,
    pub slid: __be16,
    pub flowlabel_hoplimit: __be32,
    pub tclass: u8,
    pub reversible_numpath: u8,
    pub pkey: __be16,
    pub qosclass_sl: __be16,
    pub mtu: u8,
    pub rate: u8,
    pub packetlifetime: u8,
    pub preference: u8,
    pub reserved: [u8; 6usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ibv_path_data {
    pub flags: u32,
    pub reserved: u32,
    pub path: ibv_path_record,
}
pub const RDMA_CM_EVENT_ADDR_RESOLVED: rdma_cm_event_type = 0;
pub const RDMA_CM_EVENT_ADDR_ERROR: rdma_cm_event_type = 1;
pub const RDMA_CM_EVENT_ROUTE_RESOLVED: rdma_cm_event_type = 2;
pub const RDMA_CM_EVENT_ROUTE_ERROR: rdma_cm_event_type = 3;
pub const RDMA_CM_EVENT_CONNECT_REQUEST: rdma_cm_event_type = 4;
pub const RDMA_CM_EVENT_CONNECT_RESPONSE: rdma_cm_event_type = 5;
pub const RDMA_CM_EVENT_CONNECT_ERROR: rdma_cm_event_type = 6;
pub const RDMA_CM_EVENT_UNREACHABLE: rdma_cm_event_type = 7;
pub const RDMA_CM_EVENT_REJECTED: rdma_cm_event_type = 8;
pub const RDMA_CM_EVENT_ESTABLISHED: rdma_cm_event_type = 9;
pub const RDMA_CM_EVENT_DISCONNECTED: rdma_cm_event_type = 10;
pub const RDMA_CM_EVENT_DEVICE_REMOVAL: rdma_cm_event_type = 11;
pub const RDMA_CM_EVENT_MULTICAST_JOIN: rdma_cm_event_type = 12;
pub const RDMA_CM_EVENT_MULTICAST_ERROR: rdma_cm_event_type = 13;
pub const RDMA_CM_EVENT_ADDR_CHANGE: rdma_cm_event_type = 14;
pub const RDMA_CM_EVENT_TIMEWAIT_EXIT: rdma_cm_event_type = 15;
pub type rdma_cm_event_type = ::std::os::raw::c_uint;
pub const RDMA_PS_IPOIB: rdma_port_space = 2;
pub const RDMA_PS_TCP: rdma_port_space = 262;
pub const RDMA_PS_UDP: rdma_port_space = 273;
pub const RDMA_PS_IB: rdma_port_space = 319;
pub type rdma_port_space = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rdma_ib_addr {
    pub sgid: ibv_gid,
    pub dgid: ibv_gid,
    pub pkey: __be16,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rdma_addr {
    pub __bindgen_anon_1: rdma_addr__bindgen_ty_1,
    pub __bindgen_anon_2: rdma_addr__bindgen_ty_2,
    pub addr: rdma_addr__bindgen_ty_3,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union rdma_addr__bindgen_ty_1 {
    pub src_addr: sockaddr,
    pub src_sin: sockaddr_in,
    pub src_sin6: sockaddr_in6,
    pub src_storage: sockaddr_storage,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union rdma_addr__bindgen_ty_2 {
    pub dst_addr: sockaddr,
    pub dst_sin: sockaddr_in,
    pub dst_sin6: sockaddr_in6,
    pub dst_storage: sockaddr_storage,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union rdma_addr__bindgen_ty_3 {
    pub ibaddr: rdma_ib_addr,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rdma_route {
    pub addr: rdma_addr,
    pub path_rec: *mut ibv_sa_path_rec,
    pub num_paths: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rdma_event_channel {
    pub fd: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rdma_cm_id {
    pub verbs: *mut ibv_context,
    pub channel: *mut rdma_event_channel,
    pub context: *mut ::std::os::raw::c_void,
    pub qp: *mut ibv_qp,
    pub route: rdma_route,
    pub ps: rdma_port_space,
    pub port_num: u8,
    pub event: *mut rdma_cm_event,
    pub send_cq_channel: *mut ibv_comp_channel,
    pub send_cq: *mut ibv_cq,
    pub recv_cq_channel: *mut ibv_comp_channel,
    pub recv_cq: *mut ibv_cq,
    pub srq: *mut ibv_srq,
    pub pd: *mut ibv_pd,
    pub qp_type: ibv_qp_type,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rdma_conn_param {
    pub private_data: *const ::std::os::raw::c_void,
    pub private_data_len: u8,
    pub responder_resources: u8,
    pub initiator_depth: u8,
    pub flow_control: u8,
    pub retry_count: u8,
    pub rnr_retry_count: u8,
    pub srq: u8,
    pub qp_num: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rdma_ud_param {
    pub private_data: *const ::std::os::raw::c_void,
    pub private_data_len: u8,
    pub ah_attr: ibv_ah_attr,
    pub qp_num: u32,
    pub qkey: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rdma_cm_event {
    pub id: *mut rdma_cm_id,
    pub listen_id: *mut rdma_cm_id,
    pub event: rdma_cm_event_type,
    pub status: ::std::os::raw::c_int,
    pub param: rdma_cm_event__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union rdma_cm_event__bindgen_ty_1 {
    pub conn: rdma_conn_param,
    pub ud: rdma_ud_param,
}
#[repr(C)]
pub struct rdma_addrinfo {
    pub ai_flags: ::std::os::raw::c_int,
    pub ai_family: ::std::os::raw::c_int,
    pub ai_qp_type: ::std::os::raw::c_int,
    pub ai_port_space: ::std::os::raw::c_int,
    pub ai_src_len: socklen_t,
    pub ai_dst_len: socklen_t,
    pub ai_src_addr: *mut sockaddr,
    pub ai_dst_addr: *mut sockaddr,
    pub ai_src_canonname: *mut ::std::os::raw::c_char,
    pub ai_dst_canonname: *mut ::std::os::raw::c_char,
    pub ai_route_len: usize,
    pub ai_route: *mut ::std::os::raw::c_void,
    pub ai_connect_len: usize,
    pub ai_connect: *mut ::std::os::raw::c_void,
    pub ai_next: *mut rdma_addrinfo,
}
pub const RDMA_CM_JOIN_MC_ATTR_ADDRESS: rdma_cm_join_mc_attr_mask = 1;
pub const RDMA_CM_JOIN_MC_ATTR_JOIN_FLAGS: rdma_cm_join_mc_attr_mask = 2;
pub const RDMA_CM_JOIN_MC_ATTR_RESERVED: rdma_cm_join_mc_attr_mask = 4;
pub type rdma_cm_join_mc_attr_mask = ::std::os::raw::c_uint;
pub const RDMA_MC_JOIN_FLAG_FULLMEMBER: rdma_cm_mc_join_flags = 0;
pub const RDMA_MC_JOIN_FLAG_SENDONLY_FULLMEMBER: rdma_cm_mc_join_flags = 1;
pub const RDMA_MC_JOIN_FLAG_RESERVED: rdma_cm_mc_join_flags = 2;
pub type rdma_cm_mc_join_flags = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rdma_cm_join_mc_attr_ex {
    pub comp_mask: u32,
    pub join_flags: u32,
    pub addr: *mut sockaddr,
}
extern "C" {
    #[doc = " rdma_create_event_channel - Open a channel used to report communication events."]
    #[doc = " Description:"]
    #[doc = "   Asynchronous events are reported to users through event channels.  Each"]
    #[doc = "   event channel maps to a file descriptor."]
    #[doc = " Notes:"]
    #[doc = "   All created event channels must be destroyed by calling"]
    #[doc = "   rdma_destroy_event_channel.  Users should call rdma_get_cm_event to"]
    #[doc = "   retrieve events on an event channel."]
    #[doc = " See also:"]
    #[doc = "   rdma_get_cm_event, rdma_destroy_event_channel"]
    pub fn rdma_create_event_channel() -> *mut rdma_event_channel;
}
extern "C" {
    #[doc = " rdma_destroy_event_channel - Close an event communication channel."]
    #[doc = " @channel: The communication channel to destroy."]
    #[doc = " Description:"]
    #[doc = "   Release all resources associated with an event channel and closes the"]
    #[doc = "   associated file descriptor."]
    #[doc = " Notes:"]
    #[doc = "   All rdma_cm_id's associated with the event channel must be destroyed,"]
    #[doc = "   and all returned events must be acked before calling this function."]
    #[doc = " See also:"]
    #[doc = "  rdma_create_event_channel, rdma_get_cm_event, rdma_ack_cm_event"]
    pub fn rdma_destroy_event_channel(channel: *mut rdma_event_channel);
}
extern "C" {
    #[doc = " rdma_create_id - Allocate a communication identifier."]
    #[doc = " @channel: The communication channel that events associated with the"]
    #[doc = "   allocated rdma_cm_id will be reported on."]
    #[doc = " @id: A reference where the allocated communication identifier will be"]
    #[doc = "   returned."]
    #[doc = " @context: User specified context associated with the rdma_cm_id."]
    #[doc = " @ps: RDMA port space."]
    #[doc = " Description:"]
    #[doc = "   Creates an identifier that is used to track communication information."]
    #[doc = " Notes:"]
    #[doc = "   Rdma_cm_id's are conceptually equivalent to a socket for RDMA"]
    #[doc = "   communication.  The difference is that RDMA communication requires"]
    #[doc = "   explicitly binding to a specified RDMA device before communication"]
    #[doc = "   can occur, and most operations are asynchronous in nature.  Communication"]
    #[doc = "   events on an rdma_cm_id are reported through the associated event"]
    #[doc = "   channel.  Users must release the rdma_cm_id by calling rdma_destroy_id."]
    #[doc = " See also:"]
    #[doc = "   rdma_create_event_channel, rdma_destroy_id, rdma_get_devices,"]
    #[doc = "   rdma_bind_addr, rdma_resolve_addr, rdma_connect, rdma_listen,"]
    pub fn rdma_create_id(
        channel: *mut rdma_event_channel,
        id: *mut *mut rdma_cm_id,
        context: *mut ::std::os::raw::c_void,
        ps: rdma_port_space,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_create_ep - Allocate a communication identifier and qp."]
    #[doc = " @id: A reference where the allocated communication identifier will be"]
    #[doc = "   returned."]
    #[doc = " @res: Result from rdma_getaddrinfo, which specifies the source and"]
    #[doc = "   destination addresses, plus optional routing and connection information."]
    #[doc = " @pd: Optional protection domain.  This parameter is ignored if qp_init_attr"]
    #[doc = "   is NULL."]
    #[doc = " @qp_init_attr: Optional attributes for a QP created on the rdma_cm_id."]
    #[doc = " Description:"]
    #[doc = "   Create an identifier and option QP used for communication."]
    #[doc = " Notes:"]
    #[doc = "   If qp_init_attr is provided, then a queue pair will be allocated and"]
    #[doc = "   associated with the rdma_cm_id.  If a pd is provided, the QP will be"]
    #[doc = "   created on that PD.  Otherwise, the QP will be allocated on a default"]
    #[doc = "   PD."]
    #[doc = "   The rdma_cm_id will be set to use synchronous operations (connect,"]
    #[doc = "   listen, and get_request).  To convert to asynchronous operation, the"]
    #[doc = "   rdma_cm_id should be migrated to a user allocated event channel."]
    #[doc = " See also:"]
    #[doc = "   rdma_create_id, rdma_create_qp, rdma_migrate_id, rdma_connect,"]
    #[doc = "   rdma_listen"]
    pub fn rdma_create_ep(
        id: *mut *mut rdma_cm_id,
        res: *mut rdma_addrinfo,
        pd: *mut ibv_pd,
        qp_init_attr: *mut ibv_qp_init_attr,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_destroy_ep - Deallocates a communication identifier and qp."]
    #[doc = " @id: The communication identifier to destroy."]
    #[doc = " Description:"]
    #[doc = "   Destroys the specified rdma_cm_id and any associated QP created"]
    #[doc = "   on that id."]
    #[doc = " See also:"]
    #[doc = "   rdma_create_ep"]
    pub fn rdma_destroy_ep(id: *mut rdma_cm_id);
}
extern "C" {
    #[doc = " rdma_destroy_id - Release a communication identifier."]
    #[doc = " @id: The communication identifier to destroy."]
    #[doc = " Description:"]
    #[doc = "   Destroys the specified rdma_cm_id and cancels any outstanding"]
    #[doc = "   asynchronous operation."]
    #[doc = " Notes:"]
    #[doc = "   Users must free any associated QP with the rdma_cm_id before"]
    #[doc = "   calling this routine and ack an related events."]
    #[doc = " See also:"]
    #[doc = "   rdma_create_id, rdma_destroy_qp, rdma_ack_cm_event"]
    pub fn rdma_destroy_id(id: *mut rdma_cm_id) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_bind_addr - Bind an RDMA identifier to a source address."]
    #[doc = " @id: RDMA identifier."]
    #[doc = " @addr: Local address information.  Wildcard values are permitted."]
    #[doc = " Description:"]
    #[doc = "   Associates a source address with an rdma_cm_id.  The address may be"]
    #[doc = "   wildcarded.  If binding to a specific local address, the rdma_cm_id"]
    #[doc = "   will also be bound to a local RDMA device."]
    #[doc = " Notes:"]
    #[doc = "   Typically, this routine is called before calling rdma_listen to bind"]
    #[doc = "   to a specific port number, but it may also be called on the active side"]
    #[doc = "   of a connection before calling rdma_resolve_addr to bind to a specific"]
    #[doc = "   address."]
    #[doc = " See also:"]
    #[doc = "   rdma_create_id, rdma_listen, rdma_resolve_addr, rdma_create_qp"]
    pub fn rdma_bind_addr(id: *mut rdma_cm_id, addr: *mut sockaddr) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_resolve_addr - Resolve destination and optional source addresses."]
    #[doc = " @id: RDMA identifier."]
    #[doc = " @src_addr: Source address information.  This parameter may be NULL."]
    #[doc = " @dst_addr: Destination address information."]
    #[doc = " @timeout_ms: Time to wait for resolution to complete."]
    #[doc = " Description:"]
    #[doc = "   Resolve destination and optional source addresses from IP addresses"]
    #[doc = "   to an RDMA address.  If successful, the specified rdma_cm_id will"]
    #[doc = "   be bound to a local device."]
    #[doc = " Notes:"]
    #[doc = "   This call is used to map a given destination IP address to a usable RDMA"]
    #[doc = "   address.  If a source address is given, the rdma_cm_id is bound to that"]
    #[doc = "   address, the same as if rdma_bind_addr were called.  If no source"]
    #[doc = "   address is given, and the rdma_cm_id has not yet been bound to a device,"]
    #[doc = "   then the rdma_cm_id will be bound to a source address based on the"]
    #[doc = "   local routing tables.  After this call, the rdma_cm_id will be bound to"]
    #[doc = "   an RDMA device.  This call is typically made from the active side of a"]
    #[doc = "   connection before calling rdma_resolve_route and rdma_connect."]
    #[doc = " See also:"]
    #[doc = "   rdma_create_id, rdma_resolve_route, rdma_connect, rdma_create_qp,"]
    #[doc = "   rdma_get_cm_event, rdma_bind_addr"]
    pub fn rdma_resolve_addr(
        id: *mut rdma_cm_id,
        src_addr: *mut sockaddr,
        dst_addr: *mut sockaddr,
        timeout_ms: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_resolve_route - Resolve the route information needed to establish a connection."]
    #[doc = " @id: RDMA identifier."]
    #[doc = " @timeout_ms: Time to wait for resolution to complete."]
    #[doc = " Description:"]
    #[doc = "   Resolves an RDMA route to the destination address in order to establish"]
    #[doc = "   a connection.  The destination address must have already been resolved"]
    #[doc = "   by calling rdma_resolve_addr."]
    #[doc = " Notes:"]
    #[doc = "   This is called on the client side of a connection after calling"]
    #[doc = "   rdma_resolve_addr, but before calling rdma_connect."]
    #[doc = " See also:"]
    #[doc = "   rdma_resolve_addr, rdma_connect, rdma_get_cm_event"]
    pub fn rdma_resolve_route(
        id: *mut rdma_cm_id,
        timeout_ms: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_create_qp - Allocate a QP."]
    #[doc = " @id: RDMA identifier."]
    #[doc = " @pd: Optional protection domain for the QP."]
    #[doc = " @qp_init_attr: initial QP attributes."]
    #[doc = " Description:"]
    #[doc = "  Allocate a QP associated with the specified rdma_cm_id and transition it"]
    #[doc = "  for sending and receiving."]
    #[doc = " Notes:"]
    #[doc = "   The rdma_cm_id must be bound to a local RDMA device before calling this"]
    #[doc = "   function, and the protection domain must be for that same device."]
    #[doc = "   QPs allocated to an rdma_cm_id are automatically transitioned by the"]
    #[doc = "   librdmacm through their states.  After being allocated, the QP will be"]
    #[doc = "   ready to handle posting of receives.  If the QP is unconnected, it will"]
    #[doc = "   be ready to post sends."]
    #[doc = "   If pd is NULL, then the QP will be allocated using a default protection"]
    #[doc = "   domain associated with the underlying RDMA device."]
    #[doc = " See also:"]
    #[doc = "   rdma_bind_addr, rdma_resolve_addr, rdma_destroy_qp, ibv_create_qp,"]
    #[doc = "   ibv_modify_qp"]
    pub fn rdma_create_qp(
        id: *mut rdma_cm_id,
        pd: *mut ibv_pd,
        qp_init_attr: *mut ibv_qp_init_attr,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rdma_create_qp_ex(
        id: *mut rdma_cm_id,
        qp_init_attr: *mut ibv_qp_init_attr_ex,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_destroy_qp - Deallocate a QP."]
    #[doc = " @id: RDMA identifier."]
    #[doc = " Description:"]
    #[doc = "   Destroy a QP allocated on the rdma_cm_id."]
    #[doc = " Notes:"]
    #[doc = "   Users must destroy any QP associated with an rdma_cm_id before"]
    #[doc = "   destroying the ID."]
    #[doc = " See also:"]
    #[doc = "   rdma_create_qp, rdma_destroy_id, ibv_destroy_qp"]
    pub fn rdma_destroy_qp(id: *mut rdma_cm_id);
}
extern "C" {
    #[doc = " rdma_connect - Initiate an active connection request."]
    #[doc = " @id: RDMA identifier."]
    #[doc = " @conn_param: optional connection parameters."]
    #[doc = " Description:"]
    #[doc = "   For a connected rdma_cm_id, this call initiates a connection request"]
    #[doc = "   to a remote destination.  For an unconnected rdma_cm_id, it initiates"]
    #[doc = "   a lookup of the remote QP providing the datagram service."]
    #[doc = " Notes:"]
    #[doc = "   Users must have resolved a route to the destination address"]
    #[doc = "   by having called rdma_resolve_route before calling this routine."]
    #[doc = "   A user may override the default connection parameters and exchange"]
    #[doc = "   private data as part of the connection by using the conn_param parameter."]
    #[doc = " See also:"]
    #[doc = "   rdma_resolve_route, rdma_disconnect, rdma_listen, rdma_get_cm_event"]
    pub fn rdma_connect(
        id: *mut rdma_cm_id,
        conn_param: *mut rdma_conn_param,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_establish - Complete an active connection request."]
    #[doc = " @id: RDMA identifier."]
    #[doc = " Description:"]
    #[doc = "   Acknowledge an incoming connection response event and complete the"]
    #[doc = "   connection establishment."]
    #[doc = " Notes:"]
    #[doc = "   If a QP has not been created on the rdma_cm_id, this function should be"]
    #[doc = "   called by the active side to complete the connection, after getting connect"]
    #[doc = "   response event. This will trigger a connection established event on the"]
    #[doc = "   passive side."]
    #[doc = "   This function should not be used on an rdma_cm_id on which a QP has been"]
    #[doc = "   created."]
    #[doc = " See also:"]
    #[doc = "   rdma_connect, rdma_disconnect, rdma_get_cm_event"]
    pub fn rdma_establish(id: *mut rdma_cm_id) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_listen - Listen for incoming connection requests."]
    #[doc = " @id: RDMA identifier."]
    #[doc = " @backlog: backlog of incoming connection requests."]
    #[doc = " Description:"]
    #[doc = "   Initiates a listen for incoming connection requests or datagram service"]
    #[doc = "   lookup.  The listen will be restricted to the locally bound source"]
    #[doc = "   address."]
    #[doc = " Notes:"]
    #[doc = "   Users must have bound the rdma_cm_id to a local address by calling"]
    #[doc = "   rdma_bind_addr before calling this routine.  If the rdma_cm_id is"]
    #[doc = "   bound to a specific IP address, the listen will be restricted to that"]
    #[doc = "   address and the associated RDMA device.  If the rdma_cm_id is bound"]
    #[doc = "   to an RDMA port number only, the listen will occur across all RDMA"]
    #[doc = "   devices."]
    #[doc = " See also:"]
    #[doc = "   rdma_bind_addr, rdma_connect, rdma_accept, rdma_reject, rdma_get_cm_event"]
    pub fn rdma_listen(
        id: *mut rdma_cm_id,
        backlog: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_get_request"]
    pub fn rdma_get_request(
        listen: *mut rdma_cm_id,
        id: *mut *mut rdma_cm_id,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_accept - Called to accept a connection request."]
    #[doc = " @id: Connection identifier associated with the request."]
    #[doc = " @conn_param: Optional information needed to establish the connection."]
    #[doc = " Description:"]
    #[doc = "   Called from the listening side to accept a connection or datagram"]
    #[doc = "   service lookup request."]
    #[doc = " Notes:"]
    #[doc = "   Unlike the socket accept routine, rdma_accept is not called on a"]
    #[doc = "   listening rdma_cm_id.  Instead, after calling rdma_listen, the user"]
    #[doc = "   waits for a connection request event to occur.  Connection request"]
    #[doc = "   events give the user a newly created rdma_cm_id, similar to a new"]
    #[doc = "   socket, but the rdma_cm_id is bound to a specific RDMA device."]
    #[doc = "   rdma_accept is called on the new rdma_cm_id."]
    #[doc = "   A user may override the default connection parameters and exchange"]
    #[doc = "   private data as part of the connection by using the conn_param parameter."]
    #[doc = " See also:"]
    #[doc = "   rdma_listen, rdma_reject, rdma_get_cm_event"]
    pub fn rdma_accept(
        id: *mut rdma_cm_id,
        conn_param: *mut rdma_conn_param,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_reject - Called to reject a connection request."]
    #[doc = " @id: Connection identifier associated with the request."]
    #[doc = " @private_data: Optional private data to send with the reject message."]
    #[doc = " @private_data_len: Size of the private_data to send, in bytes."]
    #[doc = " Description:"]
    #[doc = "   Called from the listening side to reject a connection or datagram"]
    #[doc = "   service lookup request."]
    #[doc = " Notes:"]
    #[doc = "   After receiving a connection request event, a user may call rdma_reject"]
    #[doc = "   to reject the request.  If the underlying RDMA transport supports"]
    #[doc = "   private data in the reject message, the specified data will be passed to"]
    #[doc = "   the remote side."]
    #[doc = " See also:"]
    #[doc = "   rdma_listen, rdma_accept, rdma_get_cm_event"]
    pub fn rdma_reject(
        id: *mut rdma_cm_id,
        private_data: *const ::std::os::raw::c_void,
        private_data_len: u8,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_reject_ece - Called to reject a connection request with ECE"]
    #[doc = " rejected reason."]
    #[doc = " The same as rdma_reject()"]
    pub fn rdma_reject_ece(
        id: *mut rdma_cm_id,
        private_data: *const ::std::os::raw::c_void,
        private_data_len: u8,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_notify - Notifies the librdmacm of an asynchronous event."]
    #[doc = " @id: RDMA identifier."]
    #[doc = " @event: Asynchronous event."]
    #[doc = " Description:"]
    #[doc = "   Used to notify the librdmacm of asynchronous events that have occurred"]
    #[doc = "   on a QP associated with the rdma_cm_id."]
    #[doc = " Notes:"]
    #[doc = "   Asynchronous events that occur on a QP are reported through the user's"]
    #[doc = "   device event handler.  This routine is used to notify the librdmacm of"]
    #[doc = "   communication events.  In most cases, use of this routine is not"]
    #[doc = "   necessary, however if connection establishment is done out of band"]
    #[doc = "   (such as done through Infiniband), it's possible to receive data on a"]
    #[doc = "   QP that is not yet considered connected.  This routine forces the"]
    #[doc = "   connection into an established state in this case in order to handle"]
    #[doc = "   the rare situation where the connection never forms on its own."]
    #[doc = "   Events that should be reported to the CM are: IB_EVENT_COMM_EST."]
    #[doc = " See also:"]
    #[doc = "   rdma_connect, rdma_accept, rdma_listen"]
    pub fn rdma_notify(id: *mut rdma_cm_id, event: ibv_event_type) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_disconnect - This function disconnects a connection."]
    #[doc = " @id: RDMA identifier."]
    #[doc = " Description:"]
    #[doc = "   Disconnects a connection and transitions any associated QP to the"]
    #[doc = "   error state."]
    #[doc = " See also:"]
    #[doc = "   rdma_connect, rdma_listen, rdma_accept"]
    pub fn rdma_disconnect(id: *mut rdma_cm_id) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_join_multicast - Joins a multicast group."]
    #[doc = " @id: Communication identifier associated with the request."]
    #[doc = " @addr: Multicast address identifying the group to join."]
    #[doc = " @context: User-defined context associated with the join request."]
    #[doc = " Description:"]
    #[doc = "   Joins a multicast group and attaches an associated QP to the group."]
    #[doc = " Notes:"]
    #[doc = "   Before joining a multicast group, the rdma_cm_id must be bound to"]
    #[doc = "   an RDMA device by calling rdma_bind_addr or rdma_resolve_addr.  Use of"]
    #[doc = "   rdma_resolve_addr requires the local routing tables to resolve the"]
    #[doc = "   multicast address to an RDMA device.  The user must call"]
    #[doc = "   rdma_leave_multicast to leave the multicast group and release any"]
    #[doc = "   multicast resources.  The context is returned to the user through"]
    #[doc = "   the private_data field in the rdma_cm_event."]
    #[doc = " See also:"]
    #[doc = "   rdma_leave_multicast, rdma_bind_addr, rdma_resolve_addr, rdma_create_qp"]
    pub fn rdma_join_multicast(
        id: *mut rdma_cm_id,
        addr: *mut sockaddr,
        context: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_leave_multicast - Leaves a multicast group."]
    #[doc = " @id: Communication identifier associated with the request."]
    #[doc = " @addr: Multicast address identifying the group to leave."]
    #[doc = " Description:"]
    #[doc = "   Leaves a multicast group and detaches an associated QP from the group."]
    #[doc = " Notes:"]
    #[doc = "   Calling this function before a group has been fully joined results in"]
    #[doc = "   canceling the join operation.  Users should be aware that messages"]
    #[doc = "   received from the multicast group may stilled be queued for"]
    #[doc = "   completion processing immediately after leaving a multicast group."]
    #[doc = "   Destroying an rdma_cm_id will automatically leave all multicast groups."]
    #[doc = " See also:"]
    #[doc = "   rdma_join_multicast, rdma_destroy_qp"]
    pub fn rdma_leave_multicast(id: *mut rdma_cm_id, addr: *mut sockaddr) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_multicast_ex - Joins a multicast group with options."]
    #[doc = " @id: Communication identifier associated with the request."]
    #[doc = " @mc_join_attr: Extensive struct containing multicast join parameters."]
    #[doc = " @context: User-defined context associated with the join request."]
    #[doc = " Description:"]
    #[doc = "  Joins a multicast group with options. Currently supporting MC join flags."]
    #[doc = "  The QP will be attached based on the given join flag."]
    #[doc = "  Join message will be sent according to the join flag."]
    #[doc = " Notes:"]
    #[doc = "  Before joining a multicast group, the rdma_cm_id must be bound to"]
    #[doc = "  an RDMA device by calling rdma_bind_addr or rdma_resolve_addr.  Use of"]
    #[doc = "  rdma_resolve_addr requires the local routing tables to resolve the"]
    #[doc = "  multicast address to an RDMA device.  The user must call"]
    #[doc = "  rdma_leave_multicast to leave the multicast group and release any"]
    #[doc = "  multicast resources.  The context is returned to the user through"]
    #[doc = "  the private_data field in the rdma_cm_event."]
    #[doc = " See also:"]
    #[doc = "  rdma_leave_multicast, rdma_bind_addr, rdma_resolve_addr, rdma_create_qp"]
    pub fn rdma_join_multicast_ex(
        id: *mut rdma_cm_id,
        mc_join_attr: *mut rdma_cm_join_mc_attr_ex,
        context: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_get_cm_event - Retrieves the next pending communication event."]
    #[doc = " @channel: Event channel to check for events."]
    #[doc = " @event: Allocated information about the next communication event."]
    #[doc = " Description:"]
    #[doc = "   Retrieves a communication event.  If no events are pending, by default,"]
    #[doc = "   the call will block until an event is received."]
    #[doc = " Notes:"]
    #[doc = "   The default synchronous behavior of this routine can be changed by"]
    #[doc = "   modifying the file descriptor associated with the given channel.  All"]
    #[doc = "   events that are reported must be acknowledged by calling rdma_ack_cm_event."]
    #[doc = "   Destruction of an rdma_cm_id will block until related events have been"]
    #[doc = "   acknowledged."]
    #[doc = " See also:"]
    #[doc = "   rdma_ack_cm_event, rdma_create_event_channel, rdma_event_str"]
    pub fn rdma_get_cm_event(
        channel: *mut rdma_event_channel,
        event: *mut *mut rdma_cm_event,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_ack_cm_event - Free a communication event."]
    #[doc = " @event: Event to be released."]
    #[doc = " Description:"]
    #[doc = "   All events which are allocated by rdma_get_cm_event must be released,"]
    #[doc = "   there should be a one-to-one correspondence between successful gets"]
    #[doc = "   and acks."]
    #[doc = " See also:"]
    #[doc = "   rdma_get_cm_event, rdma_destroy_id"]
    pub fn rdma_ack_cm_event(event: *mut rdma_cm_event) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rdma_get_src_port(id: *mut rdma_cm_id) -> __be16;
}
extern "C" {
    pub fn rdma_get_dst_port(id: *mut rdma_cm_id) -> __be16;
}
extern "C" {
    #[doc = " rdma_get_devices - Get list of RDMA devices currently available."]
    #[doc = " @num_devices: If non-NULL, set to the number of devices returned."]
    #[doc = " Description:"]
    #[doc = "   Return a NULL-terminated array of opened RDMA devices.  Callers can use"]
    #[doc = "   this routine to allocate resources on specific RDMA devices that will be"]
    #[doc = "   shared across multiple rdma_cm_id's."]
    #[doc = " Notes:"]
    #[doc = "   The returned array must be released by calling rdma_free_devices.  Devices"]
    #[doc = "   remain opened while the librdmacm is loaded."]
    #[doc = " See also:"]
    #[doc = "   rdma_free_devices"]
    pub fn rdma_get_devices(num_devices: *mut ::std::os::raw::c_int) -> *mut *mut ibv_context;
}
extern "C" {
    #[doc = " rdma_free_devices - Frees the list of devices returned by rdma_get_devices."]
    #[doc = " @list: List of devices returned from rdma_get_devices."]
    #[doc = " Description:"]
    #[doc = "   Frees the device array returned by rdma_get_devices."]
    #[doc = " See also:"]
    #[doc = "   rdma_get_devices"]
    pub fn rdma_free_devices(list: *mut *mut ibv_context);
}
extern "C" {
    #[doc = " rdma_event_str - Returns a string representation of an rdma cm event."]
    #[doc = " @event: Asynchronous event."]
    #[doc = " Description:"]
    #[doc = "   Returns a string representation of an asynchronous event."]
    #[doc = " See also:"]
    #[doc = "   rdma_get_cm_event"]
    pub fn rdma_event_str(event: rdma_cm_event_type) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " rdma_set_option - Set options for an rdma_cm_id."]
    #[doc = " @id: Communication identifier to set option for."]
    #[doc = " @level: Protocol level of the option to set."]
    #[doc = " @optname: Name of the option to set."]
    #[doc = " @optval: Reference to the option data."]
    #[doc = " @optlen: The size of the %optval buffer."]
    pub fn rdma_set_option(
        id: *mut rdma_cm_id,
        level: ::std::os::raw::c_int,
        optname: ::std::os::raw::c_int,
        optval: *mut ::std::os::raw::c_void,
        optlen: usize,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_migrate_id - Move an rdma_cm_id to a new event channel."]
    #[doc = " @id: Communication identifier to migrate."]
    #[doc = " @channel: New event channel for rdma_cm_id events."]
    pub fn rdma_migrate_id(
        id: *mut rdma_cm_id,
        channel: *mut rdma_event_channel,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_getaddrinfo - RDMA address and route resolution service."]
    pub fn rdma_getaddrinfo(
        node: *const ::std::os::raw::c_char,
        service: *const ::std::os::raw::c_char,
        hints: *const rdma_addrinfo,
        res: *mut *mut rdma_addrinfo,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rdma_freeaddrinfo(res: *mut rdma_addrinfo);
}
extern "C" {
    #[doc = " rdma_init_qp_attr - Returns QP attributes."]
    #[doc = " @id: Communication identifier."]
    #[doc = " @qp_attr: A reference to a QP attributes struct containing"]
    #[doc = " response information."]
    #[doc = " @qp_attr_mask: A reference to a QP attributes mask containing"]
    #[doc = " response information."]
    pub fn rdma_init_qp_attr(
        id: *mut rdma_cm_id,
        qp_attr: *mut ibv_qp_attr,
        qp_attr_mask: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_set_local_ece - Set local ECE options to be used for REQ/REP"]
    #[doc = " communication. In use to implement ECE handshake in external QP."]
    #[doc = " @id: Communication identifier to establish connection"]
    #[doc = " @ece: ECE parameters"]
    pub fn rdma_set_local_ece(id: *mut rdma_cm_id, ece: *mut ibv_ece) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " rdma_get_remote_ece - Provide remote ECE parameters as received"]
    #[doc = " in REQ/REP events. In use to implement ECE handshake in external QP."]
    #[doc = " @id: Communication identifier to establish connection"]
    #[doc = " @ece: ECE parameters"]
    pub fn rdma_get_remote_ece(id: *mut rdma_cm_id, ece: *mut ibv_ece) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rdma_create_srq(
        id: *mut rdma_cm_id,
        pd: *mut ibv_pd,
        attr: *mut ibv_srq_init_attr,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rdma_create_srq_ex(
        id: *mut rdma_cm_id,
        attr: *mut ibv_srq_init_attr_ex,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn rdma_destroy_srq(id: *mut rdma_cm_id);
}
pub const _RS_IBV_ACCESS_OPTIONAL_RANGE: ::std::os::raw::c_uint = 1072693248;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct verbs_ex_private {
    pub _address: u8,
}