Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1211516
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Santosh Shilimkar <santosh.shilimkar@oracle.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 03/14] RDS: destroy the ib state earlier during shutdown |
| Date | Sun, 23 Aug 2015 00:50:01 +0200 |
| Message-ID | <q0pLP-7Ac-1@gated-at.bofh.it> (permalink) |
| References | <q0pLP-7Ac-3@gated-at.bofh.it> |
| X-Original-To | netdev@vger.kernel.org |
| X-Mailer | git-send-email 1.9.1 |
| X-Source-IP | userv0021.oracle.com [156.151.31.71] |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 54 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, davem@davemloft.net, ssantosh@kernel.org, Santosh Shilimkar <santosh.shilimkar@oracle.com> |
| X-Original-Date | Sat, 22 Aug 2015 15:45:24 -0700 |
| X-Original-Message-ID | <1440283535-4800-4-git-send-email-santosh.shilimkar@oracle.com> |
| X-Original-References | <1440283535-4800-1-git-send-email-santosh.shilimkar@oracle.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1211516 |
Show key headers only | View raw
Destroy ib state early during shutdown. Otherwise we can get callbacks after the QP isn't really able to handle them. Reviewed-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com> Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> --- net/rds/ib_cm.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index 0da2a45..8b40d3c 100644 --- a/net/rds/ib_cm.c +++ b/net/rds/ib_cm.c @@ -639,6 +639,16 @@ void rds_ib_conn_shutdown(struct rds_connection *conn) (atomic_read(&ic->i_signaled_sends) == 0)); tasklet_kill(&ic->i_recv_tasklet); + /* first destroy the ib state that generates callbacks */ + if (ic->i_cm_id->qp) + rdma_destroy_qp(ic->i_cm_id); + if (ic->i_send_cq) + ib_destroy_cq(ic->i_send_cq); + if (ic->i_recv_cq) + ib_destroy_cq(ic->i_recv_cq); + rdma_destroy_id(ic->i_cm_id); + + /* then free the resources that ib callbacks use */ if (ic->i_send_hdrs) ib_dma_free_coherent(dev, ic->i_send_ring.w_nr * @@ -662,14 +672,6 @@ void rds_ib_conn_shutdown(struct rds_connection *conn) if (ic->i_recvs) rds_ib_recv_clear_ring(ic); - if (ic->i_cm_id->qp) - rdma_destroy_qp(ic->i_cm_id); - if (ic->i_send_cq) - ib_destroy_cq(ic->i_send_cq); - if (ic->i_recv_cq) - ib_destroy_cq(ic->i_recv_cq); - rdma_destroy_id(ic->i_cm_id); - /* * Move connection back to the nodev list. */ -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 03/14] RDS: destroy the ib state earlier during shutdown Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2015-08-23 00:50 +0200
csiph-web