[rds-commits] zab commits r114 - trunk/linux/net/rds

svn-commits@oss.oracle.com svn-commits at oss.oracle.com
Tue Jun 27 13:02:38 CDT 2006


Author: zab
Date: 2006-06-27 13:02:36 -0500 (Tue, 27 Jun 2006)
New Revision: 114

Modified:
   trunk/linux/net/rds/ib_recv.c
   trunk/linux/net/rds/ib_send.c
Log:
Add more of the completion handler paths


Modified: trunk/linux/net/rds/ib_recv.c
===================================================================
--- trunk/linux/net/rds/ib_recv.c	2006-06-23 22:51:38 UTC (rev 113)
+++ trunk/linux/net/rds/ib_recv.c	2006-06-27 18:02:36 UTC (rev 114)
@@ -188,7 +188,7 @@
  * We're relying on RC completions arriving in post order so that we always
  * get an orderly stream of message headers and then their data fragments.
  */
-void rds_ib_recv_callback(struct rds_connection *conn, u64 wr_id)
+void rds_ib_recv_complete(struct rds_connection *conn, u64 wr_id)
 {
 	struct rds_ib_connection *ic = conn->c_transport_data;
 	struct rds_ib_recv *recv = (void *)(unsigned long)wr_id;

Modified: trunk/linux/net/rds/ib_send.c
===================================================================
--- trunk/linux/net/rds/ib_send.c	2006-06-23 22:51:38 UTC (rev 113)
+++ trunk/linux/net/rds/ib_send.c	2006-06-27 18:02:36 UTC (rev 114)
@@ -81,6 +81,7 @@
 	ih->ih_sge.lkey = ic->i_mr->lkey;
 
 	ih->ih_wr.next = NULL;
+	ih->ih_wr.wr_id = ((unsigned long)ih) | RDS_IB_WR_ID_HEADER;
 	ih->ih_wr.sg_list = &ih->ih_sge;
 	ih->ih_wr.num_sge = 1;
 	ih->ih_wr.opcode = IB_WR_SEND_WITH_IMM;
@@ -111,6 +112,7 @@
 
 void rds_ib_ds_put(struct rds_ib_data_send *ds)
 {
+	rdsdebug("decref ds %p ref %d\n", ds, atomic_read(&ds->id_refcount));
 	if (atomic_dec_and_test(&ds->id_refcount)) {
 		if (ds->id_rm) {
 			struct rds_ib_connection *ic = ds->id_ic;
@@ -124,6 +126,14 @@
 	}
 }
 
+void rds_ib_data_complete(struct rds_connection *conn, u64 wr_id)
+{
+	struct rds_ib_data_send *ds = (void *)(unsigned long)wr_id;
+
+	rdsdebug("conn %p wr_id 0x%llx\n", conn, (unsigned long long)wr_id);
+	rds_ib_ds_put(ds);
+}
+
 static struct rds_ib_data_send *rds_ib_ds_get(struct rds_ib_connection *ic,
 					      struct rds_message *rm,
 					      unsigned int sg,
@@ -186,6 +196,7 @@
 			wr->next = wr + 1;
 		else
 			wr->next = NULL;
+		wr->wr_id = ((unsigned long)ds) | RDS_IB_WR_ID_DATA;
 		wr->sg_list = sge;
 		wr->num_sge = 1;
 		wr->opcode = IB_WR_SEND_WITH_IMM;




More information about the rds-commits mailing list