aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/ib_cm.c
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-03-01 17:03:09 -0500
committerAndy Grover <andy.grover@oracle.com>2010-09-08 21:12:08 -0400
commitff3d7d36134ef7138803734fdbf91cc986ea7976 (patch)
tree77ef55e071f84f1b97550dbc6d6755cb3089339b /net/rds/ib_cm.c
parentaa0a4ef4ac3a3c5ffa35e32520bfbc0922ef3630 (diff)
RDS: Perform unmapping ops in stages
Previously, RDS would wait until the final send WR had completed and then handle cleanup. With silent ops, we do not know if an atomic, rdma, or data op will be last. This patch handles any of these cases by keeping a pointer to the last op in the message in m_last_op. When the TX completion event fires, rds dispatches to per-op-type cleanup functions, and then does whole-message cleanup, if the last op equalled m_last_op. This patch also moves towards having op-specific functions take the op struct, instead of the overall rm struct. rds_ib_connection has a pointer to keep track of a a partially- completed data send operation. This patch changes it from an rds_message pointer to the narrower rm_data_op pointer, and modifies places that use this pointer as needed. Signed-off-by: Andy Grover <andy.grover@oracle.com>
Diffstat (limited to 'net/rds/ib_cm.c')
-rw-r--r--net/rds/ib_cm.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index 8b0c743c0900..b5b5ebbc0bb6 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -673,9 +673,12 @@ void rds_ib_conn_shutdown(struct rds_connection *conn)
673 BUG_ON(ic->rds_ibdev); 673 BUG_ON(ic->rds_ibdev);
674 674
675 /* Clear pending transmit */ 675 /* Clear pending transmit */
676 if (ic->i_rm) { 676 if (ic->i_data_op) {
677 rds_message_put(ic->i_rm); 677 struct rds_message *rm;
678 ic->i_rm = NULL; 678
679 rm = container_of(ic->i_data_op, struct rds_message, data);
680 rds_message_put(rm);
681 ic->i_data_op = NULL;
679 } 682 }
680 683
681 /* Clear the ACK state */ 684 /* Clear the ACK state */