diff options
author | Parav Pandit <parav@mellanox.com> | 2018-09-05 12:54:19 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-09-12 15:48:08 -0600 |
commit | a362ea1d9e1acf674094614518f4245d17cfc01e (patch) | |
tree | 6028e9f072db863e6e8733092c2977d3c61e0f4e /include/rdma | |
parent | 89c5691cdd95ab39f43bd102ec3f0ff39716ae85 (diff) | |
download | linux-a362ea1d9e1acf674094614518f4245d17cfc01e.tar.bz2 |
RDMA/core: Introduce and use rdma_set_src_addr() between IPv4 and IPv6
rdma_translate_ip() is done while resolving address for the loopback
addresses. The current flow is convoluted with resolve neighbor being
optional.
This patch simplifies the code in following ways.
(a) Use common code between IPv4 and IPv6 for address translation,
loopback checks and acquiring netdevice.
(b) During neigh resolve in addr_resolve_neigh(), only copy destination
address.
(c) Always resolve the source address before the destination address,
because it doesn't depend on resolving neigh being requested or not.
This helps to reduce 3 calls of rdma_copy_addr and rdma_translate_ip to
one and makes it easier to follow the code flow.
Now that ib_nl_fetch_ha() doesn't depend on dst, drop dst argument from
ib_nl_fetch_ha().
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include/rdma')
0 files changed, 0 insertions, 0 deletions