]> asedeno.scripts.mit.edu Git - linux.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)
commitcaf1e3ae9fa648d6dd38468736868d6867cab273
treee2f7a24715003764733b0d82f6e437f5fd0f3cbe
parent99ed748e878a99c6c7b87bbec063eefd9e47cb42
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