Skip to contentSkip to conversation

ib_core: changes to support XRC RCV qp's

PATCH New Jack Morgenstein 1 participant 1 message May 19, 2010 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/4 ib_core: changes to support XRC RCV qp's

The core layer does reference counting on XRC RCV qp's, and also is responsible for distributing async events generated for XRC RCV qp's to all registered processes.

Methods: ib_create_xrc_rcv_qp, ib_destroy_xrc_rcv_qp, ib_reg_xrc_rcv_qp and ib_unreg_xrc_rcv_qp -- and a XRC RCV QP cleanup function called when a process terminates (this function removes all registrations for that process, and destroys any XRC RCV QPs which have no processes registered after the cleanup).

All other functions serve to support keeping track of the XRC RCV qp's (in a radix tree), and to distribute the async events.

V3: Fixed bug reported by Sean, remove EXPORT_SYMBOL from internal procedures ib_xrc_rcv_qp_table_xxx, and renamed ib_xrc_rcv_table_cleanup to ib_xrc_rcv_qp_table_cleanup for consistency.

---
 drivers/infiniband/core/device.c |    6 +-
 drivers/infiniband/core/verbs.c  |  275 ++++++++++++++++++++++++++++++++++++++
 include/rdma/ib_verbs.h          |   45 ++++++
 3 files changed, 325 insertions(+), 1 deletions(-)
drivers/infiniband/core/device.c +5 -1
Index: infiniband/drivers/infiniband/core/device.c
===================================================================
@@ -172,9 +172,13 @@ static int end_port(struct ib_device *de
  */
 struct ib_device *ib_alloc_device(size_t size)
 {
+	struct ib_device *ibdev;
 	BUG_ON(size < sizeof (struct ib_device));
 
-	return kzalloc(size, GFP_KERNEL);
+	ibdev = kzalloc(size, GFP_KERNEL);
+	if (ibdev)
+		ib_xrc_rcv_qp_table_init(ibdev);
+	return ibdev;
 }
 EXPORT_SYMBOL(ib_alloc_device);
 
drivers/infiniband/core/verbs.c +275 -0

284 lines not on this page · raw message

include/rdma/ib_verbs.h +45 -0

85 lines not on this page · raw message

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html