infiniband: cxgb4: Convert import_ep() over to dst_neigh_lookup().

Now we must provide the IP destination address, and a reference has
to be dropped when we're done with the entry.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David Miller 2012-01-24 13:15:57 +00:00 committed by David S. Miller
parent 02b619555a
commit 64b7007eb9

View file

@ -1562,11 +1562,11 @@ static int import_ep(struct c4iw_ep *ep, __be32 peer_ip, struct dst_entry *dst,
struct neighbour *n; struct neighbour *n;
int err, step; int err, step;
rcu_read_lock(); n = dst_neigh_lookup(dst, &peer_ip);
n = dst_get_neighbour_noref(dst);
err = -ENODEV;
if (!n) if (!n)
goto out; return -ENODEV;
rcu_read_lock();
err = -ENOMEM; err = -ENOMEM;
if (n->dev->flags & IFF_LOOPBACK) { if (n->dev->flags & IFF_LOOPBACK) {
struct net_device *pdev; struct net_device *pdev;
@ -1614,6 +1614,8 @@ static int import_ep(struct c4iw_ep *ep, __be32 peer_ip, struct dst_entry *dst,
out: out:
rcu_read_unlock(); rcu_read_unlock();
neigh_release(n);
return err; return err;
} }