]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/core Introduce and use rdma_find_ndev_for_src_ip_rcu
authorParav Pandit <parav@mellanox.com>
Wed, 5 Sep 2018 09:54:16 +0000 (12:54 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 12 Sep 2018 21:48:08 +0000 (15:48 -0600)
commit84996f806b6df5306be21f7aa42891a1bcdf7e68
treee2f7a24715003764733b0d82f6e437f5fd0f3cbe
parent82821f43371a685ac5320e2fb0ca1ce31320255f
RDMA/core Introduce and use rdma_find_ndev_for_src_ip_rcu

This fixes two issues:
1. When address family is other than IPv4 or v6, rdma_translate_ip()
   returns success which is incorrect.
2. When address familty is AF_INET6, and if the source address is not
   found, it returns success, which is also incorrect.

Therefore, introduce and use rdma_find_ndev_for_src_ip_rcu() helper
function which returns correct success or error status and is also useful
for future code refactor in addr_resolve().

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>
drivers/infiniband/core/addr.c