diff options
author | Tom Tucker <tom@opengridcomputing.com> | 2006-08-03 17:02:42 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-09-22 18:22:47 -0400 |
commit | 07ebafbaaa72aa6a35472879008f5a1d1d469a0c (patch) | |
tree | c42ed5c70e5bea1382f1cbde3f4a70d172e2f650 /include/rdma/ib_addr.h | |
parent | 922a8e9fb2e0711212badce47a41137e2ca04cb3 (diff) |
RDMA: iWARP Core Changes.
Modifications to the existing rdma header files, core files, drivers,
and ulp files to support iWARP, including:
- Hook iWARP CM into the build system and use it in rdma_cm.
- Convert enum ib_node_type to enum rdma_node_type, which includes
the possibility of RDMA_NODE_RNIC, and update everything for this.
Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'include/rdma/ib_addr.h')
-rw-r--r-- | include/rdma/ib_addr.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h index 0ff67398928d..81b62307621d 100644 --- a/include/rdma/ib_addr.h +++ b/include/rdma/ib_addr.h | |||
@@ -40,7 +40,7 @@ struct rdma_dev_addr { | |||
40 | unsigned char src_dev_addr[MAX_ADDR_LEN]; | 40 | unsigned char src_dev_addr[MAX_ADDR_LEN]; |
41 | unsigned char dst_dev_addr[MAX_ADDR_LEN]; | 41 | unsigned char dst_dev_addr[MAX_ADDR_LEN]; |
42 | unsigned char broadcast[MAX_ADDR_LEN]; | 42 | unsigned char broadcast[MAX_ADDR_LEN]; |
43 | enum ib_node_type dev_type; | 43 | enum rdma_node_type dev_type; |
44 | }; | 44 | }; |
45 | 45 | ||
46 | /** | 46 | /** |
@@ -72,6 +72,9 @@ int rdma_resolve_ip(struct sockaddr *src_addr, struct sockaddr *dst_addr, | |||
72 | 72 | ||
73 | void rdma_addr_cancel(struct rdma_dev_addr *addr); | 73 | void rdma_addr_cancel(struct rdma_dev_addr *addr); |
74 | 74 | ||
75 | int rdma_copy_addr(struct rdma_dev_addr *dev_addr, struct net_device *dev, | ||
76 | const unsigned char *dst_dev_addr); | ||
77 | |||
75 | static inline int ip_addr_size(struct sockaddr *addr) | 78 | static inline int ip_addr_size(struct sockaddr *addr) |
76 | { | 79 | { |
77 | return addr->sa_family == AF_INET6 ? | 80 | return addr->sa_family == AF_INET6 ? |
@@ -113,4 +116,16 @@ static inline void ib_addr_set_dgid(struct rdma_dev_addr *dev_addr, | |||
113 | memcpy(dev_addr->dst_dev_addr + 4, gid, sizeof *gid); | 116 | memcpy(dev_addr->dst_dev_addr + 4, gid, sizeof *gid); |
114 | } | 117 | } |
115 | 118 | ||
119 | static inline void iw_addr_get_sgid(struct rdma_dev_addr *dev_addr, | ||
120 | union ib_gid *gid) | ||
121 | { | ||
122 | memcpy(gid, dev_addr->src_dev_addr, sizeof *gid); | ||
123 | } | ||
124 | |||
125 | static inline void iw_addr_get_dgid(struct rdma_dev_addr *dev_addr, | ||
126 | union ib_gid *gid) | ||
127 | { | ||
128 | memcpy(gid, dev_addr->dst_dev_addr, sizeof *gid); | ||
129 | } | ||
130 | |||
116 | #endif /* IB_ADDR_H */ | 131 | #endif /* IB_ADDR_H */ |