]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/irdma: Fix RQ completion opcode
authorMustafa Ismail <mustafa.ismail@intel.com>
Tue, 15 Nov 2022 01:17:00 +0000 (19:17 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:32 +0000 (13:32 +0100)
commit61a2a7c81e89688f6afce065e06c57fa3c47e065
treef1fe0cc2d6a61acf6376a25b1b1d8e07b8a5e452
parente0fd926a4f5950378baeea157624bf7af3b11df3
RDMA/irdma: Fix RQ completion opcode

[ Upstream commit fca07f1eeb51fe827659a1d567d3d933129e8666 ]

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: 434ed3ceee5a ("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>
Signed-off-by: Sasha Levin <sashal@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