Home | History | Annotate | Download | only in rdma
      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_CMDS_H
     20 #define IB_USER_IOCTL_CMDS_H
     21 #define UVERBS_ID_NS_MASK 0xF000
     22 #define UVERBS_ID_NS_SHIFT 12
     23 #define UVERBS_UDATA_DRIVER_DATA_NS 1
     24 #define UVERBS_UDATA_DRIVER_DATA_FLAG (1UL << UVERBS_ID_NS_SHIFT)
     25 enum uverbs_default_objects {
     26   UVERBS_OBJECT_DEVICE,
     27   UVERBS_OBJECT_PD,
     28   UVERBS_OBJECT_COMP_CHANNEL,
     29   UVERBS_OBJECT_CQ,
     30   UVERBS_OBJECT_QP,
     31   UVERBS_OBJECT_SRQ,
     32   UVERBS_OBJECT_AH,
     33   UVERBS_OBJECT_MR,
     34   UVERBS_OBJECT_MW,
     35   UVERBS_OBJECT_FLOW,
     36   UVERBS_OBJECT_XRCD,
     37   UVERBS_OBJECT_RWQ_IND_TBL,
     38   UVERBS_OBJECT_WQ,
     39   UVERBS_OBJECT_FLOW_ACTION,
     40   UVERBS_OBJECT_DM,
     41   UVERBS_OBJECT_COUNTERS,
     42 };
     43 enum {
     44   UVERBS_ATTR_UHW_IN = UVERBS_UDATA_DRIVER_DATA_FLAG,
     45   UVERBS_ATTR_UHW_OUT,
     46 };
     47 enum uverbs_methods_device {
     48   UVERBS_METHOD_INVOKE_WRITE,
     49   UVERBS_METHOD_INFO_HANDLES,
     50   UVERBS_METHOD_QUERY_PORT,
     51 };
     52 enum uverbs_attrs_invoke_write_cmd_attr_ids {
     53   UVERBS_ATTR_CORE_IN,
     54   UVERBS_ATTR_CORE_OUT,
     55   UVERBS_ATTR_WRITE_CMD,
     56 };
     57 enum uverbs_attrs_query_port_cmd_attr_ids {
     58   UVERBS_ATTR_QUERY_PORT_PORT_NUM,
     59   UVERBS_ATTR_QUERY_PORT_RESP,
     60 };
     61 enum uverbs_attrs_create_cq_cmd_attr_ids {
     62   UVERBS_ATTR_CREATE_CQ_HANDLE,
     63   UVERBS_ATTR_CREATE_CQ_CQE,
     64   UVERBS_ATTR_CREATE_CQ_USER_HANDLE,
     65   UVERBS_ATTR_CREATE_CQ_COMP_CHANNEL,
     66   UVERBS_ATTR_CREATE_CQ_COMP_VECTOR,
     67   UVERBS_ATTR_CREATE_CQ_FLAGS,
     68   UVERBS_ATTR_CREATE_CQ_RESP_CQE,
     69 };
     70 enum uverbs_attrs_destroy_cq_cmd_attr_ids {
     71   UVERBS_ATTR_DESTROY_CQ_HANDLE,
     72   UVERBS_ATTR_DESTROY_CQ_RESP,
     73 };
     74 enum uverbs_attrs_create_flow_action_esp {
     75   UVERBS_ATTR_CREATE_FLOW_ACTION_ESP_HANDLE,
     76   UVERBS_ATTR_FLOW_ACTION_ESP_ATTRS,
     77   UVERBS_ATTR_FLOW_ACTION_ESP_ESN,
     78   UVERBS_ATTR_FLOW_ACTION_ESP_KEYMAT,
     79   UVERBS_ATTR_FLOW_ACTION_ESP_REPLAY,
     80   UVERBS_ATTR_FLOW_ACTION_ESP_ENCAP,
     81 };
     82 enum uverbs_attrs_modify_flow_action_esp {
     83   UVERBS_ATTR_MODIFY_FLOW_ACTION_ESP_HANDLE = UVERBS_ATTR_CREATE_FLOW_ACTION_ESP_HANDLE,
     84 };
     85 enum uverbs_attrs_destroy_flow_action_esp {
     86   UVERBS_ATTR_DESTROY_FLOW_ACTION_HANDLE,
     87 };
     88 enum uverbs_methods_cq {
     89   UVERBS_METHOD_CQ_CREATE,
     90   UVERBS_METHOD_CQ_DESTROY,
     91 };
     92 enum uverbs_methods_actions_flow_action_ops {
     93   UVERBS_METHOD_FLOW_ACTION_ESP_CREATE,
     94   UVERBS_METHOD_FLOW_ACTION_DESTROY,
     95   UVERBS_METHOD_FLOW_ACTION_ESP_MODIFY,
     96 };
     97 enum uverbs_attrs_alloc_dm_cmd_attr_ids {
     98   UVERBS_ATTR_ALLOC_DM_HANDLE,
     99   UVERBS_ATTR_ALLOC_DM_LENGTH,
    100   UVERBS_ATTR_ALLOC_DM_ALIGNMENT,
    101 };
    102 enum uverbs_attrs_free_dm_cmd_attr_ids {
    103   UVERBS_ATTR_FREE_DM_HANDLE,
    104 };
    105 enum uverbs_methods_dm {
    106   UVERBS_METHOD_DM_ALLOC,
    107   UVERBS_METHOD_DM_FREE,
    108 };
    109 enum uverbs_attrs_reg_dm_mr_cmd_attr_ids {
    110   UVERBS_ATTR_REG_DM_MR_HANDLE,
    111   UVERBS_ATTR_REG_DM_MR_OFFSET,
    112   UVERBS_ATTR_REG_DM_MR_LENGTH,
    113   UVERBS_ATTR_REG_DM_MR_PD_HANDLE,
    114   UVERBS_ATTR_REG_DM_MR_ACCESS_FLAGS,
    115   UVERBS_ATTR_REG_DM_MR_DM_HANDLE,
    116   UVERBS_ATTR_REG_DM_MR_RESP_LKEY,
    117   UVERBS_ATTR_REG_DM_MR_RESP_RKEY,
    118 };
    119 enum uverbs_methods_mr {
    120   UVERBS_METHOD_DM_MR_REG,
    121   UVERBS_METHOD_MR_DESTROY,
    122   UVERBS_METHOD_ADVISE_MR,
    123 };
    124 enum uverbs_attrs_mr_destroy_ids {
    125   UVERBS_ATTR_DESTROY_MR_HANDLE,
    126 };
    127 enum uverbs_attrs_advise_mr_cmd_attr_ids {
    128   UVERBS_ATTR_ADVISE_MR_PD_HANDLE,
    129   UVERBS_ATTR_ADVISE_MR_ADVICE,
    130   UVERBS_ATTR_ADVISE_MR_FLAGS,
    131   UVERBS_ATTR_ADVISE_MR_SGE_LIST,
    132 };
    133 enum uverbs_attrs_create_counters_cmd_attr_ids {
    134   UVERBS_ATTR_CREATE_COUNTERS_HANDLE,
    135 };
    136 enum uverbs_attrs_destroy_counters_cmd_attr_ids {
    137   UVERBS_ATTR_DESTROY_COUNTERS_HANDLE,
    138 };
    139 enum uverbs_attrs_read_counters_cmd_attr_ids {
    140   UVERBS_ATTR_READ_COUNTERS_HANDLE,
    141   UVERBS_ATTR_READ_COUNTERS_BUFF,
    142   UVERBS_ATTR_READ_COUNTERS_FLAGS,
    143 };
    144 enum uverbs_methods_actions_counters_ops {
    145   UVERBS_METHOD_COUNTERS_CREATE,
    146   UVERBS_METHOD_COUNTERS_DESTROY,
    147   UVERBS_METHOD_COUNTERS_READ,
    148 };
    149 enum uverbs_attrs_info_handles_id {
    150   UVERBS_ATTR_INFO_OBJECT_ID,
    151   UVERBS_ATTR_INFO_TOTAL_HANDLES,
    152   UVERBS_ATTR_INFO_HANDLES_LIST,
    153 };
    154 enum uverbs_methods_pd {
    155   UVERBS_METHOD_PD_DESTROY,
    156 };
    157 enum uverbs_attrs_pd_destroy_ids {
    158   UVERBS_ATTR_DESTROY_PD_HANDLE,
    159 };
    160 enum uverbs_methods_mw {
    161   UVERBS_METHOD_MW_DESTROY,
    162 };
    163 enum uverbs_attrs_mw_destroy_ids {
    164   UVERBS_ATTR_DESTROY_MW_HANDLE,
    165 };
    166 enum uverbs_methods_xrcd {
    167   UVERBS_METHOD_XRCD_DESTROY,
    168 };
    169 enum uverbs_attrs_xrcd_destroy_ids {
    170   UVERBS_ATTR_DESTROY_XRCD_HANDLE,
    171 };
    172 enum uverbs_methods_ah {
    173   UVERBS_METHOD_AH_DESTROY,
    174 };
    175 enum uverbs_attrs_ah_destroy_ids {
    176   UVERBS_ATTR_DESTROY_AH_HANDLE,
    177 };
    178 enum uverbs_methods_rwq_ind_tbl {
    179   UVERBS_METHOD_RWQ_IND_TBL_DESTROY,
    180 };
    181 enum uverbs_attrs_rwq_ind_tbl_destroy_ids {
    182   UVERBS_ATTR_DESTROY_RWQ_IND_TBL_HANDLE,
    183 };
    184 enum uverbs_methods_flow {
    185   UVERBS_METHOD_FLOW_DESTROY,
    186 };
    187 enum uverbs_attrs_flow_destroy_ids {
    188   UVERBS_ATTR_DESTROY_FLOW_HANDLE,
    189 };
    190 #endif
    191