lkml.org 
[lkml]   [2021]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH rdma-next 03/10] RDMA/rxe: Allow registering FLUSH flags for supported device only
Date
Device should enable IB_DEVICE_RDMA_FLUSH capability if it want to
support RDMA FLUSH.

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
---
include/rdma/ib_verbs.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index f04d66539879..51d58b641201 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -291,6 +291,7 @@ enum ib_device_cap_flags {
/* The device supports padding incoming writes to cacheline. */
IB_DEVICE_PCI_WRITE_END_PADDING = (1ULL << 36),
IB_DEVICE_ALLOW_USER_UNREG = (1ULL << 37),
+ IB_DEVICE_RDMA_FLUSH = (1ULL << 38),
};

enum ib_atomic_cap {
@@ -4319,6 +4320,10 @@ static inline int ib_check_mr_access(struct ib_device *ib_dev,
if (flags & IB_ACCESS_ON_DEMAND &&
!(ib_dev->attrs.device_cap_flags & IB_DEVICE_ON_DEMAND_PAGING))
return -EINVAL;
+
+ if (flags & IB_ACCESS_FLUSH &&
+ !(ib_dev->attrs.device_cap_flags & IB_DEVICE_RDMA_FLUSH))
+ return -EINVAL;
return 0;
}

--
2.31.1


\
 
 \ /
  Last update: 2021-12-28 09:03    [W:0.260 / U:2.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site