aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/ib.h
diff options
context:
space:
mode:
authorZach Brown <zach.brown@oracle.com>2010-07-14 16:55:35 -0400
committerAndy Grover <andy.grover@oracle.com>2010-09-08 21:16:40 -0400
commitf046011cd73c372267befd10242988eb744649fe (patch)
treed184275400dee81f2a5027728bda849bec338d99 /net/rds/ib.h
parentef87b7ea39a91906218a262686bcb8bad8b6b46e (diff)
RDS/IB: track signaled sends
We're seeing bugs today where IB connection shutdown clears the send ring while the tasklet is processing completed sends. Implementation details cause this to dereference a null pointer. Shutdown needs to wait for send completion to stop before tearing down the connection. We can't simply wait for the ring to empty because it may contain unsignaled sends that will never be processed. This patch tracks the number of signaled sends that we've posted and waits for them to complete. It also makes sure that the tasklet has finished executing. Signed-off-by: Zach Brown <zach.brown@oracle.com>
Diffstat (limited to 'net/rds/ib.h')
-rw-r--r--net/rds/ib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/rds/ib.h b/net/rds/ib.h
index acda2dbc6576..a13ced504145 100644
--- a/net/rds/ib.h
+++ b/net/rds/ib.h
@@ -108,6 +108,7 @@ struct rds_ib_connection {
108 struct rds_header *i_send_hdrs; 108 struct rds_header *i_send_hdrs;
109 u64 i_send_hdrs_dma; 109 u64 i_send_hdrs_dma;
110 struct rds_ib_send_work *i_sends; 110 struct rds_ib_send_work *i_sends;
111 atomic_t i_signaled_sends;
111 112
112 /* rx */ 113 /* rx */
113 struct tasklet_struct i_recv_tasklet; 114 struct tasklet_struct i_recv_tasklet;