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

Krishna Kumar krkumar2 at in.ibm.com
Thu Aug 3 01:37:57 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.h NEW/librdmacm/include/rdma/rdma_cma.h
--- ORG/librdmacm/include/rdma/rdma_cma.h	2006-07-30 21:18:17.000000000 -0700
+++ NEW/librdmacm/include/rdma/rdma_cma.h	2006-08-03 17:22:26.000000000 -0700
@@ -68,8 +68,8 @@ enum {
 };
 
 struct ib_addr {
-	union ibv_gid	sgid;
-	union ibv_gid	dgid;
+	union rdmav_gid	sgid;
+	union rdmav_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 rdmav_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 rdmav_context	*verbs;
 	struct rdma_event_channel *channel;
 	void			*context;
-	struct ibv_qp		*qp;
+	struct rdmav_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 rdmav_pd *pd,
+		   struct rdmav_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 rdmav_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 rdmav_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 rdmav_context **list);
 
 #endif /* RDMA_CMA_H */
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-30 21:18:17.000000000 -0700
+++ NEW/librdmacm/include/rdma/rdma_cma_abi.h	2006-08-03 17:22:32.000000000 -0700
@@ -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 rdmav_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 rdmav_kern_ah_attr ah_attr;
 };
 
 struct ucma_abi_get_dst_attr {
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-30 21:18:17.000000000 -0700
+++ NEW/librdmacm/include/rdma/rdma_cma_ib.h	2006-08-03 17:22:39.000000000 -0700
@@ -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 rdmav_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 rdmav_ah_attr *ah_attr, uint32_t *remote_qpn,
 		      uint32_t *remote_qkey);
 
 #endif /* RDMA_CMA_IB_H */




More information about the general mailing list