On Wed, Mar 06, 2019 at 07:21:42PM +0200, Leon Romanovsky wrote: > From: Yishai Hadas <yishaih@xxxxxxxxxxxx> > > 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: 7efce3691d33 ("IB/mlx5: Add obj create and destroy functionality") > Signed-off-by: Yishai Hadas <yishaih@xxxxxxxxxxxx> > Reviewed-by: Artemy Kovalyov <artemyko@xxxxxxxxxxxx> > Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> > --- > drivers/infiniband/hw/mlx5/devx.c | 34 +++++++++++++++----- > drivers/infiniband/hw/mlx5/qp.c | 4 ++- > drivers/net/ethernet/mellanox/mlx5/core/qp.c | 6 ++-- > include/linux/mlx5/qp.h | 3 +- > 4 files changed, 34 insertions(+), 13 deletions(-) Applied to for-rc Thanks, Jason