summaryrefslogtreecommitdiffstats
path: root/include/rdma/opa_addr.h
diff options
context:
space:
mode:
authorDon Hiatt <don.hiatt@intel.com>2017-08-04 22:54:16 +0200
committerDoug Ledford <dledford@redhat.com>2017-08-22 20:22:37 +0200
commitd98bb7f7e6fa29d45008370084d5cabac7ac69ed (patch)
tree038e3cfcf118c4d7a6053b003ff130985a6a1fab /include/rdma/opa_addr.h
parentIB/hfi1: Add support to process 16B header errors (diff)
downloadlinux-d98bb7f7e6fa29d45008370084d5cabac7ac69ed.tar.xz
linux-d98bb7f7e6fa29d45008370084d5cabac7ac69ed.zip
IB/hfi1: Determine 9B/16B L2 header type based on Address handle
When address handle attributes are initialized, the LIDs are transformed to be in the 32 bit LID space. When constructing the header, hfi1 driver will look at the LID to determine the packet header to be created. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com> Signed-off-by: Don Hiatt <don.hiatt@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/rdma/opa_addr.h b/include/rdma/opa_addr.h
index 8d3ad4ecbea1..9ae126fb8648 100644
--- a/include/rdma/opa_addr.h
+++ b/include/rdma/opa_addr.h
@@ -71,7 +71,7 @@
*
* @gid: The Global identifier
*/
-static inline bool ib_is_opa_gid(union ib_gid *gid)
+static inline bool ib_is_opa_gid(const union ib_gid *gid)
{
return ((be64_to_cpu(gid->global.interface_id) >> 40) ==
OPA_SPECIAL_OUI);
@@ -84,7 +84,7 @@ static inline bool ib_is_opa_gid(union ib_gid *gid)
*
* @gid: The Global identifier
*/
-static inline u32 opa_get_lid_from_gid(union ib_gid *gid)
+static inline u32 opa_get_lid_from_gid(const union ib_gid *gid)
{
return be64_to_cpu(gid->global.interface_id) & 0xFFFFFFFF;
}