1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef IB_USER_IOCTL_VERBS_H 20 #define IB_USER_IOCTL_VERBS_H 21 #include <linux/types.h> 22 #include <rdma/ib_user_verbs.h> 23 #ifndef RDMA_UAPI_PTR 24 #define RDMA_UAPI_PTR(_type,_name) __aligned_u64 _name 25 #endif 26 enum ib_uverbs_access_flags { 27 IB_UVERBS_ACCESS_LOCAL_WRITE = 1 << 0, 28 IB_UVERBS_ACCESS_REMOTE_WRITE = 1 << 1, 29 IB_UVERBS_ACCESS_REMOTE_READ = 1 << 2, 30 IB_UVERBS_ACCESS_REMOTE_ATOMIC = 1 << 3, 31 IB_UVERBS_ACCESS_MW_BIND = 1 << 4, 32 IB_UVERBS_ACCESS_ZERO_BASED = 1 << 5, 33 IB_UVERBS_ACCESS_ON_DEMAND = 1 << 6, 34 IB_UVERBS_ACCESS_HUGETLB = 1 << 7, 35 }; 36 enum ib_uverbs_query_port_cap_flags { 37 IB_UVERBS_PCF_SM = 1 << 1, 38 IB_UVERBS_PCF_NOTICE_SUP = 1 << 2, 39 IB_UVERBS_PCF_TRAP_SUP = 1 << 3, 40 IB_UVERBS_PCF_OPT_IPD_SUP = 1 << 4, 41 IB_UVERBS_PCF_AUTO_MIGR_SUP = 1 << 5, 42 IB_UVERBS_PCF_SL_MAP_SUP = 1 << 6, 43 IB_UVERBS_PCF_MKEY_NVRAM = 1 << 7, 44 IB_UVERBS_PCF_PKEY_NVRAM = 1 << 8, 45 IB_UVERBS_PCF_LED_INFO_SUP = 1 << 9, 46 IB_UVERBS_PCF_SM_DISABLED = 1 << 10, 47 IB_UVERBS_PCF_SYS_IMAGE_GUID_SUP = 1 << 11, 48 IB_UVERBS_PCF_PKEY_SW_EXT_PORT_TRAP_SUP = 1 << 12, 49 IB_UVERBS_PCF_EXTENDED_SPEEDS_SUP = 1 << 14, 50 IB_UVERBS_PCF_CM_SUP = 1 << 16, 51 IB_UVERBS_PCF_SNMP_TUNNEL_SUP = 1 << 17, 52 IB_UVERBS_PCF_REINIT_SUP = 1 << 18, 53 IB_UVERBS_PCF_DEVICE_MGMT_SUP = 1 << 19, 54 IB_UVERBS_PCF_VENDOR_CLASS_SUP = 1 << 20, 55 IB_UVERBS_PCF_DR_NOTICE_SUP = 1 << 21, 56 IB_UVERBS_PCF_CAP_MASK_NOTICE_SUP = 1 << 22, 57 IB_UVERBS_PCF_BOOT_MGMT_SUP = 1 << 23, 58 IB_UVERBS_PCF_LINK_LATENCY_SUP = 1 << 24, 59 IB_UVERBS_PCF_CLIENT_REG_SUP = 1 << 25, 60 IB_UVERBS_PCF_LINK_SPEED_WIDTH_TABLE_SUP = 1 << 27, 61 IB_UVERBS_PCF_VENDOR_SPECIFIC_MADS_TABLE_SUP = 1 << 28, 62 IB_UVERBS_PCF_MCAST_PKEY_TRAP_SUPPRESSION_SUP = 1 << 29, 63 IB_UVERBS_PCF_MCAST_FDB_TOP_SUP = 1 << 30, 64 IB_UVERBS_PCF_HIERARCHY_INFO_SUP = 1ULL << 31, 65 IB_UVERBS_PCF_IP_BASED_GIDS = 1 << 26, 66 }; 67 enum ib_uverbs_query_port_flags { 68 IB_UVERBS_QPF_GRH_REQUIRED = 1 << 0, 69 }; 70 enum ib_uverbs_flow_action_esp_keymat { 71 IB_UVERBS_FLOW_ACTION_ESP_KEYMAT_AES_GCM, 72 }; 73 enum ib_uverbs_flow_action_esp_keymat_aes_gcm_iv_algo { 74 IB_UVERBS_FLOW_ACTION_IV_ALGO_SEQ, 75 }; 76 struct ib_uverbs_flow_action_esp_keymat_aes_gcm { 77 __aligned_u64 iv; 78 __u32 iv_algo; 79 __u32 salt; 80 __u32 icv_len; 81 __u32 key_len; 82 __u32 aes_key[256 / 32]; 83 }; 84 enum ib_uverbs_flow_action_esp_replay { 85 IB_UVERBS_FLOW_ACTION_ESP_REPLAY_NONE, 86 IB_UVERBS_FLOW_ACTION_ESP_REPLAY_BMP, 87 }; 88 struct ib_uverbs_flow_action_esp_replay_bmp { 89 __u32 size; 90 }; 91 enum ib_uverbs_flow_action_esp_flags { 92 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_INLINE_CRYPTO = 0UL << 0, 93 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_FULL_OFFLOAD = 1UL << 0, 94 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_TUNNEL = 0UL << 1, 95 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_TRANSPORT = 1UL << 1, 96 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_DECRYPT = 0UL << 2, 97 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_ENCRYPT = 1UL << 2, 98 IB_UVERBS_FLOW_ACTION_ESP_FLAGS_ESN_NEW_WINDOW = 1UL << 3, 99 }; 100 struct ib_uverbs_flow_action_esp_encap { 101 RDMA_UAPI_PTR(void *, val_ptr); 102 RDMA_UAPI_PTR(struct ib_uverbs_flow_action_esp_encap *, next_ptr); 103 __u16 len; 104 __u16 type; 105 }; 106 struct ib_uverbs_flow_action_esp { 107 __u32 spi; 108 __u32 seq; 109 __u32 tfc_pad; 110 __u32 flags; 111 __aligned_u64 hard_limit_pkts; 112 }; 113 enum ib_uverbs_read_counters_flags { 114 IB_UVERBS_READ_COUNTERS_PREFER_CACHED = 1 << 0, 115 }; 116 enum ib_uverbs_advise_mr_advice { 117 IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH, 118 IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH_WRITE, 119 }; 120 enum ib_uverbs_advise_mr_flag { 121 IB_UVERBS_ADVISE_MR_FLAG_FLUSH = 1 << 0, 122 }; 123 struct ib_uverbs_query_port_resp_ex { 124 struct ib_uverbs_query_port_resp legacy_resp; 125 __u16 port_cap_flags2; 126 __u8 reserved[6]; 127 }; 128 #endif 129