From 002516edf5176dde2bee54addb7e6e8129a9532b Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 3 May 2016 18:01:05 +0200 Subject: [PATCH] IB/core: add a helper to check for READ WITH INVALIDATE support Signed-off-by: Christoph Hellwig Tested-by: Steve Wise Reviewed-by: Steve Wise Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford --- include/rdma/ib_verbs.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 24d0d82a07b4..9e8616af6899 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -2318,6 +2318,18 @@ static inline bool rdma_cap_roce_gid_table(const struct ib_device *device, device->add_gid && device->del_gid; } +/* + * Check if the device supports READ W/ INVALIDATE. + */ +static inline bool rdma_cap_read_inv(struct ib_device *dev, u32 port_num) +{ + /* + * iWarp drivers must support READ W/ INVALIDATE. No other protocol + * has support for it yet. + */ + return rdma_protocol_iwarp(dev, port_num); +} + int ib_query_gid(struct ib_device *device, u8 port_num, int index, union ib_gid *gid, struct ib_gid_attr *attr); -- 2.20.1