diff options
-rw-r--r-- | drivers/infiniband/core/addr.c | 1 | ||||
-rw-r--r-- | drivers/infiniband/core/cma.c | 8 | ||||
-rw-r--r-- | include/rdma/ib_addr.h | 1 |
3 files changed, 7 insertions, 3 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 | } |
110 | EXPORT_SYMBOL(rdma_copy_addr); | 111 | EXPORT_SYMBOL(rdma_copy_addr); |
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 44d190f67810..5fb506a41776 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c | |||
@@ -1002,6 +1002,7 @@ static struct rdma_id_private *cma_new_conn_id(struct rdma_cm_id *listen_id, | |||
1002 | union cma_ip_addr *src, *dst; | 1002 | union cma_ip_addr *src, *dst; |
1003 | __be16 port; | 1003 | __be16 port; |
1004 | u8 ip_ver; | 1004 | u8 ip_ver; |
1005 | int ret; | ||
1005 | 1006 | ||
1006 | if (cma_get_net_info(ib_event->private_data, listen_id->ps, | 1007 | if (cma_get_net_info(ib_event->private_data, listen_id->ps, |
1007 | &ip_ver, &port, &src, &dst)) | 1008 | &ip_ver, &port, &src, &dst)) |
@@ -1026,10 +1027,11 @@ static struct rdma_id_private *cma_new_conn_id(struct rdma_cm_id *listen_id, | |||
1026 | if (rt->num_paths == 2) | 1027 | if (rt->num_paths == 2) |
1027 | rt->path_rec[1] = *ib_event->param.req_rcvd.alternate_path; | 1028 | rt->path_rec[1] = *ib_event->param.req_rcvd.alternate_path; |
1028 | 1029 | ||
1029 | ib_addr_set_sgid(&rt->addr.dev_addr, &rt->path_rec[0].sgid); | ||
1030 | ib_addr_set_dgid(&rt->addr.dev_addr, &rt->path_rec[0].dgid); | 1030 | ib_addr_set_dgid(&rt->addr.dev_addr, &rt->path_rec[0].dgid); |
1031 | ib_addr_set_pkey(&rt->addr.dev_addr, be16_to_cpu(rt->path_rec[0].pkey)); | 1031 | ret = rdma_translate_ip(&id->route.addr.src_addr, |
1032 | rt->addr.dev_addr.dev_type = RDMA_NODE_IB_CA; | 1032 | &id->route.addr.dev_addr); |
1033 | if (ret) | ||
1034 | goto destroy_id; | ||
1033 | 1035 | ||
1034 | id_priv = container_of(id, struct rdma_id_private, id); | 1036 | id_priv = container_of(id, struct rdma_id_private, id); |
1035 | id_priv->state = CMA_CONNECT; | 1037 | id_priv->state = CMA_CONNECT; |
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h index b42bdd000419..483057b2f4b4 100644 --- a/include/rdma/ib_addr.h +++ b/include/rdma/ib_addr.h | |||
@@ -61,6 +61,7 @@ struct rdma_dev_addr { | |||
61 | unsigned char dst_dev_addr[MAX_ADDR_LEN]; | 61 | unsigned char dst_dev_addr[MAX_ADDR_LEN]; |
62 | unsigned char broadcast[MAX_ADDR_LEN]; | 62 | unsigned char broadcast[MAX_ADDR_LEN]; |
63 | enum rdma_node_type dev_type; | 63 | enum rdma_node_type dev_type; |
64 | struct net_device *src_dev; | ||
64 | }; | 65 | }; |
65 | 66 | ||
66 | /** | 67 | /** |