[ofa-general] [PATCH 1/3]: IB/core: allow lockless SRQ

Eli Cohen eli at mellanox.co.il
Wed Oct 10 08:55:40 PDT 2007


Allow to modify a SRQ to be lockless

This patch allow the consumer to call ib_modify_srq and specify
whether the SRQ is lockless or not.

Signed-off-by: Eli Cohen <eli at mellanox.co.il>

---

This allows the consumer to decide if it needs a lock or not.
IPOIB CM for example does not need it and can benefit from this approach.

Index: ofa_kernel-1.2.5/include/rdma/ib_verbs.h
===================================================================
--- ofa_kernel-1.2.5.orig/include/rdma/ib_verbs.h	2007-10-10 15:29:36.000000000 +0200
+++ ofa_kernel-1.2.5/include/rdma/ib_verbs.h	2007-10-10 15:35:58.000000000 +0200
@@ -442,18 +442,21 @@ enum ib_cq_notify_flags {
 enum ib_srq_attr_mask {
 	IB_SRQ_MAX_WR	= 1 << 0,
 	IB_SRQ_LIMIT	= 1 << 1,
+	IB_SRQ_LOCKNESS	= 1 << 2,
 };
 
 struct ib_srq_attr {
 	u32	max_wr;
 	u32	max_sge;
 	u32	srq_limit;
+	int	use_lock;
 };
 
 struct ib_srq_init_attr {
 	void		      (*event_handler)(struct ib_event *, void *);
 	void		       *srq_context;
 	struct ib_srq_attr	attr;
+	u32			flags;
 };
 
 struct ib_qp_cap {




More information about the general mailing list