RDMA/irdma: Fix RQ completion opcode
authorMustafa Ismail <mustafa.ismail@intel.com>
Tue, 15 Nov 2022 01:17:00 +0000 (19:17 -0600)
committerLeon Romanovsky <leon@kernel.org>
Thu, 17 Nov 2022 08:41:28 +0000 (10:41 +0200)
commit24419777e9431137d5923a747f546facb1e49b1f
treeb482e5096a16259e7b94b84c883b03ab8c376d46
parent4f44e519b6a945068755708119cca5b74d01d1f6
RDMA/irdma: Fix RQ completion opcode

The opcode written by HW, in the RQ CQE, is the
RoCEv2/iWARP protocol opcode from the received
packet and not the SW opcode as currently assumed.
Fix this by returning the raw operation type and
queue type in the CQE to irdma_process_cqe and add
2 helpers set_ib_wc_op_sq set_ib_wc_op_rq to map
IRDMA HW op types to IB op types.

Note that for iWARP, only Write with Immediate is
supported so the opcode can only be IB_WC_RECV_RDMA_WITH_IMM
when there is immediate data present.

Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Link: https://lore.kernel.org/r/20221115011701.1379-3-shiraz.saleem@intel.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/irdma/uk.c
drivers/infiniband/hw/irdma/user.h
drivers/infiniband/hw/irdma/utils.c
drivers/infiniband/hw/irdma/verbs.c
drivers/infiniband/hw/irdma/verbs.h