1 /* 2 * This header was generated from the Linux kernel headers by update_headers.py, 3 * to provide necessary information from kernel to userspace, such as constants, 4 * structures, and macros, and thus, contains no copyrightable information. 5 */ 6 #ifndef IB_USER_IOCTL_VERBS_H 7 #define IB_USER_IOCTL_VERBS_H 8 #include <linux/types.h> 9 #ifndef RDMA_UAPI_PTR 10 #define RDMA_UAPI_PTR(_type, _name) __aligned_u64 _name 11 #endif 12 enum ib_uverbs_access_flags { 13 IB_UVERBS_ACCESS_LOCAL_WRITE = 1 << 0, 14 IB_UVERBS_ACCESS_REMOTE_WRITE = 1 << 1, 15 IB_UVERBS_ACCESS_REMOTE_READ = 1 << 2, 16 IB_UVERBS_ACCESS_REMOTE_ATOMIC = 1 << 3, 17 IB_UVERBS_ACCESS_MW_BIND = 1 << 4, 18 IB_UVERBS_ACCESS_ZERO_BASED = 1 << 5, 19 IB_UVERBS_ACCESS_ON_DEMAND = 1 << 6, 20 IB_UVERBS_ACCESS_HUGETLB = 1 << 7, 21 }; 22 enum ib_uverbs_query_port_cap_flags { 23 IB_UVERBS_PCF_SM = 1 << 1, 24 IB_UVERBS_PCF_NOTICE_SUP = 1 << 2, 25 IB_UVERBS_PCF_TRAP_SUP = 1 << 3, 26 IB_UVERBS_PCF_OPT_IPD_SUP = 1 << 4, 27 IB_UVERBS_PCF_AUTO_MIGR_SUP = 1 << 5, 28 IB_UVERBS_PCF_SL_MAP_SUP = 1 << 6, 29 IB_UVERBS_PCF_MKEY_NVRAM = 1 << 7, 30 IB_UVERBS_PCF_PKEY_NVRAM = 1 << 8, 31 IB_UVERBS_PCF_LED_INFO_SUP = 1 << 9, 32 IB_UVERBS_PCF_SM_DISABLED = 1 << 10, 33 IB_UVERBS_PCF_SYS_IMAGE_GUID_SUP = 1 << 11, 34 IB_UVERBS_PCF_PKEY_SW_EXT_PORT_TRAP_SUP = 1 << 12, 35 IB_UVERBS_PCF_EXTENDED_SPEEDS_SUP = 1 << 14, 36 IB_UVERBS_PCF_CM_SUP = 1 << 16, 37 IB_UVERBS_PCF_SNMP_TUNNEL_SUP = 1 << 17, 38 IB_UVERBS_PCF_REINIT_SUP = 1 << 18, 39 IB_UVERBS_PCF_DEVICE_MGMT_SUP = 1 << 19, 40 IB_UVERBS_PCF_VENDOR_CLASS_SUP = 1 << 20, 41 IB_UVERBS_PCF_DR_NOTICE_SUP = 1 << 21, 42 IB_UVERBS_PCF_CAP_MASK_NOTICE_SUP = 1 << 22, 43 IB_UVERBS_PCF_BOOT_MGMT_SUP = 1 << 23, 44 IB_UVERBS_PCF_LINK_LATENCY_SUP = 1 << 24, 45 IB_UVERBS_PCF_CLIENT_REG_SUP = 1 << 25, 46 47 IB_UVERBS_PCF_LINK_SPEED_WIDTH_TABLE_SUP = 1 << 27, 48 IB_UVERBS_PCF_VENDOR_SPECIFIC_MADS_TABLE_SUP = 1 << 28, 49 IB_UVERBS_PCF_MCAST_PKEY_TRAP_SUPPRESSION_SUP = 1 << 29, 50 IB_UVERBS_PCF_MCAST_FDB_TOP_SUP = 1 << 30, 51 IB_UVERBS_PCF_HIERARCHY_INFO_SUP = 1ULL << 31, 52 53 IB_UVERBS_PCF_IP_BASED_GIDS = 1 << 26, 54 }; 55 enum ib_uverbs_query_port_flags { 56 IB_UVERBS_QPF_GRH_REQUIRED = 1 << 0, 57 }; 58 enum ib_uverbs_flow_action_esp_keymat { 59 IB_UVERBS_FLOW_ACTION_ESP_KEYMAT_AES_GCM, 60 }; 61 enum ib_uverbs_flow_action_esp_keymat_aes_gcm_iv_algo { 62 IB_UVERBS_FLOW_ACTION_IV_ALGO_SEQ, 63 }; 64 struct ib_uverbs_flow_action_esp_keymat_aes_gcm { 65 __aligned_u64 iv; 66 __u32 iv_algo; 67 __u32 salt; 68 __u32 icv_len; 69 __u32 key_len; 70 __u32 aes_key[256 / 32]; 71 }; 72 enum ib_uverbs_flow_action_esp_replay { 73 IB_UVERBS_FLOW_ACTION_ESP_REPLAY_NONE, 74 IB_UVERBS_FLOW_ACTION_ESP_REPLAY_BMP, 75 }; 76 struct ib_uverbs_flow_action_esp_replay_bmp { 77 __u32 size; 78 }; 79 enum ib_uverbs_flow_action_esp_flags { 80 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_INLINE_CRYPTO = 0UL << 0, 81 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_FULL_OFFLOAD = 1UL << 0, 82 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_TUNNEL = 0UL << 1, 83 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_TRANSPORT = 1UL << 1, 84 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_DECRYPT = 0UL << 2, 85 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_ENCRYPT = 1UL << 2, 86 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_ESN_NEW_WINDOW = 1UL << 3, 87 }; 88 struct ib_uverbs_flow_action_esp_encap { 89 90 RDMA_UAPI_PTR(void *, val_ptr); 91 RDMA_UAPI_PTR(struct ib_uverbs_flow_action_esp_encap *, next_ptr); 92 __u16 len; 93 __u16 type; 94 }; 95 struct ib_uverbs_flow_action_esp { 96 __u32 spi; 97 __u32 seq; 98 __u32 tfc_pad; 99 __u32 flags; 100 __aligned_u64 hard_limit_pkts; 101 }; 102 enum ib_uverbs_read_counters_flags { 103 104 IB_UVERBS_READ_COUNTERS_PREFER_CACHED = 1 << 0, 105 }; 106 #endif 107