RDMA/rxe: Fill in wc byte_len with IB_WC_RECV_RDMA_WITH_IMM
authorKonstantin Taranov <konstantin.taranov@inf.ethz.ch>
Thu, 27 Jun 2019 14:06:43 +0000 (16:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jul 2019 05:28:54 +0000 (07:28 +0200)
commit3e06df155a6aa87f4386edebcf748dd8e9379d89
treec48e7e89bfcbf5c9838a1f50ce52760f40f7c351
parent57e936e34015e6d6652da71338fbf2d4c62bb2f9
RDMA/rxe: Fill in wc byte_len with IB_WC_RECV_RDMA_WITH_IMM

[ Upstream commit bdce1290493caa3f8119f24b5dacc3fb7ca27389 ]

Calculate the correct byte_len on the receiving side when a work
completion is generated with IB_WC_RECV_RDMA_WITH_IMM opcode.

According to the IBA byte_len must indicate the number of written bytes,
whereas it was always equal to zero for the IB_WC_RECV_RDMA_WITH_IMM
opcode, even though data was transferred.

Fixes: 8700e3e7c485 ("Soft RoCE driver")
Signed-off-by: Konstantin Taranov <konstantin.taranov@inf.ethz.ch>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/sw/rxe/rxe_resp.c
drivers/infiniband/sw/rxe/rxe_verbs.h