aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/efa/efa_verbs.c
diff options
context:
space:
mode:
authorDaniel Kranzdorf <dkkranzd@amazon.com>2019-11-21 16:15:08 +0200
committerJason Gunthorpe <jgg@mellanox.com>2019-11-25 10:31:47 -0400
commite6c4f3ff434c8b336662a2053d48ce677c9fd608 (patch)
tree5ff80589a64940714072b35e04d8c5596f92e2d7 /drivers/infiniband/hw/efa/efa_verbs.c
parentRDMA/efa: Store network attributes in device attributes (diff)
downloadlinux-dev-e6c4f3ff434c8b336662a2053d48ce677c9fd608.tar.xz
linux-dev-e6c4f3ff434c8b336662a2053d48ce677c9fd608.zip
RDMA/efa: Support remote read access in MR registration
Enable remote read access for memory regions in order to support RDMA operations. Link: https://lore.kernel.org/r/20191121141509.59297-3-galpress@amazon.com Signed-off-by: Daniel Kranzdorf <dkkranzd@amazon.com> Reviewed-by: Yossi Leybovich <sleybo@amazon.com> Signed-off-by: Gal Pressman <galpress@amazon.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/efa/efa_verbs.c')
-rw-r--r--drivers/infiniband/hw/efa/efa_verbs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c
index e1f1c1495da1..9701f8e52c71 100644
--- a/drivers/infiniband/hw/efa/efa_verbs.c
+++ b/drivers/infiniband/hw/efa/efa_verbs.c
@@ -70,7 +70,8 @@ static const char *const efa_stats_names[] = {
#define EFA_CHUNK_USED_SIZE \
((EFA_PTRS_PER_CHUNK * EFA_CHUNK_PAYLOAD_PTR_SIZE) + EFA_CHUNK_PTR_SIZE)
-#define EFA_SUPPORTED_ACCESS_FLAGS IB_ACCESS_LOCAL_WRITE
+#define EFA_SUPPORTED_ACCESS_FLAGS \
+ (IB_ACCESS_LOCAL_WRITE | IB_ACCESS_REMOTE_READ)
struct pbl_chunk {
dma_addr_t dma_addr;
@@ -1382,7 +1383,7 @@ struct ib_mr *efa_reg_mr(struct ib_pd *ibpd, u64 start, u64 length,
params.pd = to_epd(ibpd)->pdn;
params.iova = virt_addr;
params.mr_length_in_bytes = length;
- params.permissions = access_flags & 0x1;
+ params.permissions = access_flags;
pg_sz = ib_umem_find_best_pgsz(mr->umem,
dev->dev_attr.page_size_cap,