All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-next 01/15] rds: Don't check return value from destroy CQ
       [not found] <20190520065433.8734-1-leon@kernel.org>
@ 2019-05-20  6:54   ` Leon Romanovsky
  0 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2019-05-20  6:54 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe, Santosh Shilimkar
  Cc: Leon Romanovsky, RDMA mailing list, Glenn Streiff, Steve Wise,
	David S. Miller, netdev

From: Leon Romanovsky <leonro@mellanox.com>

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 <leonro@mellanox.com>
---
 net/rds/ib_cm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index 66c6eb56072b..5a42ebb892cd 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -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:

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH rdma-next 01/15] rds: Don't check return value from destroy CQ
@ 2019-05-20  6:54   ` Leon Romanovsky
  0 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2019-05-20  6:54 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe, Santosh Shilimkar
  Cc: Leon Romanovsky, RDMA mailing list, Glenn Streiff, Steve Wise,
	David S. Miller, netdev

From: Leon Romanovsky <leonro@mellanox.com>

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 <leonro@mellanox.com>
---
 net/rds/ib_cm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index 66c6eb56072b..5a42ebb892cd 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -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:
--
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH rdma-next 01/15] rds: Don't check return value from destroy CQ
  2019-05-20  6:54   ` Leon Romanovsky
  (?)
@ 2019-05-20 17:17   ` Santosh Shilimkar
  2019-05-20 18:31     ` Leon Romanovsky
  -1 siblings, 1 reply; 4+ messages in thread
From: Santosh Shilimkar @ 2019-05-20 17:17 UTC (permalink / raw)
  To: Leon Romanovsky, Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, RDMA mailing list, Glenn Streiff, Steve Wise,
	David S. Miller, netdev

On 5/19/2019 11:54 PM, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@mellanox.com>
> 
> 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 <leonro@mellanox.com>
> ---
>   net/rds/ib_cm.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
> index 66c6eb56072b..5a42ebb892cd 100644
> --- a/net/rds/ib_cm.c
> +++ b/net/rds/ib_cm.c
> @@ -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;
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.

Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH rdma-next 01/15] rds: Don't check return value from destroy CQ
  2019-05-20 17:17   ` Santosh Shilimkar
@ 2019-05-20 18:31     ` Leon Romanovsky
  0 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2019-05-20 18:31 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: Doug Ledford, Jason Gunthorpe, RDMA mailing list, Glenn Streiff,
	Steve Wise, David S. Miller, netdev

On Mon, May 20, 2019 at 10:17:43AM -0700, Santosh Shilimkar wrote:
> On 5/19/2019 11:54 PM, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@mellanox.com>
> >
> > 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 <leonro@mellanox.com>
> > ---
> >   net/rds/ib_cm.c | 8 ++++----
> >   1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
> > index 66c6eb56072b..5a42ebb892cd 100644
> > --- a/net/rds/ib_cm.c
> > +++ b/net/rds/ib_cm.c
> > @@ -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;
> 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.
>
> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

Thanks

>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-20 18:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190520065433.8734-1-leon@kernel.org>
2019-05-20  6:54 ` [PATCH rdma-next 01/15] rds: Don't check return value from destroy CQ Leon Romanovsky
2019-05-20  6:54   ` Leon Romanovsky
2019-05-20 17:17   ` Santosh Shilimkar
2019-05-20 18:31     ` Leon Romanovsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.