rdma: Set REMOTE_WRITE permission for iWARP on target side

iWARP requires REMOTE_WRITE permission ofr RDMA_READ
operation.

Fixes #2253

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Iddfda091903e000d1c4839c1fce67bf25d4a13c2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10392
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Alexey Marchuk 2021-11-24 15:04:56 +03:00 committed by Tomasz Zawadzki
parent 83996cc3b9
commit 01887ccc30

View File

@ -73,6 +73,10 @@ rdma_mem_notify(void *cb_ctx, struct spdk_mem_map *map,
switch (rmap->role) {
case SPDK_RDMA_MEMORY_MAP_ROLE_TARGET:
access_flags = IBV_ACCESS_LOCAL_WRITE;
if (pd->context->device->transport_type == IBV_TRANSPORT_IWARP) {
/* IWARP requires REMOTE_WRITE permission for RDMA_READ operation */
access_flags |= IBV_ACCESS_REMOTE_WRITE;
}
break;
case SPDK_RDMA_MEMORY_MAP_ROLE_INITIATOR:
access_flags = IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_READ | IBV_ACCESS_REMOTE_WRITE;