Lines Matching refs:timewait_info

221 	struct cm_timewait_info *timewait_info;  member
687 cm_insert_remote_id(struct cm_timewait_info *timewait_info) in cm_insert_remote_id() argument
692 __be64 remote_ca_guid = timewait_info->remote_ca_guid; in cm_insert_remote_id()
693 __be32 remote_id = timewait_info->work.remote_id; in cm_insert_remote_id()
710 timewait_info->inserted_remote_id = 1; in cm_insert_remote_id()
711 rb_link_node(&timewait_info->remote_id_node, parent, link); in cm_insert_remote_id()
712 rb_insert_color(&timewait_info->remote_id_node, &cm.remote_id_table); in cm_insert_remote_id()
720 struct cm_timewait_info *timewait_info; in cm_find_remote_id() local
725 timewait_info = rb_entry(node, struct cm_timewait_info, in cm_find_remote_id()
727 if (be32_lt(remote_id, timewait_info->work.remote_id)) in cm_find_remote_id()
729 else if (be32_gt(remote_id, timewait_info->work.remote_id)) in cm_find_remote_id()
731 else if (be64_lt(remote_ca_guid, timewait_info->remote_ca_guid)) in cm_find_remote_id()
733 else if (be64_gt(remote_ca_guid, timewait_info->remote_ca_guid)) in cm_find_remote_id()
736 res = cm_acquire_id(timewait_info->work.local_id, in cm_find_remote_id()
737 timewait_info->work.remote_id); in cm_find_remote_id()
746 cm_insert_remote_qpn(struct cm_timewait_info *timewait_info) in cm_insert_remote_qpn() argument
751 __be64 remote_ca_guid = timewait_info->remote_ca_guid; in cm_insert_remote_qpn()
752 __be32 remote_qpn = timewait_info->remote_qpn; in cm_insert_remote_qpn()
769 timewait_info->inserted_remote_qp = 1; in cm_insert_remote_qpn()
770 rb_link_node(&timewait_info->remote_qp_node, parent, link); in cm_insert_remote_qpn()
771 rb_insert_color(&timewait_info->remote_qp_node, &cm.remote_qp_table); in cm_insert_remote_qpn()
945 struct cm_timewait_info *timewait_info = cm_id_priv->timewait_info; in cm_remove_remote() local
947 if (timewait_info->inserted_remote_id) { in cm_remove_remote()
948 rb_erase(&timewait_info->remote_id_node, &cm.remote_id_table); in cm_remove_remote()
949 timewait_info->inserted_remote_id = 0; in cm_remove_remote()
952 if (timewait_info->inserted_remote_qp) { in cm_remove_remote()
953 rb_erase(&timewait_info->remote_qp_node, &cm.remote_qp_table); in cm_remove_remote()
954 timewait_info->inserted_remote_qp = 0; in cm_remove_remote()
960 struct cm_timewait_info *timewait_info; in cm_create_timewait_info() local
962 timewait_info = kzalloc(sizeof *timewait_info, GFP_KERNEL); in cm_create_timewait_info()
963 if (!timewait_info) in cm_create_timewait_info()
966 timewait_info->work.local_id = local_id; in cm_create_timewait_info()
967 INIT_DELAYED_WORK(&timewait_info->work.work, cm_work_handler); in cm_create_timewait_info()
968 timewait_info->work.cm_event.event = IB_CM_TIMEWAIT_EXIT; in cm_create_timewait_info()
969 return timewait_info; in cm_create_timewait_info()
986 list_add_tail(&cm_id_priv->timewait_info->list, &cm.timewait_list); in cm_enter_timewait()
1000 queue_delayed_work(cm.wq, &cm_id_priv->timewait_info->work.work, in cm_enter_timewait()
1009 cm_id_priv->timewait_info = NULL; in cm_enter_timewait()
1019 if (cm_id_priv->timewait_info) { in cm_reset_to_idle()
1023 kfree(cm_id_priv->timewait_info); in cm_reset_to_idle()
1024 cm_id_priv->timewait_info = NULL; in cm_reset_to_idle()
1123 if (cm_id_priv->timewait_info) { in cm_destroy_id()
1125 kfree(cm_id_priv->timewait_info); in cm_destroy_id()
1126 cm_id_priv->timewait_info = NULL; in cm_destroy_id()
1490 if (cm_id->state != IB_CM_IDLE || WARN_ON(cm_id_priv->timewait_info)) { in ib_send_cm_req()
1496 cm_id_priv->timewait_info = cm_create_timewait_info(cm_id_priv-> in ib_send_cm_req()
1498 if (IS_ERR(cm_id_priv->timewait_info)) { in ib_send_cm_req()
1499 ret = PTR_ERR(cm_id_priv->timewait_info); in ib_send_cm_req()
1500 cm_id_priv->timewait_info = NULL; in ib_send_cm_req()
1969 struct cm_timewait_info *timewait_info; in cm_match_req() local
1976 timewait_info = cm_insert_remote_id(cm_id_priv->timewait_info); in cm_match_req()
1977 if (timewait_info) { in cm_match_req()
1978 cur_cm_id_priv = cm_acquire_id(timewait_info->work.local_id, in cm_match_req()
1979 timewait_info->work.remote_id); in cm_match_req()
1989 timewait_info = cm_insert_remote_qpn(cm_id_priv->timewait_info); in cm_match_req()
1990 if (timewait_info) { in cm_match_req()
1992 cur_cm_id_priv = cm_acquire_id(timewait_info->work.local_id, in cm_match_req()
1993 timewait_info->work.remote_id); in cm_match_req()
2099 cm_id_priv->timewait_info = cm_create_timewait_info(cm_id_priv-> in cm_req_handler()
2101 if (IS_ERR(cm_id_priv->timewait_info)) { in cm_req_handler()
2102 ret = PTR_ERR(cm_id_priv->timewait_info); in cm_req_handler()
2103 cm_id_priv->timewait_info = NULL; in cm_req_handler()
2106 cm_id_priv->timewait_info->work.remote_id = cm_id_priv->id.remote_id; in cm_req_handler()
2107 cm_id_priv->timewait_info->remote_ca_guid = in cm_req_handler()
2109 cm_id_priv->timewait_info->remote_qpn = cm_id_priv->remote_qpn; in cm_req_handler()
2461 struct cm_timewait_info *timewait_info; in cm_rep_handler() local
2490 cm_id_priv->timewait_info->work.remote_id = in cm_rep_handler()
2492 cm_id_priv->timewait_info->remote_ca_guid = in cm_rep_handler()
2494 cm_id_priv->timewait_info->remote_qpn = cm_rep_get_qpn(rep_msg, cm_id_priv->qp_type); in cm_rep_handler()
2498 if (cm_insert_remote_id(cm_id_priv->timewait_info)) { in cm_rep_handler()
2507 timewait_info = cm_insert_remote_qpn(cm_id_priv->timewait_info); in cm_rep_handler()
2508 if (timewait_info) { in cm_rep_handler()
2510 cur_cm_id_priv = cm_acquire_id(timewait_info->work.local_id, in cm_rep_handler()
2511 timewait_info->work.remote_id); in cm_rep_handler()
3422 struct cm_timewait_info *timewait_info; in cm_timewait_handler() local
3425 timewait_info = container_of(work, struct cm_timewait_info, work); in cm_timewait_handler()
3427 list_del(&timewait_info->list); in cm_timewait_handler()
3430 cm_id_priv = cm_acquire_id(timewait_info->work.local_id, in cm_timewait_handler()
3431 timewait_info->work.remote_id); in cm_timewait_handler()
3437 cm_id_priv->remote_qpn != timewait_info->remote_qpn) { in cm_timewait_handler()
4518 struct cm_timewait_info *timewait_info, *tmp; in ib_cm_cleanup() local
4521 list_for_each_entry(timewait_info, &cm.timewait_list, list) in ib_cm_cleanup()
4522 cancel_delayed_work(&timewait_info->work.work); in ib_cm_cleanup()
4528 list_for_each_entry_safe(timewait_info, tmp, &cm.timewait_list, list) { in ib_cm_cleanup()
4529 list_del(&timewait_info->list); in ib_cm_cleanup()
4530 kfree(timewait_info); in ib_cm_cleanup()