diff options
author | Hiatt, Don <don.hiatt@intel.com> | 2017-06-08 20:38:02 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-08-08 21:50:25 +0300 |
commit | e92aa00a518971fca6b79aa87a1a9c5e5aa51f3b (patch) | |
tree | 5c5af9e2c932e7008f3cfc0ad776544ea16b9e38 /include/rdma/opa_addr.h | |
parent | 7db20ecd1d9700e2c240dee505162eb56ab55b5b (diff) | |
download | linux-e92aa00a518971fca6b79aa87a1a9c5e5aa51f3b.tar.xz |
IB/CM: Add OPA Path record support to CM
Add OPA path record support to the Connection Manager.
Signed-off-by: Don Hiatt <don.hiatt@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma/opa_addr.h')
-rw-r--r-- | include/rdma/opa_addr.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/rdma/opa_addr.h b/include/rdma/opa_addr.h index 46d0567fffea..9b5e642cf550 100644 --- a/include/rdma/opa_addr.h +++ b/include/rdma/opa_addr.h @@ -77,4 +77,22 @@ static inline u32 opa_get_lid_from_gid(union ib_gid *gid) { return be64_to_cpu(gid->global.interface_id) & 0xFFFFFFFF; } + +/** + * opa_is_extended_lid: Returns true if dlid or slid are + * extended. + * + * @dlid: The DLID + * @slid: The SLID + */ +static inline bool opa_is_extended_lid(u32 dlid, u32 slid) +{ + if ((be32_to_cpu(dlid) >= + be16_to_cpu(IB_MULTICAST_LID_BASE)) || + (be32_to_cpu(slid) >= + be16_to_cpu(IB_MULTICAST_LID_BASE))) + return true; + else + return false; +} #endif /* OPA_ADDR_H */ |