1 #ifndef _UAPI_RDMA_NETLINK_H 2 #define _UAPI_RDMA_NETLINK_H 3 4 #include <linux/types.h> 5 6 enum { 7 RDMA_NL_RDMA_CM = 1, 8 RDMA_NL_NES, 9 RDMA_NL_C4IW, 10 RDMA_NL_NUM_CLIENTS 11 }; 12 13 enum { 14 RDMA_NL_GROUP_CM = 1, 15 RDMA_NL_GROUP_IWPM, 16 RDMA_NL_NUM_GROUPS 17 }; 18 19 #define RDMA_NL_GET_CLIENT(type) ((type & (((1 << 6) - 1) << 10)) >> 10) 20 #define RDMA_NL_GET_OP(type) (type & ((1 << 10) - 1)) 21 #define RDMA_NL_GET_TYPE(client, op) ((client << 10) + op) 22 23 enum { 24 RDMA_NL_RDMA_CM_ID_STATS = 0, 25 RDMA_NL_RDMA_CM_NUM_OPS 26 }; 27 28 enum { 29 RDMA_NL_RDMA_CM_ATTR_SRC_ADDR = 1, 30 RDMA_NL_RDMA_CM_ATTR_DST_ADDR, 31 RDMA_NL_RDMA_CM_NUM_ATTR, 32 }; 33 34 /* iwarp port mapper op-codes */ 35 enum { 36 RDMA_NL_IWPM_REG_PID = 0, 37 RDMA_NL_IWPM_ADD_MAPPING, 38 RDMA_NL_IWPM_QUERY_MAPPING, 39 RDMA_NL_IWPM_REMOVE_MAPPING, 40 RDMA_NL_IWPM_HANDLE_ERR, 41 RDMA_NL_IWPM_MAPINFO, 42 RDMA_NL_IWPM_MAPINFO_NUM, 43 RDMA_NL_IWPM_NUM_OPS 44 }; 45 46 struct rdma_cm_id_stats { 47 __u32 qp_num; 48 __u32 bound_dev_if; 49 __u32 port_space; 50 __s32 pid; 51 __u8 cm_state; 52 __u8 node_type; 53 __u8 port_num; 54 __u8 qp_type; 55 }; 56 57 enum { 58 IWPM_NLA_REG_PID_UNSPEC = 0, 59 IWPM_NLA_REG_PID_SEQ, 60 IWPM_NLA_REG_IF_NAME, 61 IWPM_NLA_REG_IBDEV_NAME, 62 IWPM_NLA_REG_ULIB_NAME, 63 IWPM_NLA_REG_PID_MAX 64 }; 65 66 enum { 67 IWPM_NLA_RREG_PID_UNSPEC = 0, 68 IWPM_NLA_RREG_PID_SEQ, 69 IWPM_NLA_RREG_IBDEV_NAME, 70 IWPM_NLA_RREG_ULIB_NAME, 71 IWPM_NLA_RREG_ULIB_VER, 72 IWPM_NLA_RREG_PID_ERR, 73 IWPM_NLA_RREG_PID_MAX 74 75 }; 76 77 enum { 78 IWPM_NLA_MANAGE_MAPPING_UNSPEC = 0, 79 IWPM_NLA_MANAGE_MAPPING_SEQ, 80 IWPM_NLA_MANAGE_ADDR, 81 IWPM_NLA_MANAGE_MAPPED_LOC_ADDR, 82 IWPM_NLA_RMANAGE_MAPPING_ERR, 83 IWPM_NLA_RMANAGE_MAPPING_MAX 84 }; 85 86 #define IWPM_NLA_MANAGE_MAPPING_MAX 3 87 #define IWPM_NLA_QUERY_MAPPING_MAX 4 88 #define IWPM_NLA_MAPINFO_SEND_MAX 3 89 90 enum { 91 IWPM_NLA_QUERY_MAPPING_UNSPEC = 0, 92 IWPM_NLA_QUERY_MAPPING_SEQ, 93 IWPM_NLA_QUERY_LOCAL_ADDR, 94 IWPM_NLA_QUERY_REMOTE_ADDR, 95 IWPM_NLA_RQUERY_MAPPED_LOC_ADDR, 96 IWPM_NLA_RQUERY_MAPPED_REM_ADDR, 97 IWPM_NLA_RQUERY_MAPPING_ERR, 98 IWPM_NLA_RQUERY_MAPPING_MAX 99 }; 100 101 enum { 102 IWPM_NLA_MAPINFO_REQ_UNSPEC = 0, 103 IWPM_NLA_MAPINFO_ULIB_NAME, 104 IWPM_NLA_MAPINFO_ULIB_VER, 105 IWPM_NLA_MAPINFO_REQ_MAX 106 }; 107 108 enum { 109 IWPM_NLA_MAPINFO_UNSPEC = 0, 110 IWPM_NLA_MAPINFO_LOCAL_ADDR, 111 IWPM_NLA_MAPINFO_MAPPED_ADDR, 112 IWPM_NLA_MAPINFO_MAX 113 }; 114 115 enum { 116 IWPM_NLA_MAPINFO_NUM_UNSPEC = 0, 117 IWPM_NLA_MAPINFO_SEQ, 118 IWPM_NLA_MAPINFO_SEND_NUM, 119 IWPM_NLA_MAPINFO_ACK_NUM, 120 IWPM_NLA_MAPINFO_NUM_MAX 121 }; 122 123 enum { 124 IWPM_NLA_ERR_UNSPEC = 0, 125 IWPM_NLA_ERR_SEQ, 126 IWPM_NLA_ERR_CODE, 127 IWPM_NLA_ERR_MAX 128 }; 129 130 131 #endif /* _UAPI_RDMA_NETLINK_H */ 132