RDMA/irdma: Add SW mechanism to generate completions on error
authorMustafa Ismail <mustafa.ismail@intel.com>
Mon, 25 Apr 2022 18:16:24 +0000 (13:16 -0500)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 11 May 2022 18:58:40 +0000 (15:58 -0300)
commit81091d7696ae71627ff80bbf2c6b0986d2c1cce3
treee949b113ef7aa37039994a3242c57576709a8712
parenta2d36b02c15d49cec1f5a44c5123bb7f3bdfea8e
RDMA/irdma: Add SW mechanism to generate completions on error

HW flushes after QP in error state is not reliable. This can lead to
   application hang waiting on a completion for outstanding WRs.  Implement a
SW mechanism to generate completions for any outstanding WR's after the QP
is modified to error.

This is accomplished by starting a delayed worker after the QP is modified
to error and the HW flush is performed. The worker will generate
completions that will be returned to the application when it polls the
CQ. This mechanism only applies to Kernel applications.

Link: https://lore.kernel.org/r/20220425181624.1617-1-shiraz.saleem@intel.com
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/irdma/hw.c
drivers/infiniband/hw/irdma/utils.c
drivers/infiniband/hw/irdma/verbs.c
drivers/infiniband/hw/irdma/verbs.h