summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2016-05-03 16:01:05 (GMT)
committerDoug Ledford <dledford@redhat.com>2016-05-13 17:37:18 (GMT)
commit002516edf5176dde2bee54addb7e6e8129a9532b (patch)
treeae9a9073c9d468585e931d983d402d36aea3b26a
parentff2ba9936591a1364ae21adf18366dca7608395a (diff)
downloadlinux-002516edf5176dde2bee54addb7e6e8129a9532b.tar.xz
IB/core: add a helper to check for READ WITH INVALIDATE support
Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r--include/rdma/ib_verbs.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 24d0d82..9e8616a 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);