summaryrefslogtreecommitdiff
path: root/include/rdma/rdma_cm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/rdma/rdma_cm.h')
-rw-r--r--include/rdma/rdma_cm.h35
1 files changed, 32 insertions, 3 deletions
diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h
index d989f030fae0..9bd930a83e6e 100644
--- a/include/rdma/rdma_cm.h
+++ b/include/rdma/rdma_cm.h
@@ -33,7 +33,11 @@ enum rdma_cm_event_type {
RDMA_CM_EVENT_MULTICAST_JOIN,
RDMA_CM_EVENT_MULTICAST_ERROR,
RDMA_CM_EVENT_ADDR_CHANGE,
- RDMA_CM_EVENT_TIMEWAIT_EXIT
+ RDMA_CM_EVENT_TIMEWAIT_EXIT,
+ RDMA_CM_EVENT_ADDRINFO_RESOLVED,
+ RDMA_CM_EVENT_ADDRINFO_ERROR,
+ RDMA_CM_EVENT_USER,
+ RDMA_CM_EVENT_INTERNAL,
};
const char *__attribute_const__ rdma_event_msg(enum rdma_cm_event_type event);
@@ -52,7 +56,20 @@ struct rdma_addr {
struct rdma_route {
struct rdma_addr addr;
struct sa_path_rec *path_rec;
- int num_paths;
+
+ /* Optional path records of primary path */
+ struct sa_path_rec *path_rec_inbound;
+ struct sa_path_rec *path_rec_outbound;
+
+ /*
+ * 0 - No primary nor alternate path is available
+ * 1 - Only primary path is available
+ * 2 - Both primary and alternate path are available
+ */
+ int num_pri_alt_paths;
+
+ unsigned int num_service_recs;
+ struct sa_service_rec *service_recs;
};
struct rdma_conn_param {
@@ -83,6 +100,7 @@ struct rdma_cm_event {
union {
struct rdma_conn_param conn;
struct rdma_ud_param ud;
+ u64 arg;
} param;
struct rdma_ucm_ece ece;
};
@@ -108,6 +126,7 @@ struct rdma_cm_id {
enum rdma_ucm_port_space ps;
enum ib_qp_type qp_type;
u32 port_num;
+ struct work_struct net_work;
};
struct rdma_cm_id *
@@ -187,6 +206,17 @@ int rdma_resolve_addr(struct rdma_cm_id *id, struct sockaddr *src_addr,
int rdma_resolve_route(struct rdma_cm_id *id, unsigned long timeout_ms);
/**
+ * rdma_resolve_ib_service - Resolve the IB service record of the
+ * service with the given service ID or name.
+ *
+ * This function is optional in the rdma cm flow. It is called on the client
+ * side of a connection, before calling rdma_resolve_route. The resolution
+ * can be done once per rdma_cm_id.
+ */
+int rdma_resolve_ib_service(struct rdma_cm_id *id,
+ struct rdma_ucm_ib_service *ibs);
+
+/**
* rdma_create_qp - Allocate a QP and associate it with the specified RDMA
* identifier.
*
@@ -377,6 +407,5 @@ void rdma_read_gids(struct rdma_cm_id *cm_id, union ib_gid *sgid,
union ib_gid *dgid);
struct iw_cm_id *rdma_iw_cm_id(struct rdma_cm_id *cm_id);
-struct rdma_cm_id *rdma_res_to_id(struct rdma_restrack_entry *res);
#endif /* RDMA_CM_H */