diff options
author | Michael Wang <yun.wang@profitbricks.com> | 2015-05-05 14:50:39 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-05-18 13:35:05 -0400 |
commit | 30a74ef41d5293cb2f85fcce120fe869a672ade4 (patch) | |
tree | 55e4dd7c9e2b8de8f9303ad563749338975e99f5 /include/rdma/ib_verbs.h | |
parent | bc0f1d71536063f8b2df966625e0136bca03b3e6 (diff) | |
download | blackbird-op-linux-30a74ef41d5293cb2f85fcce120fe869a672ade4.tar.gz blackbird-op-linux-30a74ef41d5293cb2f85fcce120fe869a672ade4.zip |
IB/Verbs: Use management helper rdma_cap_af_ib()
Introduce helper rdma_cap_af_ib() to help us check if the port of an
IB device support Native Infiniband Address.
Signed-off-by: Michael Wang <yun.wang@profitbricks.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Tested-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Sean Hefty <sean.hefty@intel.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Tested-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma/ib_verbs.h')
-rw-r--r-- | include/rdma/ib_verbs.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 2cf23b130f9f..349d1216564c 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -1865,6 +1865,21 @@ static inline bool rdma_cap_ib_mcast(struct ib_device *device, u8 port_num) } /** + * rdma_cap_af_ib - Check if the port of device has the capability + * Native Infiniband Address. + * + * @device: Device to be checked + * @port_num: Port number of the device + * + * Return false when port of the device don't support + * Native Infiniband Address. + */ +static inline bool rdma_cap_af_ib(struct ib_device *device, u8 port_num) +{ + return rdma_ib_or_iboe(device, port_num); +} + +/** * rdma_cap_read_multi_sge - Check if the port of device has the capability * RDMA Read Multiple Scatter-Gather Entries. * |