aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/ib_addr.h3
-rw-r--r--include/rdma/ib_cm.h7
-rw-r--r--include/rdma/iw_portmap.h25
3 files changed, 30 insertions, 5 deletions
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h
index ce55906b54a0..ac54c27a2bfd 100644
--- a/include/rdma/ib_addr.h
+++ b/include/rdma/ib_addr.h
@@ -160,7 +160,7 @@ static inline int rdma_ip2gid(struct sockaddr *addr, union ib_gid *gid)
160} 160}
161 161
162/* Important - sockaddr should be a union of sockaddr_in and sockaddr_in6 */ 162/* Important - sockaddr should be a union of sockaddr_in and sockaddr_in6 */
163static inline int rdma_gid2ip(struct sockaddr *out, union ib_gid *gid) 163static inline void rdma_gid2ip(struct sockaddr *out, union ib_gid *gid)
164{ 164{
165 if (ipv6_addr_v4mapped((struct in6_addr *)gid)) { 165 if (ipv6_addr_v4mapped((struct in6_addr *)gid)) {
166 struct sockaddr_in *out_in = (struct sockaddr_in *)out; 166 struct sockaddr_in *out_in = (struct sockaddr_in *)out;
@@ -173,7 +173,6 @@ static inline int rdma_gid2ip(struct sockaddr *out, union ib_gid *gid)
173 out_in->sin6_family = AF_INET6; 173 out_in->sin6_family = AF_INET6;
174 memcpy(&out_in->sin6_addr.s6_addr, gid->raw, 16); 174 memcpy(&out_in->sin6_addr.s6_addr, gid->raw, 16);
175 } 175 }
176 return 0;
177} 176}
178 177
179static inline void iboe_addr_get_sgid(struct rdma_dev_addr *dev_addr, 178static inline void iboe_addr_get_sgid(struct rdma_dev_addr *dev_addr,
diff --git a/include/rdma/ib_cm.h b/include/rdma/ib_cm.h
index 0e3ff30647d5..39ed2d2fbd51 100644
--- a/include/rdma/ib_cm.h
+++ b/include/rdma/ib_cm.h
@@ -105,7 +105,8 @@ enum ib_cm_data_size {
105 IB_CM_SIDR_REQ_PRIVATE_DATA_SIZE = 216, 105 IB_CM_SIDR_REQ_PRIVATE_DATA_SIZE = 216,
106 IB_CM_SIDR_REP_PRIVATE_DATA_SIZE = 136, 106 IB_CM_SIDR_REP_PRIVATE_DATA_SIZE = 136,
107 IB_CM_SIDR_REP_INFO_LENGTH = 72, 107 IB_CM_SIDR_REP_INFO_LENGTH = 72,
108 IB_CM_COMPARE_SIZE = 64 108 /* compare done u32 at a time */
109 IB_CM_COMPARE_SIZE = (64 / sizeof(u32))
109}; 110};
110 111
111struct ib_cm_id; 112struct ib_cm_id;
@@ -337,8 +338,8 @@ void ib_destroy_cm_id(struct ib_cm_id *cm_id);
337#define IB_SDP_SERVICE_ID_MASK cpu_to_be64(0xFFFFFFFFFFFF0000ULL) 338#define IB_SDP_SERVICE_ID_MASK cpu_to_be64(0xFFFFFFFFFFFF0000ULL)
338 339
339struct ib_cm_compare_data { 340struct ib_cm_compare_data {
340 u8 data[IB_CM_COMPARE_SIZE]; 341 u32 data[IB_CM_COMPARE_SIZE];
341 u8 mask[IB_CM_COMPARE_SIZE]; 342 u32 mask[IB_CM_COMPARE_SIZE];
342}; 343};
343 344
344/** 345/**
diff --git a/include/rdma/iw_portmap.h b/include/rdma/iw_portmap.h
index 928b2775e992..fda31673a562 100644
--- a/include/rdma/iw_portmap.h
+++ b/include/rdma/iw_portmap.h
@@ -148,6 +148,16 @@ int iwpm_add_mapping_cb(struct sk_buff *, struct netlink_callback *);
148int iwpm_add_and_query_mapping_cb(struct sk_buff *, struct netlink_callback *); 148int iwpm_add_and_query_mapping_cb(struct sk_buff *, struct netlink_callback *);
149 149
150/** 150/**
151 * iwpm_remote_info_cb - Process remote connecting peer address info, which
152 * the port mapper has received from the connecting peer
153 *
154 * @cb: Contains the received message (payload and netlink header)
155 *
156 * Stores the IPv4/IPv6 address info in a hash table
157 */
158int iwpm_remote_info_cb(struct sk_buff *, struct netlink_callback *);
159
160/**
151 * iwpm_mapping_error_cb - Process port mapper notification for error 161 * iwpm_mapping_error_cb - Process port mapper notification for error
152 * 162 *
153 * @skb: 163 * @skb:
@@ -175,6 +185,21 @@ int iwpm_mapping_info_cb(struct sk_buff *, struct netlink_callback *);
175int iwpm_ack_mapping_info_cb(struct sk_buff *, struct netlink_callback *); 185int iwpm_ack_mapping_info_cb(struct sk_buff *, struct netlink_callback *);
176 186
177/** 187/**
188 * iwpm_get_remote_info - Get the remote connecting peer address info
189 *
190 * @mapped_loc_addr: Mapped local address of the listening peer
191 * @mapped_rem_addr: Mapped remote address of the connecting peer
192 * @remote_addr: To store the remote address of the connecting peer
193 * @nl_client: The index of the netlink client
194 *
195 * The remote address info is retrieved and provided to the client in
196 * the remote_addr. After that it is removed from the hash table
197 */
198int iwpm_get_remote_info(struct sockaddr_storage *mapped_loc_addr,
199 struct sockaddr_storage *mapped_rem_addr,
200 struct sockaddr_storage *remote_addr, u8 nl_client);
201
202/**
178 * iwpm_create_mapinfo - Store local and mapped IPv4/IPv6 address 203 * iwpm_create_mapinfo - Store local and mapped IPv4/IPv6 address
179 * info in a hash table 204 * info in a hash table
180 * @local_addr: Local ip/tcp address 205 * @local_addr: Local ip/tcp address