aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma/ib_addr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/rdma/ib_addr.h')
-rw-r--r--include/rdma/ib_addr.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h
index c094e5012862..c36750ff6ae8 100644
--- a/include/rdma/ib_addr.h
+++ b/include/rdma/ib_addr.h
@@ -110,6 +110,12 @@ static inline void ib_addr_set_pkey(struct rdma_dev_addr *dev_addr, u16 pkey)
110 dev_addr->broadcast[9] = (unsigned char) pkey; 110 dev_addr->broadcast[9] = (unsigned char) pkey;
111} 111}
112 112
113static inline void ib_addr_get_mgid(struct rdma_dev_addr *dev_addr,
114 union ib_gid *gid)
115{
116 memcpy(gid, dev_addr->broadcast + 4, sizeof *gid);
117}
118
113static inline void ib_addr_get_sgid(struct rdma_dev_addr *dev_addr, 119static inline void ib_addr_get_sgid(struct rdma_dev_addr *dev_addr,
114 union ib_gid *gid) 120 union ib_gid *gid)
115{ 121{