aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/addr.c
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@voltaire.com>2008-07-15 02:48:53 -0400
committerRoland Dreier <rolandd@cisco.com>2008-07-15 02:48:53 -0400
commit64c5e613b9dd34ef1281ed6d22478609667ae36a (patch)
treeba749c73291bbb98954c08581b93d5bd6a931813 /drivers/infiniband/core/addr.c
parent4ab928f69208d240d3681336f34589e4b151824f (diff)
RDMA/addr: Keep pointer to netdevice in struct rdma_dev_addr
Keep a pointer to the local (src) netdevice in struct rdma_dev_addr, and copy it in as part of rdma_copy_addr(). Use rdma_translate_ip() in cma_new_conn_id() to reduce some code duplication and also make sure the src_dev member gets set. In a high-availability configuration the netdevice pointer can be used by the RDMA CM to align RDMA sessions to use the same links as the IP stack does under fail-over and route change cases. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/core/addr.c')
-rw-r--r--drivers/infiniband/core/addr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
index e4eb8be3bb0c..09a2bec7fd32 100644
--- a/drivers/infiniband/core/addr.c
+++ b/drivers/infiniband/core/addr.c
@@ -105,6 +105,7 @@ int rdma_copy_addr(struct rdma_dev_addr *dev_addr, struct net_device *dev,
105 memcpy(dev_addr->broadcast, dev->broadcast, MAX_ADDR_LEN); 105 memcpy(dev_addr->broadcast, dev->broadcast, MAX_ADDR_LEN);
106 if (dst_dev_addr) 106 if (dst_dev_addr)
107 memcpy(dev_addr->dst_dev_addr, dst_dev_addr, MAX_ADDR_LEN); 107 memcpy(dev_addr->dst_dev_addr, dst_dev_addr, MAX_ADDR_LEN);
108 dev_addr->src_dev = dev;
108 return 0; 109 return 0;
109} 110}
110EXPORT_SYMBOL(rdma_copy_addr); 111EXPORT_SYMBOL(rdma_copy_addr);