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

svn-commits@oss.oracle.com svn-commits at oss.oracle.com
Wed Jun 28 15:58:14 CDT 2006


Author: zab
Date: 2006-06-28 15:58:12 -0500 (Wed, 28 Jun 2006)
New Revision: 119

Modified:
   trunk/linux/net/rds/ib.c
   trunk/linux/net/rds/ib.h
   trunk/linux/net/rds/ib_cm.c
   trunk/linux/net/rds/ib_recv.c
Log:
Wire up a basic IB recv callback which just tries to fill the posted receives.


Modified: trunk/linux/net/rds/ib.c
===================================================================
--- trunk/linux/net/rds/ib.c	2006-06-28 20:39:58 UTC (rev 118)
+++ trunk/linux/net/rds/ib.c	2006-06-28 20:58:12 UTC (rev 119)
@@ -63,6 +63,7 @@
 	.xmit_complete		= rds_ib_xmit_complete,
 	.xmit_header		= rds_ib_xmit_header,
 	.xmit_data		= rds_ib_xmit_data,
+	.recv			= rds_ib_recv,
 	.conn_alloc		= rds_ib_conn_alloc,
 	.conn_free		= rds_ib_conn_free,
 	.conn_connect		= rds_ib_conn_connect,

Modified: trunk/linux/net/rds/ib.h
===================================================================
--- trunk/linux/net/rds/ib.h	2006-06-28 20:39:58 UTC (rev 118)
+++ trunk/linux/net/rds/ib.h	2006-06-28 20:58:12 UTC (rev 119)
@@ -97,7 +97,7 @@
 int __init rds_ib_recv_init(void);
 void __exit rds_ib_recv_exit(void);
 void rds_ib_data_ready(struct sock *sk, int bytes);
-void rds_ib_recv_worker(void *arg);
+int rds_ib_recv(struct rds_connection *conn);
 void rds_ib_inc_free(struct rds_incoming *inc);
 int rds_ib_inc_copy_to_user(struct rds_incoming *inc, struct iovec *iov,
 			     size_t size);

Modified: trunk/linux/net/rds/ib_cm.c
===================================================================
--- trunk/linux/net/rds/ib_cm.c	2006-06-28 20:39:58 UTC (rev 118)
+++ trunk/linux/net/rds/ib_cm.c	2006-06-28 20:58:12 UTC (rev 119)
@@ -39,6 +39,10 @@
 	conn_param->rnr_retry_count = 7;
 }
 
+/*
+ * XXX serialize with the thread somehow?  TCP does this by getting
+ * the callback lock while it is working in the thread.
+ */
 static void rds_ib_cq_comp_handler(struct ib_cq *cq, void *context)
 {
 	struct rds_connection *conn = context;
@@ -57,6 +61,7 @@
 		id_type = wc.wr_id & RDS_IB_WR_ID_MASK;
 		wr_id = wc.wr_id & ~RDS_IB_WR_ID_MASK;
 
+		/* XXX watch for allocation failures and kick the thread */
 		switch(id_type) {
 			case RDS_IB_WR_ID_HEADER:
 				rds_ib_header_complete(conn, wr_id);

Modified: trunk/linux/net/rds/ib_recv.c
===================================================================
--- trunk/linux/net/rds/ib_recv.c	2006-06-28 20:39:58 UTC (rev 118)
+++ trunk/linux/net/rds/ib_recv.c	2006-06-28 20:58:12 UTC (rev 119)
@@ -277,6 +277,12 @@
 	return ret;
 }
 
+/* XXX have this also poll the conn's completion queue */
+int rds_ib_recv(struct rds_connection *conn)
+{
+	return rds_ib_recv_refill(conn);
+}
+
 int __init rds_ib_recv_init(void)
 {
 	rds_ib_incoming_slab = kmem_cache_create("rds_ib_incoming",




More information about the rds-commits mailing list