[openib-general] [PATCH] QP updates

Sean Hefty mshefty at ichips.intel.com
Tue Aug 10 12:05:10 PDT 2004


Patch updates ib_verbs.h for QP changes:

- removes ib_get_spl_qp - combines with ib_create_qp
- Added RNR timer enum.
- Renames qp_remote_atomic_flags to qp_access_flags (similar to MR)
- Adds enum for qp_access_flags
- Fixes some misnamed fields in struct ib_device.

Not yet committed.

Index: ib_verbs.h
===================================================================
--- ib_verbs.h	(revision 623)
+++ ib_verbs.h	(working copy)
@@ -256,7 +256,7 @@
 	u8			init_type_reply;
 }; 
 
-enum  ib_device_attr_flags {
+enum ib_device_attr_flags {
 	IB_DEVICE_SM			= 1,
 	IB_DEVICE_SNMP_TUN_SUP		= (1<<1),
 	IB_DEVICE_DM_SUP		= (1<<2),
@@ -322,12 +322,19 @@
 	enum ib_sig_type	sq_sig_type;
 	enum ib_sig_type	rq_sig_type;
 	enum ib_qp_type		qp_type;
+	u8			port_num; /* special QP types only */
+};
+
+enum ib_qp_access_flags {
+	IB_QP_REMOTE_WRITE	= (1<<1),
+	IB_QP_REMOTE_READ	= (1<<2),
+	IB_QP_REMOTE_ATOMIC	= (1<<3)
 };
 
 enum ib_qp_attr_mask {
 	IB_QP_STATE			= 1,
 	IB_QP_EN_SQD_ASYNC_NOTIFY	= (1<<1),
-	IB_QP_REMOTE_ATOMIC_FLAGS	= (1<<3),
+	IB_QP_ACCESS_FLAGS		= (1<<3),
 	IB_QP_PKEY_INDEX		= (1<<4),
 	IB_QP_PORT			= (1<<5),
 	IB_QP_QKEY			= (1<<6),
@@ -363,6 +370,41 @@
 	IB_MIG_ARMED
 };
 
+enum ib_rnr_timeout {
+	IB_RNR_TIMER_655_36 =  0,
+	IB_RNR_TIMER_000_01 =  1,
+	IB_RNR_TIMER_000_02 =  2,
+	IB_RNR_TIMER_000_03 =  3,
+	IB_RNR_TIMER_000_04 =  4,
+	IB_RNR_TIMER_000_06 =  5,
+	IB_RNR_TIMER_000_08 =  6,
+	IB_RNR_TIMER_000_12 =  7,
+	IB_RNR_TIMER_000_16 =  8,
+	IB_RNR_TIMER_000_24 =  9,
+	IB_RNR_TIMER_000_32 = 10,
+	IB_RNR_TIMER_000_48 = 11,
+	IB_RNR_TIMER_000_64 = 12,
+	IB_RNR_TIMER_000_96 = 13,
+	IB_RNR_TIMER_001_28 = 14,
+	IB_RNR_TIMER_001_92 = 15,
+	IB_RNR_TIMER_002_56 = 16,
+	IB_RNR_TIMER_003_84 = 17,
+	IB_RNR_TIMER_005_12 = 18,
+	IB_RNR_TIMER_007_68 = 19,
+	IB_RNR_TIMER_010_24 = 20,
+	IB_RNR_TIMER_015_36 = 21,
+	IB_RNR_TIMER_020_48 = 22,
+	IB_RNR_TIMER_030_72 = 23,
+	IB_RNR_TIMER_040_96 = 24,
+	IB_RNR_TIMER_061_44 = 25,
+	IB_RNR_TIMER_081_92 = 26,
+	IB_RNR_TIMER_122_88 = 27,
+	IB_RNR_TIMER_163_84 = 28,
+	IB_RNR_TIMER_245_76 = 29,
+	IB_RNR_TIMER_327_68 = 30,
+	IB_RNR_TIMER_491_52 = 31
+};
+
 struct ib_qp_attr {
 	enum ib_qp_state	qp_state;
 	enum ib_mtu		path_mtu;
@@ -371,7 +413,7 @@
 	u32			rq_psn;
 	u32			sq_psn;
 	u32			dest_qp_num;
-	int			remote_atomic_flags;
+	int			qp_access_flags;
 	struct ib_qp_cap	cap;
 	struct ib_ah_attr	ah_attr;
 	struct ib_ah_attr	alt_ah_attr;
@@ -652,16 +694,6 @@
 	return qp->device->destroy_qp(qp);
 }
 
-static inline struct ib_qp *ib_get_special_qp(struct ib_pd *pd,
-					u8 port_num,
-					enum ib_qp_type qp_type,
-					struct ib_qp_init_attr *qp_init_attr,
-					struct ib_qp_cap *qp_cap)
-{
-	return pd->device->get_special_qp(pd, port_num, qp_type,
-					  qp_init_attr, qp_cap);
-}
-
 static inline struct ib_srq *ib_create_srq(struct ib_pd *pd,
 					   void *srq_context,
 					   struct ib_srq_attr *srq_attr)
@@ -897,18 +929,18 @@
 				       u8 port_num, u16 index, u16 *pkey);
 	int		 (*modify_device)(struct ib_device *device,
 					  u8 port_num, int device_attr_flags);
-	struct ib_pd	 (*ib_alloc_pd)(struct ib_device *device);
+	struct ib_pd	 (*alloc_pd)(struct ib_device *device);
 	int		 (*dealloc_pd)(struct ib_pd *pd);
-	struct ib_ah	 (*ib_create_ah)(struct ib_pd *pd,
-					 struct ib_ah_attr *ah_attr);
+	struct ib_ah	 (*create_ah)(struct ib_pd *pd,
+				      struct ib_ah_attr *ah_attr);
 	int		 (*modify_ah)(struct ib_ah *ah,
 				      struct ib_ah_attr *ah_attr);
 	int		 (*query_ah)(struct ib_ah *ah,
 				     struct ib_ah_attr *ah_attr);
 	int		 (*destroy_ah)(struct ib_ah *ah);
-	struct ib_qp	 (*ib_create_qp)(struct ib_pd *pd,
-					 struct ib_qp_init_attr *qp_init_attr,
-					 struct ib_qp_cap *qp_cap);
+	struct ib_qp	 (*create_qp)(struct ib_pd *pd,
+				      struct ib_qp_init_attr *qp_init_attr,
+				      struct ib_qp_cap *qp_cap);
 	int		 (*modify_qp)(struct ib_qp *qp,
 				      struct ib_qp_attr *qp_attr,
 				      int qp_attr_mask,
@@ -918,14 +950,9 @@
 				    int qp_attr_mask,
 				    struct ib_qp_init_attr *qp_init_attr);
 	int		 (*destroy_qp)(struct ib_qp *qp);
-	struct ib_qp	 (*ib_get_special_qp)(struct ib_pd *pd,
-					   u8 port_num,
-					   enum ib_qp_type qp_type,
-					   struct ib_qp_init_attr *qp_init_attr,
-					   struct ib_qp_cap *qp_cap);
-	struct ib_srq	 (*ib_create_srq)(struct ib_pd *pd,
-					  void *srq_context,
-					  struct ib_srq_attr *srq_attr);
+	struct ib_srq	 (*create_srq)(struct ib_pd *pd,
+				       void *srq_context,
+				       struct ib_srq_attr *srq_attr);
 	int		 (*query_srq)(struct ib_srq *srq,
 				      struct ib_srq_attr *srq_attr);
 	int		 (*modify_srq)(struct ib_srq *srq,
@@ -936,16 +963,16 @@
 	int		 (*post_srq)(struct ib_srq *srq,
 				     struct ib_recv_wr *recv_wr,
 				     struct ib_recv_wr **bad_recv_wr);
-	struct ib_cq	 (*ib_create_cq)(struct ib_device *device,
-					 ib_comp_handler comp_handler,
-					 void *cq_context, int cqe);
+	struct ib_cq	 (*create_cq)(struct ib_device *device,
+				      ib_comp_handler comp_handler,
+				      void *cq_context, int cqe);
 	int		 (*resize_cq)(struct ib_cq *cq, int cqe);
 	int		 (*destroy_cq)(struct ib_cq *cq);
-	struct ib_mr	 (*ib_reg_phys_mr)(struct ib_pd *pd,
-					   struct ib_phys_buf *phys_buf_array,
-					   int num_phys_buf,
-					   int mr_access_flags,
-					   u64 *iova_start);
+	struct ib_mr	 (*reg_phys_mr)(struct ib_pd *pd,
+					struct ib_phys_buf *phys_buf_array,
+					int num_phys_buf,
+					int mr_access_flags,
+					u64 *iova_start);
 	int		 (*query_mr)(struct ib_mr *mr,
 				     struct ib_mr_attr *mr_attr);
 	int		 (*dereg_mr)(struct ib_mr *mr);
@@ -956,14 +983,14 @@
 					  int num_phys_buf,
 					  int mr_access_flags,
 					  u64 *iova_start);
-	struct ib_mw	 (*ib_alloc_mw)(struct ib_pd *pd);
+	struct ib_mw	 (*alloc_mw)(struct ib_pd *pd);
 	int		 (*bind_mw)(struct ib_qp *qp,
 				    struct ib_mw *mw,
 				    struct ib_mw_bind *mw_bind);
 	int		 (*dealloc_mw)(struct ib_mw *mw);
-	struct ib_fmr	 (*ib_alloc_fmr)(struct ib_pd *pd,
-					 int mr_access_flags,
-					 struct ib_fmr_attr *fmr_attr);
+	struct ib_fmr	 (*alloc_fmr)(struct ib_pd *pd,
+				      int mr_access_flags,
+				      struct ib_fmr_attr *fmr_attr);
 	int		 (*map_fmr)(struct ib_fmr *fmr, void *addr, u64 size);
 	int		 (*map_phys_fmr)(struct ib_fmr *fmr,
 					 struct ib_phys_buf *phys_buf_array,



More information about the general mailing list