aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorSean Hefty <sean.hefty@intel.com>2013-05-29 13:09:30 -0400
committerRoland Dreier <roland@purestorage.com>2013-06-21 02:35:42 -0400
commit05ad94577ecd5a101889d04aa099b738ec5ee34f (patch)
tree24394fe2bcee72de80d91fa4c32426d2c9fee91a /drivers/infiniband
parentedaa7a5578988bcf12f68f14fb002bc0c87e2801 (diff)
RDMA/ucma: Name changes to indicate only IP addresses supported
Several commands into the RDMA CM from user space are restricted to supporting addresses which fit into a sockaddr_in6 structure: bind address, resolve address, and join multicast. With the addition of AF_IB, we need to support addresses which are larger than sockaddr_in6. This will be done by adding new commands that exchange address information using sockaddr_storage. However, to support existing applications, we maintain the current commands and structures, but rename them to indicate that they only support IPv4 and v6 addresses. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/ucma.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c
index 45bb052f573e..82fb1e6e1384 100644
--- a/drivers/infiniband/core/ucma.c
+++ b/drivers/infiniband/core/ucma.c
@@ -512,10 +512,10 @@ static ssize_t ucma_destroy_id(struct ucma_file *file, const char __user *inbuf,
512 return ret; 512 return ret;
513} 513}
514 514
515static ssize_t ucma_bind_addr(struct ucma_file *file, const char __user *inbuf, 515static ssize_t ucma_bind_ip(struct ucma_file *file, const char __user *inbuf,
516 int in_len, int out_len) 516 int in_len, int out_len)
517{ 517{
518 struct rdma_ucm_bind_addr cmd; 518 struct rdma_ucm_bind_ip cmd;
519 struct ucma_context *ctx; 519 struct ucma_context *ctx;
520 int ret; 520 int ret;
521 521
@@ -531,11 +531,11 @@ static ssize_t ucma_bind_addr(struct ucma_file *file, const char __user *inbuf,
531 return ret; 531 return ret;
532} 532}
533 533
534static ssize_t ucma_resolve_addr(struct ucma_file *file, 534static ssize_t ucma_resolve_ip(struct ucma_file *file,
535 const char __user *inbuf, 535 const char __user *inbuf,
536 int in_len, int out_len) 536 int in_len, int out_len)
537{ 537{
538 struct rdma_ucm_resolve_addr cmd; 538 struct rdma_ucm_resolve_ip cmd;
539 struct ucma_context *ctx; 539 struct ucma_context *ctx;
540 int ret; 540 int ret;
541 541
@@ -1178,11 +1178,11 @@ static ssize_t ucma_notify(struct ucma_file *file, const char __user *inbuf,
1178 return ret; 1178 return ret;
1179} 1179}
1180 1180
1181static ssize_t ucma_join_multicast(struct ucma_file *file, 1181static ssize_t ucma_join_ip_multicast(struct ucma_file *file,
1182 const char __user *inbuf, 1182 const char __user *inbuf,
1183 int in_len, int out_len) 1183 int in_len, int out_len)
1184{ 1184{
1185 struct rdma_ucm_join_mcast cmd; 1185 struct rdma_ucm_join_ip_mcast cmd;
1186 struct rdma_ucm_create_id_resp resp; 1186 struct rdma_ucm_create_id_resp resp;
1187 struct ucma_context *ctx; 1187 struct ucma_context *ctx;
1188 struct ucma_multicast *mc; 1188 struct ucma_multicast *mc;
@@ -1379,26 +1379,26 @@ file_put:
1379static ssize_t (*ucma_cmd_table[])(struct ucma_file *file, 1379static ssize_t (*ucma_cmd_table[])(struct ucma_file *file,
1380 const char __user *inbuf, 1380 const char __user *inbuf,
1381 int in_len, int out_len) = { 1381 int in_len, int out_len) = {
1382 [RDMA_USER_CM_CMD_CREATE_ID] = ucma_create_id, 1382 [RDMA_USER_CM_CMD_CREATE_ID] = ucma_create_id,
1383 [RDMA_USER_CM_CMD_DESTROY_ID] = ucma_destroy_id, 1383 [RDMA_USER_CM_CMD_DESTROY_ID] = ucma_destroy_id,
1384 [RDMA_USER_CM_CMD_BIND_ADDR] = ucma_bind_addr, 1384 [RDMA_USER_CM_CMD_BIND_IP] = ucma_bind_ip,
1385 [RDMA_USER_CM_CMD_RESOLVE_ADDR] = ucma_resolve_addr, 1385 [RDMA_USER_CM_CMD_RESOLVE_IP] = ucma_resolve_ip,
1386 [RDMA_USER_CM_CMD_RESOLVE_ROUTE]= ucma_resolve_route, 1386 [RDMA_USER_CM_CMD_RESOLVE_ROUTE] = ucma_resolve_route,
1387 [RDMA_USER_CM_CMD_QUERY_ROUTE] = ucma_query_route, 1387 [RDMA_USER_CM_CMD_QUERY_ROUTE] = ucma_query_route,
1388 [RDMA_USER_CM_CMD_CONNECT] = ucma_connect, 1388 [RDMA_USER_CM_CMD_CONNECT] = ucma_connect,
1389 [RDMA_USER_CM_CMD_LISTEN] = ucma_listen, 1389 [RDMA_USER_CM_CMD_LISTEN] = ucma_listen,
1390 [RDMA_USER_CM_CMD_ACCEPT] = ucma_accept, 1390 [RDMA_USER_CM_CMD_ACCEPT] = ucma_accept,
1391 [RDMA_USER_CM_CMD_REJECT] = ucma_reject, 1391 [RDMA_USER_CM_CMD_REJECT] = ucma_reject,
1392 [RDMA_USER_CM_CMD_DISCONNECT] = ucma_disconnect, 1392 [RDMA_USER_CM_CMD_DISCONNECT] = ucma_disconnect,
1393 [RDMA_USER_CM_CMD_INIT_QP_ATTR] = ucma_init_qp_attr, 1393 [RDMA_USER_CM_CMD_INIT_QP_ATTR] = ucma_init_qp_attr,
1394 [RDMA_USER_CM_CMD_GET_EVENT] = ucma_get_event, 1394 [RDMA_USER_CM_CMD_GET_EVENT] = ucma_get_event,
1395 [RDMA_USER_CM_CMD_GET_OPTION] = NULL, 1395 [RDMA_USER_CM_CMD_GET_OPTION] = NULL,
1396 [RDMA_USER_CM_CMD_SET_OPTION] = ucma_set_option, 1396 [RDMA_USER_CM_CMD_SET_OPTION] = ucma_set_option,
1397 [RDMA_USER_CM_CMD_NOTIFY] = ucma_notify, 1397 [RDMA_USER_CM_CMD_NOTIFY] = ucma_notify,
1398 [RDMA_USER_CM_CMD_JOIN_MCAST] = ucma_join_multicast, 1398 [RDMA_USER_CM_CMD_JOIN_IP_MCAST] = ucma_join_ip_multicast,
1399 [RDMA_USER_CM_CMD_LEAVE_MCAST] = ucma_leave_multicast, 1399 [RDMA_USER_CM_CMD_LEAVE_MCAST] = ucma_leave_multicast,
1400 [RDMA_USER_CM_CMD_MIGRATE_ID] = ucma_migrate_id, 1400 [RDMA_USER_CM_CMD_MIGRATE_ID] = ucma_migrate_id,
1401 [RDMA_USER_CM_CMD_QUERY] = ucma_query 1401 [RDMA_USER_CM_CMD_QUERY] = ucma_query
1402}; 1402};
1403 1403
1404static ssize_t ucma_write(struct file *filp, const char __user *buf, 1404static ssize_t ucma_write(struct file *filp, const char __user *buf,