]> git.baikalelectronics.ru Git - kernel.git/commit
IB/rdmavt: Fix frwr memory registration
authorJosh Collier <josh.d.collier@intel.com>
Mon, 15 Apr 2019 18:34:22 +0000 (11:34 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 16 Apr 2019 10:11:29 +0000 (07:11 -0300)
commite329520dd582e4a1bd4684172d6dd06bc6192380
treec3640ee817ae5948360db09af144e9e3b07702ec
parent72339f3f27fcd78a0b0a8944c1ad9882bfa8fb5a
IB/rdmavt: Fix frwr memory registration

Current implementation was not properly handling frwr memory
registrations. This was uncovered by commit 27f26cec761das ("xprtrdma:
Plant XID in on-the-wire RDMA offset (FRWR)") in which xprtrdma, which is
used for NFS over RDMA, started failing as it was the first ULP to modify
the ib_mr iova resulting in the NFS server getting REMOTE ACCESS ERROR
when attempting to perform RDMA Writes to the client.

The fix is to properly capture the true iova, offset, and length in the
call to ib_map_mr_sg, and then update the iova when processing the
IB_WR_REG_MEM on the send queue.

Fixes: 59b744156a5e ("IB/rdmavt: Add support for ib_map_mr_sg")
Cc: stable@vger.kernel.org
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Josh Collier <josh.d.collier@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/sw/rdmavt/mr.c