aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/ib_addr.h10
-rw-r--r--include/rdma/ib_fmr_pool.h2
-rw-r--r--include/rdma/ib_mad.h7
3 files changed, 14 insertions, 5 deletions
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h
index fcb5ba87dcc5..0ff67398928d 100644
--- a/include/rdma/ib_addr.h
+++ b/include/rdma/ib_addr.h
@@ -89,9 +89,10 @@ static inline void ib_addr_set_pkey(struct rdma_dev_addr *dev_addr, u16 pkey)
89 dev_addr->broadcast[9] = (unsigned char) pkey; 89 dev_addr->broadcast[9] = (unsigned char) pkey;
90} 90}
91 91
92static inline union ib_gid *ib_addr_get_sgid(struct rdma_dev_addr *dev_addr) 92static inline void ib_addr_get_sgid(struct rdma_dev_addr *dev_addr,
93 union ib_gid *gid)
93{ 94{
94 return (union ib_gid *) (dev_addr->src_dev_addr + 4); 95 memcpy(gid, dev_addr->src_dev_addr + 4, sizeof *gid);
95} 96}
96 97
97static inline void ib_addr_set_sgid(struct rdma_dev_addr *dev_addr, 98static inline void ib_addr_set_sgid(struct rdma_dev_addr *dev_addr,
@@ -100,9 +101,10 @@ static inline void ib_addr_set_sgid(struct rdma_dev_addr *dev_addr,
100 memcpy(dev_addr->src_dev_addr + 4, gid, sizeof *gid); 101 memcpy(dev_addr->src_dev_addr + 4, gid, sizeof *gid);
101} 102}
102 103
103static inline union ib_gid *ib_addr_get_dgid(struct rdma_dev_addr *dev_addr) 104static inline void ib_addr_get_dgid(struct rdma_dev_addr *dev_addr,
105 union ib_gid *gid)
104{ 106{
105 return (union ib_gid *) (dev_addr->dst_dev_addr + 4); 107 memcpy(gid, dev_addr->dst_dev_addr + 4, sizeof *gid);
106} 108}
107 109
108static inline void ib_addr_set_dgid(struct rdma_dev_addr *dev_addr, 110static inline void ib_addr_set_dgid(struct rdma_dev_addr *dev_addr,
diff --git a/include/rdma/ib_fmr_pool.h b/include/rdma/ib_fmr_pool.h
index 4ace54cd0cce..00dadbf94e1d 100644
--- a/include/rdma/ib_fmr_pool.h
+++ b/include/rdma/ib_fmr_pool.h
@@ -88,7 +88,7 @@ int ib_flush_fmr_pool(struct ib_fmr_pool *pool);
88struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle, 88struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle,
89 u64 *page_list, 89 u64 *page_list,
90 int list_len, 90 int list_len,
91 u64 *io_virtual_address); 91 u64 io_virtual_address);
92 92
93int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr); 93int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr);
94 94
diff --git a/include/rdma/ib_mad.h b/include/rdma/ib_mad.h
index 5ff77558013b..585d28e960dd 100644
--- a/include/rdma/ib_mad.h
+++ b/include/rdma/ib_mad.h
@@ -75,6 +75,7 @@
75#define IB_MGMT_METHOD_TRAP_REPRESS 0x07 75#define IB_MGMT_METHOD_TRAP_REPRESS 0x07
76 76
77#define IB_MGMT_METHOD_RESP 0x80 77#define IB_MGMT_METHOD_RESP 0x80
78#define IB_BM_ATTR_MOD_RESP cpu_to_be32(1)
78 79
79#define IB_MGMT_MAX_METHODS 128 80#define IB_MGMT_MAX_METHODS 128
80 81
@@ -247,6 +248,12 @@ struct ib_mad_send_buf {
247}; 248};
248 249
249/** 250/**
251 * ib_response_mad - Returns if the specified MAD has been generated in
252 * response to a sent request or trap.
253 */
254int ib_response_mad(struct ib_mad *mad);
255
256/**
250 * ib_get_rmpp_resptime - Returns the RMPP response time. 257 * ib_get_rmpp_resptime - Returns the RMPP response time.
251 * @rmpp_hdr: An RMPP header. 258 * @rmpp_hdr: An RMPP header.
252 */ 259 */