aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 06:54:01 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 06:54:01 -0500
commit0ba6c33bcddc64a54b5f1c25a696c4767dc76292 (patch)
tree62e616f97a4762d8e75bf732e4827af2d15d52c5 /drivers/infiniband
parent21af0297c7e56024a5ccc4d8ad2a590f9ec371ba (diff)
parent85040bcb4643cba578839e953f25e2d1965d83d0 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.25
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.25: (1470 commits) [IPV6] ADDRLABEL: Fix double free on label deletion. [PPP]: Sparse warning fixes. [IPV4] fib_trie: remove unneeded NULL check [IPV4] fib_trie: More whitespace cleanup. [NET_SCHED]: Use nla_policy for attribute validation in ematches [NET_SCHED]: Use nla_policy for attribute validation in actions [NET_SCHED]: Use nla_policy for attribute validation in classifiers [NET_SCHED]: Use nla_policy for attribute validation in packet schedulers [NET_SCHED]: sch_api: introduce constant for rate table size [NET_SCHED]: Use typeful attribute parsing helpers [NET_SCHED]: Use typeful attribute construction helpers [NET_SCHED]: Use NLA_PUT_STRING for string dumping [NET_SCHED]: Use nla_nest_start/nla_nest_end [NET_SCHED]: Propagate nla_parse return value [NET_SCHED]: act_api: use PTR_ERR in tcf_action_init/tcf_action_get [NET_SCHED]: act_api: use nlmsg_parse [NET_SCHED]: act_api: fix netlink API conversion bug [NET_SCHED]: sch_netem: use nla_parse_nested_compat [NET_SCHED]: sch_atm: fix format string warning [NETNS]: Add namespace for ICMP replying code. ...
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/addr.c12
-rw-r--r--drivers/infiniband/core/cma.c7
-rw-r--r--drivers/infiniband/hw/cxgb3/iwch_cm.c2
3 files changed, 11 insertions, 10 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
index 5381c80de10a..a58ad8a470f9 100644
--- a/drivers/infiniband/core/addr.c
+++ b/drivers/infiniband/core/addr.c
@@ -110,7 +110,7 @@ int rdma_translate_ip(struct sockaddr *addr, struct rdma_dev_addr *dev_addr)
110 __be32 ip = ((struct sockaddr_in *) addr)->sin_addr.s_addr; 110 __be32 ip = ((struct sockaddr_in *) addr)->sin_addr.s_addr;
111 int ret; 111 int ret;
112 112
113 dev = ip_dev_find(ip); 113 dev = ip_dev_find(&init_net, ip);
114 if (!dev) 114 if (!dev)
115 return -EADDRNOTAVAIL; 115 return -EADDRNOTAVAIL;
116 116
@@ -158,7 +158,7 @@ static void addr_send_arp(struct sockaddr_in *dst_in)
158 158
159 memset(&fl, 0, sizeof fl); 159 memset(&fl, 0, sizeof fl);
160 fl.nl_u.ip4_u.daddr = dst_ip; 160 fl.nl_u.ip4_u.daddr = dst_ip;
161 if (ip_route_output_key(&rt, &fl)) 161 if (ip_route_output_key(&init_net, &rt, &fl))
162 return; 162 return;
163 163
164 neigh_event_send(rt->u.dst.neighbour, NULL); 164 neigh_event_send(rt->u.dst.neighbour, NULL);
@@ -179,7 +179,7 @@ static int addr_resolve_remote(struct sockaddr_in *src_in,
179 memset(&fl, 0, sizeof fl); 179 memset(&fl, 0, sizeof fl);
180 fl.nl_u.ip4_u.daddr = dst_ip; 180 fl.nl_u.ip4_u.daddr = dst_ip;
181 fl.nl_u.ip4_u.saddr = src_ip; 181 fl.nl_u.ip4_u.saddr = src_ip;
182 ret = ip_route_output_key(&rt, &fl); 182 ret = ip_route_output_key(&init_net, &rt, &fl);
183 if (ret) 183 if (ret)
184 goto out; 184 goto out;
185 185
@@ -261,15 +261,15 @@ static int addr_resolve_local(struct sockaddr_in *src_in,
261 __be32 dst_ip = dst_in->sin_addr.s_addr; 261 __be32 dst_ip = dst_in->sin_addr.s_addr;
262 int ret; 262 int ret;
263 263
264 dev = ip_dev_find(dst_ip); 264 dev = ip_dev_find(&init_net, dst_ip);
265 if (!dev) 265 if (!dev)
266 return -EADDRNOTAVAIL; 266 return -EADDRNOTAVAIL;
267 267
268 if (ZERONET(src_ip)) { 268 if (ipv4_is_zeronet(src_ip)) {
269 src_in->sin_family = dst_in->sin_family; 269 src_in->sin_family = dst_in->sin_family;
270 src_in->sin_addr.s_addr = dst_ip; 270 src_in->sin_addr.s_addr = dst_ip;
271 ret = rdma_copy_addr(addr, dev, dev->dev_addr); 271 ret = rdma_copy_addr(addr, dev, dev->dev_addr);
272 } else if (LOOPBACK(src_ip)) { 272 } else if (ipv4_is_loopback(src_ip)) {
273 ret = rdma_translate_ip((struct sockaddr *)dst_in, addr); 273 ret = rdma_translate_ip((struct sockaddr *)dst_in, addr);
274 if (!ret) 274 if (!ret)
275 memcpy(addr->dst_dev_addr, dev->dev_addr, MAX_ADDR_LEN); 275 memcpy(addr->dst_dev_addr, dev->dev_addr, MAX_ADDR_LEN);
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 637efead97a0..1eff1b2c0e08 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -630,7 +630,8 @@ static inline int cma_zero_addr(struct sockaddr *addr)
630 struct in6_addr *ip6; 630 struct in6_addr *ip6;
631 631
632 if (addr->sa_family == AF_INET) 632 if (addr->sa_family == AF_INET)
633 return ZERONET(((struct sockaddr_in *) addr)->sin_addr.s_addr); 633 return ipv4_is_zeronet(
634 ((struct sockaddr_in *)addr)->sin_addr.s_addr);
634 else { 635 else {
635 ip6 = &((struct sockaddr_in6 *) addr)->sin6_addr; 636 ip6 = &((struct sockaddr_in6 *) addr)->sin6_addr;
636 return (ip6->s6_addr32[0] | ip6->s6_addr32[1] | 637 return (ip6->s6_addr32[0] | ip6->s6_addr32[1] |
@@ -640,7 +641,7 @@ static inline int cma_zero_addr(struct sockaddr *addr)
640 641
641static inline int cma_loopback_addr(struct sockaddr *addr) 642static inline int cma_loopback_addr(struct sockaddr *addr)
642{ 643{
643 return LOOPBACK(((struct sockaddr_in *) addr)->sin_addr.s_addr); 644 return ipv4_is_loopback(((struct sockaddr_in *) addr)->sin_addr.s_addr);
644} 645}
645 646
646static inline int cma_any_addr(struct sockaddr *addr) 647static inline int cma_any_addr(struct sockaddr *addr)
@@ -1288,7 +1289,7 @@ static int iw_conn_req_handler(struct iw_cm_id *cm_id,
1288 atomic_inc(&conn_id->dev_remove); 1289 atomic_inc(&conn_id->dev_remove);
1289 conn_id->state = CMA_CONNECT; 1290 conn_id->state = CMA_CONNECT;
1290 1291
1291 dev = ip_dev_find(iw_event->local_addr.sin_addr.s_addr); 1292 dev = ip_dev_find(&init_net, iw_event->local_addr.sin_addr.s_addr);
1292 if (!dev) { 1293 if (!dev) {
1293 ret = -EADDRNOTAVAIL; 1294 ret = -EADDRNOTAVAIL;
1294 cma_enable_remove(conn_id); 1295 cma_enable_remove(conn_id);
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c
index f8cb0fe748c3..e9a08fa3dffe 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_cm.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c
@@ -332,7 +332,7 @@ static struct rtable *find_route(struct t3cdev *dev, __be32 local_ip,
332 } 332 }
333 }; 333 };
334 334
335 if (ip_route_output_flow(&rt, &fl, NULL, 0)) 335 if (ip_route_output_flow(&init_net, &rt, &fl, NULL, 0))
336 return NULL; 336 return NULL;
337 return rt; 337 return rt;
338} 338}