rds: Don't check return value from destroy CQ
Subsystems (4)
PATCH 1/15 rds: Don't check return value from destroy CQ
In reply to a message not in the archiveFrom: Leon Romanovsky <[email protected]>
There is no value in checking ib_destroy_cq() result and skipping to clear struct ic fields. This connection needs to be reinitialized anyway.
--- net/rds/ib_cm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
net/rds/ib_cm.c +4 -4
@@ -611,11 +611,11 @@ static int rds_ib_setup_qp(struct rds_connection *conn) qp_out:rdma_destroy_qp (ic->i_cm_id); recv_cq_out: -if (!ib_destroy_cq (ic->i_recv_cq)) - ic->i_recv_cq =NULL ; +ib_destroy_cq (ic->i_recv_cq); + ic->i_recv_cq =NULL ; send_cq_out: -if (!ib_destroy_cq (ic->i_send_cq)) - ic->i_send_cq =NULL ; +ib_destroy_cq (ic->i_send_cq); + ic->i_send_cq =NULL ; rds_ibdev_out:rds_ib_remove_conn (rds_ibdev, conn); out:
Quoted 18 lines · Leon Romanovsky
From: Leon Romanovsky <[email protected]>
There is no value in checking
ib_destroy_cq()result and skipping to clear struct ic fields. This connection needs to be reinitialized anyway.Signed-off-by Leon Romanovsky <[email protected]>--- net/rds/ib_cm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)net/rds/ib_cm.c +0
-0@@ -611,11 +611,11 @@ static int rds_ib_setup_qp(struct rds_connection *conn) qp_out:rdma_destroy_qp (ic->i_cm_id);
net/rds/ib_cm.c static int rds_ib_setup_qp(struct rds_connection *conn) · line 618
Quoted 10 lines
net/rds/ib_cm.c +4
-4recv_cq_out: -if (!ib_destroy_cq (ic->i_recv_cq)) - ic->i_recv_cq =NULL ; +ib_destroy_cq (ic->i_recv_cq); + ic->i_recv_cq =NULL ; send_cq_out: -if (!ib_destroy_cq (ic->i_send_cq)) - ic->i_send_cq =NULL ; +ib_destroy_cq (ic->i_send_cq); + ic->i_send_cq =NULL ;
This was done to ensure, you still don't get ISR delivering the CQEs while we are in shutdown path. Your patch is fine though since you don't change that behavior.
Quoted 33 lines · Santosh Shilimkar
Quoted 18 lines · Leon Romanovsky
From: Leon Romanovsky <[email protected]>
There is no value in checking
ib_destroy_cq()result and skipping to clear struct ic fields. This connection needs to be reinitialized anyway.Signed-off-by Leon Romanovsky <[email protected]>--- net/rds/ib_cm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)net/rds/ib_cm.c +0
-0@@ -611,11 +611,11 @@ static int rds_ib_setup_qp(struct rds_connection *conn) qp_out:rdma_destroy_qp (ic->i_cm_id);net/rds/ib_cm.c static int rds_ib_setup_qp(struct rds_connection *conn) · line 618
Quoted 10 lines
net/rds/ib_cm.c +4
-4recv_cq_out: -if (!ib_destroy_cq (ic->i_recv_cq)) - ic->i_recv_cq =NULL ; +ib_destroy_cq (ic->i_recv_cq); + ic->i_recv_cq =NULL ; send_cq_out: -if (!ib_destroy_cq (ic->i_send_cq)) - ic->i_send_cq =NULL ; +ib_destroy_cq (ic->i_send_cq); + ic->i_send_cq =NULL ;This was done to ensure, you still don't get ISR delivering the CQEs while we are in shutdown path. Your patch is fine though since you don't change that behavior.
Quoted 1 line
Thanks