[ofa-general] Re: qperf: destroy QPs before destroying any other objects

johann at georgex.org johann at georgex.org
Tue May 12 18:55:03 PDT 2009


Ralph,

I've applied the patch and have committed it to the OFED git
repository.  Let me know if there is anything else I need to
do.

Johann

On Tue, May 12, 2009 at 03:10:21PM -0700, Ralph Campbell wrote:
> The QP contains references to the protection domain (PD), memory
> regions (MR), address handles, completion queues (CQ), address
> handles (AH), etc.
> The QP should be destroyed before any other objects are destroyed
> so that the referenced object is not busy.
> 
> Signed-off-by: Ralph Campbell <ralph.campbell at qlogic.com>
> 
> diff --git a/src/rdma.c b/src/rdma.c
> index 845c35f..492d240 100644
> --- a/src/rdma.c
> +++ b/src/rdma.c
> @@ -1577,6 +1577,10 @@ show_node_info(DEVICE *dev)
>  static void
>  rd_close(DEVICE *dev)
>  {
> +    if (Req.use_cm)
> +        cm_close(dev);
> +    else
> +        ib_close(dev);
>      if (dev->ah)
>          ibv_destroy_ah(dev->ah);
>      if (dev->cq)
> @@ -1585,10 +1589,6 @@ rd_close(DEVICE *dev)
>          ibv_dealloc_pd(dev->pd);
>      if (dev->channel)
>          ibv_destroy_comp_channel(dev->channel);
> -    if (Req.use_cm)
> -        cm_close(dev);
> -    else
> -        ib_close(dev);
>      rd_mrfree(dev);
>  
>      memset(dev, 0, sizeof(*dev));
> 



More information about the general mailing list