]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: Use mlx5 core to create/destroy a DEVX DCT
authorYishai Hadas <yishaih@mellanox.com>
Wed, 6 Mar 2019 17:21:42 +0000 (19:21 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 18 Mar 2019 00:40:39 +0000 (21:40 -0300)
commitb600c24f9276b5bc772ee6c37e8c1212ecc9e8b7
tree98e5bda9b9d51c7f92d7984e5fa28cd9c3106de8
parent31343f2aa7daeff2593fd9f2ca2c791ffcdc3fc7
IB/mlx5: Use mlx5 core to create/destroy a DEVX DCT

To prevent a hardware memory leak when a DEVX DCT object is destroyed
without calling DRAIN DCT before, (e.g. under cleanup flow), need to
manage its creation and destruction via mlx5 core.

In that case the DRAIN DCT command will be called and only once that it
will be completed the DESTROY DCT command will be called.  Otherwise, the
DESTROY DCT may fail and a hardware leak may occur.

As of that change the DRAIN DCT command should not be exposed any more
from DEVX, it's managed internally by the driver to work as expected by
the device specification.

Fixes: 7d7243a82c28 ("IB/mlx5: Add obj create and destroy functionality")
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Reviewed-by: Artemy Kovalyov <artemyko@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/devx.c
drivers/infiniband/hw/mlx5/qp.c
drivers/net/ethernet/mellanox/mlx5/core/qp.c
include/linux/mlx5/qp.h