Commit 8d8cd0bf authored by Faisal Latif's avatar Faisal Latif Committed by Doug Ledford

i40iw: use shared code for port mapper

Removei/change for port mapper code which has been moved to iwcm.
Signed-off-by: default avatarMustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: default avatarFaisal Latif <faisal.latif@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent d3749841
This diff is collapsed.
...@@ -553,17 +553,17 @@ enum i40iw_status_code i40iw_manage_qhash(struct i40iw_device *iwdev, ...@@ -553,17 +553,17 @@ enum i40iw_status_code i40iw_manage_qhash(struct i40iw_device *iwdev,
info->ipv4_valid = cminfo->ipv4; info->ipv4_valid = cminfo->ipv4;
ether_addr_copy(info->mac_addr, iwdev->netdev->dev_addr); ether_addr_copy(info->mac_addr, iwdev->netdev->dev_addr);
info->qp_num = cpu_to_le32(dev->ilq->qp_id); info->qp_num = cpu_to_le32(dev->ilq->qp_id);
info->dest_port = cpu_to_le16(cminfo->map_loc_port); info->dest_port = cpu_to_le16(cminfo->loc_port);
info->dest_ip[0] = cpu_to_le32(cminfo->map_loc_addr[0]); info->dest_ip[0] = cpu_to_le32(cminfo->loc_addr[0]);
info->dest_ip[1] = cpu_to_le32(cminfo->map_loc_addr[1]); info->dest_ip[1] = cpu_to_le32(cminfo->loc_addr[1]);
info->dest_ip[2] = cpu_to_le32(cminfo->map_loc_addr[2]); info->dest_ip[2] = cpu_to_le32(cminfo->loc_addr[2]);
info->dest_ip[3] = cpu_to_le32(cminfo->map_loc_addr[3]); info->dest_ip[3] = cpu_to_le32(cminfo->loc_addr[3]);
if (etype == I40IW_QHASH_TYPE_TCP_ESTABLISHED) { if (etype == I40IW_QHASH_TYPE_TCP_ESTABLISHED) {
info->src_port = cpu_to_le16(cminfo->map_rem_port); info->src_port = cpu_to_le16(cminfo->rem_port);
info->src_ip[0] = cpu_to_le32(cminfo->map_rem_addr[0]); info->src_ip[0] = cpu_to_le32(cminfo->rem_addr[0]);
info->src_ip[1] = cpu_to_le32(cminfo->map_rem_addr[1]); info->src_ip[1] = cpu_to_le32(cminfo->rem_addr[1]);
info->src_ip[2] = cpu_to_le32(cminfo->map_rem_addr[2]); info->src_ip[2] = cpu_to_le32(cminfo->rem_addr[2]);
info->src_ip[3] = cpu_to_le32(cminfo->map_rem_addr[3]); info->src_ip[3] = cpu_to_le32(cminfo->rem_addr[3]);
} }
if (cmnode) { if (cmnode) {
cqp_request->callback_fcn = i40iw_send_syn_cqp_callback; cqp_request->callback_fcn = i40iw_send_syn_cqp_callback;
......
...@@ -102,17 +102,6 @@ static struct notifier_block i40iw_net_notifier = { ...@@ -102,17 +102,6 @@ static struct notifier_block i40iw_net_notifier = {
static int i40iw_notifiers_registered; static int i40iw_notifiers_registered;
/* registered port mapper netlink callbacks */
static struct ibnl_client_cbs i40iw_nl_cb_table[] = {
[RDMA_NL_IWPM_REG_PID] = {.dump = iwpm_register_pid_cb},
[RDMA_NL_IWPM_ADD_MAPPING] = {.dump = iwpm_add_mapping_cb},
[RDMA_NL_IWPM_QUERY_MAPPING] = {.dump = iwpm_add_and_query_mapping_cb},
[RDMA_NL_IWPM_REMOTE_INFO] = {.dump = iwpm_remote_info_cb},
[RDMA_NL_IWPM_HANDLE_ERR] = {.dump = iwpm_mapping_error_cb},
[RDMA_NL_IWPM_MAPINFO] = {.dump = iwpm_mapping_info_cb},
[RDMA_NL_IWPM_MAPINFO_NUM] = {.dump = iwpm_ack_mapping_info_cb}
};
/** /**
* i40iw_find_i40e_handler - find a handler given a client info * i40iw_find_i40e_handler - find a handler given a client info
* @ldev: pointer to a client info * @ldev: pointer to a client info
...@@ -1903,13 +1892,6 @@ static int __init i40iw_init_module(void) ...@@ -1903,13 +1892,6 @@ static int __init i40iw_init_module(void)
i40iw_client.type = I40E_CLIENT_IWARP; i40iw_client.type = I40E_CLIENT_IWARP;
spin_lock_init(&i40iw_handler_lock); spin_lock_init(&i40iw_handler_lock);
ret = i40e_register_client(&i40iw_client); ret = i40e_register_client(&i40iw_client);
ret = iwpm_init(RDMA_NL_I40IW);
if (ret)
i40iw_pr_err("Port mapper initialization failed\n");
ret = ibnl_add_client(RDMA_NL_I40IW, RDMA_NL_IWPM_NUM_OPS,
i40iw_nl_cb_table);
if (ret)
i40iw_pr_err("Failed to add netlink callback\n");
return ret; return ret;
} }
...@@ -1922,8 +1904,6 @@ static int __init i40iw_init_module(void) ...@@ -1922,8 +1904,6 @@ static int __init i40iw_init_module(void)
static void __exit i40iw_exit_module(void) static void __exit i40iw_exit_module(void)
{ {
i40e_unregister_client(&i40iw_client); i40e_unregister_client(&i40iw_client);
ibnl_remove_client(RDMA_NL_I40IW);
iwpm_exit(RDMA_NL_I40IW);
} }
module_init(i40iw_init_module); module_init(i40iw_init_module);
......
...@@ -2342,11 +2342,14 @@ static struct i40iw_ib_device *i40iw_init_rdma_device(struct i40iw_device *iwdev ...@@ -2342,11 +2342,14 @@ static struct i40iw_ib_device *i40iw_init_rdma_device(struct i40iw_device *iwdev
iwibdev->ibdev.iwcm->reject = i40iw_reject; iwibdev->ibdev.iwcm->reject = i40iw_reject;
iwibdev->ibdev.iwcm->create_listen = i40iw_create_listen; iwibdev->ibdev.iwcm->create_listen = i40iw_create_listen;
iwibdev->ibdev.iwcm->destroy_listen = i40iw_destroy_listen; iwibdev->ibdev.iwcm->destroy_listen = i40iw_destroy_listen;
memcpy(iwibdev->ibdev.iwcm->ifname, netdev->name,
sizeof(iwibdev->ibdev.iwcm->ifname));
iwibdev->ibdev.get_port_immutable = i40iw_port_immutable; iwibdev->ibdev.get_port_immutable = i40iw_port_immutable;
iwibdev->ibdev.poll_cq = i40iw_poll_cq; iwibdev->ibdev.poll_cq = i40iw_poll_cq;
iwibdev->ibdev.req_notify_cq = i40iw_req_notify_cq; iwibdev->ibdev.req_notify_cq = i40iw_req_notify_cq;
iwibdev->ibdev.post_send = i40iw_post_send; iwibdev->ibdev.post_send = i40iw_post_send;
iwibdev->ibdev.post_recv = i40iw_post_recv; iwibdev->ibdev.post_recv = i40iw_post_recv;
return iwibdev; return iwibdev;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment