summaryrefslogtreecommitdiffstats
path: root/include/rdma/ib_addr.h
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-09-05 11:54:26 +0200
committerJason Gunthorpe <jgg@mellanox.com>2018-09-13 00:32:17 +0200
commit0e9d2c19bff1d351005afb2f990a913e395ba6d4 (patch)
treef7aa4e5568d19fc2b2ab2b2060a6500612cd121e /include/rdma/ib_addr.h
parentRDMA/core: Introduce rdma_read_gid_attr_ndev_rcu() to check GID attribute (diff)
downloadlinux-0e9d2c19bff1d351005afb2f990a913e395ba6d4.tar.xz
linux-0e9d2c19bff1d351005afb2f990a913e395ba6d4.zip
RDMA/core: Consider net ns of gid attribute for RoCE
When resolving destination address or route, when net namespace is unavailable, refer to the net namespace of the netdevice of the SGID attribute. This is typically the case for requests arriving from the network for RoCE ports. 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 'include/rdma/ib_addr.h')
-rw-r--r--include/rdma/ib_addr.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h
index 676514a930ab..2e33b1529015 100644
--- a/include/rdma/ib_addr.h
+++ b/include/rdma/ib_addr.h
@@ -95,12 +95,15 @@ int rdma_translate_ip(const struct sockaddr *addr,
* @timeout_ms: Amount of time to wait for the address resolution to complete.
* @callback: Call invoked once address resolution has completed, timed out,
* or been canceled. A status of 0 indicates success.
+ * @resolve_by_gid_attr: Resolve the ip based on the GID attribute from
+ * rdma_dev_addr.
* @context: User-specified context associated with the call.
*/
int rdma_resolve_ip(struct sockaddr *src_addr, const struct sockaddr *dst_addr,
struct rdma_dev_addr *addr, int timeout_ms,
void (*callback)(int status, struct sockaddr *src_addr,
struct rdma_dev_addr *addr, void *context),
+ bool resolve_by_gid_attr,
void *context);
void rdma_addr_cancel(struct rdma_dev_addr *addr);