aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2008-08-04 14:02:14 -0400
committerRoland Dreier <rolandd@cisco.com>2008-08-04 14:02:14 -0400
commit3f44675439b136d51179d31eb5a498383cb38624 (patch)
treea3c9f6b6c0a2fd5cd948c8482242dc859e1ddfdf /include
parent6e86841d05f371b5b9b86ce76c02aaee83352298 (diff)
RDMA/cma: Remove padding arrays by using struct sockaddr_storage
There are a few places where the RDMA CM code handles IPv6 by doing struct sockaddr addr; u8 pad[sizeof(struct sockaddr_in6) - sizeof(struct sockaddr)]; This is fragile and ugly; handle this in a better way with just struct sockaddr_storage addr; [ Also roll in patch from Aleksey Senin <alekseys@voltaire.com> to switch to struct sockaddr_storage and get rid of padding arrays in struct rdma_addr. ] Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'include')
-rw-r--r--include/rdma/rdma_cm.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h
index df7faf09d66f..c6b2962315b3 100644
--- a/include/rdma/rdma_cm.h
+++ b/include/rdma/rdma_cm.h
@@ -71,12 +71,8 @@ enum rdma_port_space {
71}; 71};
72 72
73struct rdma_addr { 73struct rdma_addr {
74 struct sockaddr src_addr; 74 struct sockaddr_storage src_addr;
75 u8 src_pad[sizeof(struct sockaddr_in6) - 75 struct sockaddr_storage dst_addr;
76 sizeof(struct sockaddr)];
77 struct sockaddr dst_addr;
78 u8 dst_pad[sizeof(struct sockaddr_in6) -
79 sizeof(struct sockaddr)];
80 struct rdma_dev_addr dev_addr; 76 struct rdma_dev_addr dev_addr;
81}; 77};
82 78