Skip to content

Commit

Permalink
infiniband: cxgb4: Convert import_ep() over to dst_neigh_lookup().
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Miller committed Jan 26, 2012
1 parent 02b6195 commit 64b7007
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/infiniband/hw/cxgb4/cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1562,11 +1562,11 @@ static int import_ep(struct c4iw_ep *ep, __be32 peer_ip, struct dst_entry *dst,
struct neighbour *n;
int err, step;

rcu_read_lock();
n = dst_get_neighbour_noref(dst);
err = -ENODEV;
n = dst_neigh_lookup(dst, &peer_ip);
if (!n)
goto out;
return -ENODEV;

rcu_read_lock();
err = -ENOMEM;
if (n->dev->flags & IFF_LOOPBACK) {
struct net_device *pdev;
Expand Down Expand Up @@ -1614,6 +1614,8 @@ static int import_ep(struct c4iw_ep *ep, __be32 peer_ip, struct dst_entry *dst,
out:
rcu_read_unlock();

neigh_release(n);

return err;
}

Expand Down

0 comments on commit 64b7007

Please sign in to comment.