aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/core_priv.h
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-09-05 12:54:24 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-09-12 16:32:17 -0600
commit6aaecd38568557266ff7a5c3765c58322586e4ce (patch)
treebcf51ab56709e270171c2eaaa6f133055742a389 /drivers/infiniband/core/core_priv.h
parentRDMA/core: Protect against changing dst->dev during destination resolve (diff)
downloadlinux-dev-6aaecd38568557266ff7a5c3765c58322586e4ce.tar.xz
linux-dev-6aaecd38568557266ff7a5c3765c58322586e4ce.zip
RDMA/core: Simplify roce_resolve_route_from_path()
Currently RoCE route resolve functionality is split between two functions. (a) roce_resolve_route_from_path() and its helper function rdma_resolve_ip_route(). Due to this multiple sockaddr src structures are created in both functions with rdma_dev_addr is an interface between the two for checks. Since there is only one user of rdma_resolve_ip_route() as RoCE, combine the functionality of both functions to roce_resolve_route_from_path() and further reduce the scope of rdma_dev_addr to core/addr.c This also allow to extend addr_resolve() in subsequent patch to consider netdev properties of GID in safer way under rcu lock. Additionally src and dst addresses were always provided, so skip the src addr NULL pointer check as they are present on the stack now. Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/core_priv.h')
-rw-r--r--drivers/infiniband/core/core_priv.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/core/core_priv.h b/drivers/infiniband/core/core_priv.h
index c3d93350413c..4dfcf41d83c0 100644
--- a/drivers/infiniband/core/core_priv.h
+++ b/drivers/infiniband/core/core_priv.h
@@ -343,4 +343,7 @@ int rdma_addr_find_l2_eth_by_grh(const union ib_gid *sgid,
void rdma_copy_src_l2_addr(struct rdma_dev_addr *dev_addr,
const struct net_device *dev);
+struct sa_path_rec;
+int roce_resolve_route_from_path(struct sa_path_rec *rec,
+ const struct ib_gid_attr *attr);
#endif /* _CORE_PRIV_H */