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

svn-commits@oss.oracle.com svn-commits at oss.oracle.com
Wed Jul 5 13:16:16 CDT 2006


Author: zab
Date: 2006-07-05 13:16:15 -0500 (Wed, 05 Jul 2006)
New Revision: 124

Modified:
   trunk/linux/net/rds/ib_send.c
   trunk/linux/net/rds/rds.h
Log:
Make sure to return the number of bytes sent from IB xmit_data so that forward
progress is made.


Modified: trunk/linux/net/rds/ib_send.c
===================================================================
--- trunk/linux/net/rds/ib_send.c	2006-07-04 00:17:26 UTC (rev 123)
+++ trunk/linux/net/rds/ib_send.c	2006-07-05 18:16:15 UTC (rev 124)
@@ -221,6 +221,8 @@
 	unsigned long first;
 	int ret;
 
+	BUG_ON(off % RDS_FRAG_SIZE);
+
 	nr_work = ceil(be32_to_cpu(rm->m_inc.i_hdr.h_len), RDS_FRAG_SIZE);
 
 	if (ds == NULL) {
@@ -247,6 +249,10 @@
 			ret = (wr - &ds->id_wr[first]) * RDS_FRAG_SIZE;
 		goto out;
 	}
+	/* figure out how many bytes we sent */
+	ret = ds->id_sge[nr_work - 1].length;
+	if (first < nr_work - 1)
+		ret += (nr_work - 1 - first) * RDS_FRAG_SIZE;
 
 	/* ok, we finished the message, drop our ds ref */
 	/* XXX this leaves the ds in flight, conn reset will have to 

Modified: trunk/linux/net/rds/rds.h
===================================================================
--- trunk/linux/net/rds/rds.h	2006-07-04 00:17:26 UTC (rev 123)
+++ trunk/linux/net/rds/rds.h	2006-07-05 18:16:15 UTC (rev 124)
@@ -154,6 +154,9 @@
  *        immediately.  Returning -ENOMEM tells the caller to retry the send at
  *        some point in the future.
  *
+ * @xmit_data: This will not be called for a zero length message which does
+ * 	       not have any payload.
+ *
  * @conn_shutdown: conn_shutdown stops traffic on the given connection.  Once
  *                 it returns the connection can not call rds_recv_incoming().
  *                 This can be called before conn_connect and it should be safe




More information about the rds-commits mailing list