diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-02 17:31:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-02 17:31:35 -0500 |
commit | b23dd4fe42b455af5c6e20966b7d6959fa8352ea (patch) | |
tree | bf97323eae9a8d084170e573ff2c0c40bc72c3cd /drivers/infiniband/hw | |
parent | 452edd598f60522c11f7f88fdbab27eb36509d1a (diff) |
ipv4: Make output route lookup return rtable directly.
Instead of on the stack.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_cm.c | 3 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cm.c | 3 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_cm.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c index e654285aa6b..e0ccbc53fbc 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_cm.c +++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c | |||
@@ -354,7 +354,8 @@ static struct rtable *find_route(struct t3cdev *dev, __be32 local_ip, | |||
354 | } | 354 | } |
355 | }; | 355 | }; |
356 | 356 | ||
357 | if (ip_route_output_flow(&init_net, &rt, &fl, NULL)) | 357 | rt = ip_route_output_flow(&init_net, &fl, NULL); |
358 | if (IS_ERR(rt)) | ||
358 | return NULL; | 359 | return NULL; |
359 | return rt; | 360 | return rt; |
360 | } | 361 | } |
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index 7e0484f18db..77b0eef2aad 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c | |||
@@ -331,7 +331,8 @@ static struct rtable *find_route(struct c4iw_dev *dev, __be32 local_ip, | |||
331 | } | 331 | } |
332 | }; | 332 | }; |
333 | 333 | ||
334 | if (ip_route_output_flow(&init_net, &rt, &fl, NULL)) | 334 | rt = ip_route_output_flow(&init_net, &fl, NULL); |
335 | if (IS_ERR(rt)) | ||
335 | return NULL; | 336 | return NULL; |
336 | return rt; | 337 | return rt; |
337 | } | 338 | } |
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index ec3aa11c36c..e81599cb1fe 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c | |||
@@ -1112,7 +1112,8 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi | |||
1112 | 1112 | ||
1113 | memset(&fl, 0, sizeof fl); | 1113 | memset(&fl, 0, sizeof fl); |
1114 | fl.nl_u.ip4_u.daddr = htonl(dst_ip); | 1114 | fl.nl_u.ip4_u.daddr = htonl(dst_ip); |
1115 | if (ip_route_output_key(&init_net, &rt, &fl)) { | 1115 | rt = ip_route_output_key(&init_net, &fl); |
1116 | if (IS_ERR(rt)) { | ||
1116 | printk(KERN_ERR "%s: ip_route_output_key failed for 0x%08X\n", | 1117 | printk(KERN_ERR "%s: ip_route_output_key failed for 0x%08X\n", |
1117 | __func__, dst_ip); | 1118 | __func__, dst_ip); |
1118 | return rc; | 1119 | return rc; |