[openib-general] [PATCH 4/6] librdmacm include file changes.

Krishna Kumar krkumar2 at in.ibm.com
Thu Jul 27 21:50:28 PDT 2006


Convert librdmacm include files to use the new libibverbs API.

Signed-off-by: Krishna Kumar <krkumar2 at in.ibm.com>

diff -ruNp ORG/librdmacm/include/rdma/rdma_cma_abi.h NEW/librdmacm/include/rdma/rdma_cma_abi.h
--- ORG/librdmacm/include/rdma/rdma_cma_abi.h	2006-07-27 15:34:18.000000000 +0530
+++ NEW/librdmacm/include/rdma/rdma_cma_abi.h	2006-07-27 15:34:44.000000000 +0530
@@ -123,7 +123,7 @@ struct ucma_abi_query_route {
 
 struct ucma_abi_query_route_resp {
 	__u64 node_guid;
-	struct ibv_kern_path_rec ib_route[2];
+	struct rdma_kern_path_rec ib_route[2];
 	struct sockaddr_in6 src_addr;
 	struct sockaddr_in6 dst_addr;
 	__u32 num_paths;
@@ -194,7 +194,7 @@ struct ucma_abi_leave_mcast {
 struct ucma_abi_dst_attr_resp {
 	__u32 remote_qpn;
 	__u32 remote_qkey;
-	struct ibv_kern_ah_attr ah_attr;
+	struct rdma_kern_ah_attr ah_attr;
 };
 
 struct ucma_abi_get_dst_attr {
diff -ruNp ORG/librdmacm/include/rdma/rdma_cma.h NEW/librdmacm/include/rdma/rdma_cma.h
--- ORG/librdmacm/include/rdma/rdma_cma.h	2006-07-27 15:34:18.000000000 +0530
+++ NEW/librdmacm/include/rdma/rdma_cma.h	2006-07-27 15:34:44.000000000 +0530
@@ -68,8 +68,8 @@ enum {
 };
 
 struct ib_addr {
-	union ibv_gid	sgid;
-	union ibv_gid	dgid;
+	union rdma_gid	sgid;
+	union rdma_gid	dgid;
 	uint16_t	pkey;
 };
 
@@ -83,7 +83,7 @@ struct rdma_addr {
 
 struct rdma_route {
 	struct rdma_addr	 addr;
-	struct ibv_sa_path_rec	*path_rec;
+	struct rdma_sa_path_rec	*path_rec;
 	int			 num_paths;
 };
 
@@ -92,10 +92,10 @@ struct rdma_event_channel {
 };
 
 struct rdma_cm_id {
-	struct ibv_context	*verbs;
+	struct rdma_context	*verbs;
 	struct rdma_event_channel *channel;
 	void			*context;
-	struct ibv_qp		*qp;
+	struct rdma_qp		*qp;
 	struct rdma_route	 route;
 	enum rdma_port_space	 ps;
 	uint8_t			 port_num;
@@ -191,8 +191,8 @@ int rdma_resolve_route(struct rdma_cm_id
  * QPs allocated to an rdma_cm_id will automatically be transitioned by the CMA
  * through their states.
  */
-int rdma_create_qp(struct rdma_cm_id *id, struct ibv_pd *pd,
-		   struct ibv_qp_init_attr *qp_init_attr);
+int rdma_create_qp(struct rdma_cm_id *id, struct rdma_pd *pd,
+		   struct rdma_qp_init_attr *qp_init_attr);
 
 /**
  * rdma_destroy_qp - Deallocate the QP associated with the specified RDMA
@@ -214,7 +214,7 @@ struct rdma_conn_param {
 	/* Fields below ignored if a QP is created on the rdma_cm_id. */
 	uint8_t srq;
 	uint32_t qp_num;
-	enum ibv_qp_type qp_type;
+	enum rdma_qp_type qp_type;
 };
 
 /**
@@ -341,11 +341,11 @@ static inline uint16_t rdma_get_dst_port
  * across multiple rdma_cm_id's.
  * The array must be released by calling rdma_free_devices().
  */
-struct ibv_context **rdma_get_devices(int *num_devices);
+struct rdma_context **rdma_get_devices(int *num_devices);
 
 /**
  * rdma_free_devices - Frees the list of devices returned by rdma_get_devices().
  */
-void rdma_free_devices(struct ibv_context **list);
+void rdma_free_devices(struct rdma_context **list);
 
 #endif /* RDMA_CMA_H */
diff -ruNp ORG/librdmacm/include/rdma/rdma_cma_ib.h NEW/librdmacm/include/rdma/rdma_cma_ib.h
--- ORG/librdmacm/include/rdma/rdma_cma_ib.h	2006-07-27 15:34:18.000000000 +0530
+++ NEW/librdmacm/include/rdma/rdma_cma_ib.h	2006-07-27 15:34:44.000000000 +0530
@@ -34,7 +34,7 @@
 
 /* IB specific option names for get/set. */
 enum {
-	IB_PATH_OPTIONS = 1,	/* struct ibv_kern_path_rec */
+	IB_PATH_OPTIONS = 1,	/* struct rdma_kern_path_rec */
 	IB_CM_REQ_OPTIONS = 2	/* struct ib_cm_req_opt */
 };
 
@@ -56,7 +56,7 @@ struct ib_cm_req_opt {
  * Users must have called rdma_connect() to resolve the destination information.
  */
 int rdma_get_dst_attr(struct rdma_cm_id *id, struct sockaddr *addr,
-		      struct ibv_ah_attr *ah_attr, uint32_t *remote_qpn,
+		      struct rdma_ah_attr *ah_attr, uint32_t *remote_qpn,
 		      uint32_t *remote_qkey);
 
 #endif /* RDMA_CMA_IB_H */




More information about the general mailing list