提交 64b7007e 编写于 作者: D David Miller 提交者: David S. Miller

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: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 02b61955
......@@ -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;
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册