diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 19:29:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 19:29:25 -0400 |
commit | 7a6362800cb7d1d618a697a650c7aaed3eb39320 (patch) | |
tree | 087f9bc6c13ef1fad4b392c5cf9325cd28fa8523 /drivers/infiniband | |
parent | 6445ced8670f37cfc2c5e24a9de9b413dbfc788d (diff) | |
parent | ceda86a108671294052cbf51660097b6534672f5 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1480 commits)
bonding: enable netpoll without checking link status
xfrm: Refcount destination entry on xfrm_lookup
net: introduce rx_handler results and logic around that
bonding: get rid of IFF_SLAVE_INACTIVE netdev->priv_flag
bonding: wrap slave state work
net: get rid of multiple bond-related netdevice->priv_flags
bonding: register slave pointer for rx_handler
be2net: Bump up the version number
be2net: Copyright notice change. Update to Emulex instead of ServerEngines
e1000e: fix kconfig for crc32 dependency
netfilter ebtables: fix xt_AUDIT to work with ebtables
xen network backend driver
bonding: Improve syslog message at device creation time
bonding: Call netif_carrier_off after register_netdevice
bonding: Incorrect TX queue offset
net_sched: fix ip_tos2prio
xfrm: fix __xfrm_route_forward()
be2net: Fix UDP packet detected status in RX compl
Phonet: fix aligned-mode pipe socket buffer header reserve
netxen: support for GbE port settings
...
Fix up conflicts in drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
with the staging updates.
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/core/addr.c | 31 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_cm.c | 22 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cm.c | 22 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes.c | 3 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_cm.c | 8 |
5 files changed, 28 insertions, 58 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index 8aba0ba57de5..e0ef5fdc361e 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c | |||
@@ -183,20 +183,15 @@ static int addr4_resolve(struct sockaddr_in *src_in, | |||
183 | { | 183 | { |
184 | __be32 src_ip = src_in->sin_addr.s_addr; | 184 | __be32 src_ip = src_in->sin_addr.s_addr; |
185 | __be32 dst_ip = dst_in->sin_addr.s_addr; | 185 | __be32 dst_ip = dst_in->sin_addr.s_addr; |
186 | struct flowi fl; | ||
187 | struct rtable *rt; | 186 | struct rtable *rt; |
188 | struct neighbour *neigh; | 187 | struct neighbour *neigh; |
189 | int ret; | 188 | int ret; |
190 | 189 | ||
191 | memset(&fl, 0, sizeof fl); | 190 | rt = ip_route_output(&init_net, dst_ip, src_ip, 0, addr->bound_dev_if); |
192 | fl.nl_u.ip4_u.daddr = dst_ip; | 191 | if (IS_ERR(rt)) { |
193 | fl.nl_u.ip4_u.saddr = src_ip; | 192 | ret = PTR_ERR(rt); |
194 | fl.oif = addr->bound_dev_if; | ||
195 | |||
196 | ret = ip_route_output_key(&init_net, &rt, &fl); | ||
197 | if (ret) | ||
198 | goto out; | 193 | goto out; |
199 | 194 | } | |
200 | src_in->sin_family = AF_INET; | 195 | src_in->sin_family = AF_INET; |
201 | src_in->sin_addr.s_addr = rt->rt_src; | 196 | src_in->sin_addr.s_addr = rt->rt_src; |
202 | 197 | ||
@@ -236,28 +231,28 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, | |||
236 | struct sockaddr_in6 *dst_in, | 231 | struct sockaddr_in6 *dst_in, |
237 | struct rdma_dev_addr *addr) | 232 | struct rdma_dev_addr *addr) |
238 | { | 233 | { |
239 | struct flowi fl; | 234 | struct flowi6 fl6; |
240 | struct neighbour *neigh; | 235 | struct neighbour *neigh; |
241 | struct dst_entry *dst; | 236 | struct dst_entry *dst; |
242 | int ret; | 237 | int ret; |
243 | 238 | ||
244 | memset(&fl, 0, sizeof fl); | 239 | memset(&fl6, 0, sizeof fl6); |
245 | ipv6_addr_copy(&fl.fl6_dst, &dst_in->sin6_addr); | 240 | ipv6_addr_copy(&fl6.daddr, &dst_in->sin6_addr); |
246 | ipv6_addr_copy(&fl.fl6_src, &src_in->sin6_addr); | 241 | ipv6_addr_copy(&fl6.saddr, &src_in->sin6_addr); |
247 | fl.oif = addr->bound_dev_if; | 242 | fl6.flowi6_oif = addr->bound_dev_if; |
248 | 243 | ||
249 | dst = ip6_route_output(&init_net, NULL, &fl); | 244 | dst = ip6_route_output(&init_net, NULL, &fl6); |
250 | if ((ret = dst->error)) | 245 | if ((ret = dst->error)) |
251 | goto put; | 246 | goto put; |
252 | 247 | ||
253 | if (ipv6_addr_any(&fl.fl6_src)) { | 248 | if (ipv6_addr_any(&fl6.saddr)) { |
254 | ret = ipv6_dev_get_saddr(&init_net, ip6_dst_idev(dst)->dev, | 249 | ret = ipv6_dev_get_saddr(&init_net, ip6_dst_idev(dst)->dev, |
255 | &fl.fl6_dst, 0, &fl.fl6_src); | 250 | &fl6.daddr, 0, &fl6.saddr); |
256 | if (ret) | 251 | if (ret) |
257 | goto put; | 252 | goto put; |
258 | 253 | ||
259 | src_in->sin6_family = AF_INET6; | 254 | src_in->sin6_family = AF_INET6; |
260 | ipv6_addr_copy(&src_in->sin6_addr, &fl.fl6_src); | 255 | ipv6_addr_copy(&src_in->sin6_addr, &fl6.saddr); |
261 | } | 256 | } |
262 | 257 | ||
263 | if (dst->dev->flags & IFF_LOOPBACK) { | 258 | if (dst->dev->flags & IFF_LOOPBACK) { |
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c index d02dcc6e5963..3216bcad7e82 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_cm.c +++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c | |||
@@ -338,23 +338,11 @@ static struct rtable *find_route(struct t3cdev *dev, __be32 local_ip, | |||
338 | __be16 peer_port, u8 tos) | 338 | __be16 peer_port, u8 tos) |
339 | { | 339 | { |
340 | struct rtable *rt; | 340 | struct rtable *rt; |
341 | struct flowi fl = { | 341 | |
342 | .oif = 0, | 342 | rt = ip_route_output_ports(&init_net, NULL, peer_ip, local_ip, |
343 | .nl_u = { | 343 | peer_port, local_port, IPPROTO_TCP, |
344 | .ip4_u = { | 344 | tos, 0); |
345 | .daddr = peer_ip, | 345 | if (IS_ERR(rt)) |
346 | .saddr = local_ip, | ||
347 | .tos = tos} | ||
348 | }, | ||
349 | .proto = IPPROTO_TCP, | ||
350 | .uli_u = { | ||
351 | .ports = { | ||
352 | .sport = local_port, | ||
353 | .dport = peer_port} | ||
354 | } | ||
355 | }; | ||
356 | |||
357 | if (ip_route_output_flow(&init_net, &rt, &fl, NULL, 0)) | ||
358 | return NULL; | 346 | return NULL; |
359 | return rt; | 347 | return rt; |
360 | } | 348 | } |
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index b4d9e4caf3c9..9d8dcfab2b38 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c | |||
@@ -315,23 +315,11 @@ static struct rtable *find_route(struct c4iw_dev *dev, __be32 local_ip, | |||
315 | __be16 peer_port, u8 tos) | 315 | __be16 peer_port, u8 tos) |
316 | { | 316 | { |
317 | struct rtable *rt; | 317 | struct rtable *rt; |
318 | struct flowi fl = { | 318 | |
319 | .oif = 0, | 319 | rt = ip_route_output_ports(&init_net, NULL, peer_ip, local_ip, |
320 | .nl_u = { | 320 | peer_port, local_port, IPPROTO_TCP, |
321 | .ip4_u = { | 321 | tos, 0); |
322 | .daddr = peer_ip, | 322 | if (IS_ERR(rt)) |
323 | .saddr = local_ip, | ||
324 | .tos = tos} | ||
325 | }, | ||
326 | .proto = IPPROTO_TCP, | ||
327 | .uli_u = { | ||
328 | .ports = { | ||
329 | .sport = local_port, | ||
330 | .dport = peer_port} | ||
331 | } | ||
332 | }; | ||
333 | |||
334 | if (ip_route_output_flow(&init_net, &rt, &fl, NULL, 0)) | ||
335 | return NULL; | 323 | return NULL; |
336 | return rt; | 324 | return rt; |
337 | } | 325 | } |
diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c index 3b4ec3238ceb..3d7f3664b67b 100644 --- a/drivers/infiniband/hw/nes/nes.c +++ b/drivers/infiniband/hw/nes/nes.c | |||
@@ -153,7 +153,8 @@ static int nes_inetaddr_event(struct notifier_block *notifier, | |||
153 | nesdev, nesdev->netdev[0]->name); | 153 | nesdev, nesdev->netdev[0]->name); |
154 | netdev = nesdev->netdev[0]; | 154 | netdev = nesdev->netdev[0]; |
155 | nesvnic = netdev_priv(netdev); | 155 | nesvnic = netdev_priv(netdev); |
156 | is_bonded = (netdev->master == event_netdev); | 156 | is_bonded = netif_is_bond_slave(netdev) && |
157 | (netdev->master == event_netdev); | ||
157 | if ((netdev == event_netdev) || is_bonded) { | 158 | if ((netdev == event_netdev) || is_bonded) { |
158 | if (nesvnic->rdma_enabled == 0) { | 159 | if (nesvnic->rdma_enabled == 0) { |
159 | nes_debug(NES_DBG_NETDEV, "Returning without processing event for %s since" | 160 | nes_debug(NES_DBG_NETDEV, "Returning without processing event for %s since" |
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 009ec814d517..ef3291551bc6 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c | |||
@@ -1104,21 +1104,19 @@ static inline int mini_cm_accelerated(struct nes_cm_core *cm_core, | |||
1104 | static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpindex) | 1104 | static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpindex) |
1105 | { | 1105 | { |
1106 | struct rtable *rt; | 1106 | struct rtable *rt; |
1107 | struct flowi fl; | ||
1108 | struct neighbour *neigh; | 1107 | struct neighbour *neigh; |
1109 | int rc = arpindex; | 1108 | int rc = arpindex; |
1110 | struct net_device *netdev; | 1109 | struct net_device *netdev; |
1111 | struct nes_adapter *nesadapter = nesvnic->nesdev->nesadapter; | 1110 | struct nes_adapter *nesadapter = nesvnic->nesdev->nesadapter; |
1112 | 1111 | ||
1113 | memset(&fl, 0, sizeof fl); | 1112 | rt = ip_route_output(&init_net, htonl(dst_ip), 0, 0, 0); |
1114 | fl.nl_u.ip4_u.daddr = htonl(dst_ip); | 1113 | if (IS_ERR(rt)) { |
1115 | if (ip_route_output_key(&init_net, &rt, &fl)) { | ||
1116 | printk(KERN_ERR "%s: ip_route_output_key failed for 0x%08X\n", | 1114 | printk(KERN_ERR "%s: ip_route_output_key failed for 0x%08X\n", |
1117 | __func__, dst_ip); | 1115 | __func__, dst_ip); |
1118 | return rc; | 1116 | return rc; |
1119 | } | 1117 | } |
1120 | 1118 | ||
1121 | if (nesvnic->netdev->master) | 1119 | if (netif_is_bond_slave(netdev)) |
1122 | netdev = nesvnic->netdev->master; | 1120 | netdev = nesvnic->netdev->master; |
1123 | else | 1121 | else |
1124 | netdev = nesvnic->netdev; | 1122 | netdev = nesvnic->netdev; |