Lines Matching refs:iwdev

170 	ibdev_dbg(&cm_node->iwdev->ibdev,  in irdma_send_cm_event()
251 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_create_event()
267 struct irdma_device *iwdev = cm_node->iwdev; in irdma_free_retrans_entry() local
275 irdma_free_sqbuf(&iwdev->vsi, send_entry->sqbuf); in irdma_free_retrans_entry()
308 struct irdma_sc_vsi *vsi = &cm_node->iwdev->vsi; in irdma_form_ah_cm_frame()
317 ibdev_dbg(&cm_node->iwdev->ibdev, "CM: AH invalid\n"); in irdma_form_ah_cm_frame()
323 ibdev_dbg(&cm_node->iwdev->ibdev, "CM: SQ buf NULL\n"); in irdma_form_ah_cm_frame()
417 struct irdma_sc_vsi *vsi = &cm_node->iwdev->vsi; in irdma_form_uda_cm_frame()
604 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_send_reset()
626 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_active_open_err()
647 ibdev_dbg(&cm_node->iwdev->ibdev, "CM: cm_node=%p state =%d\n", in irdma_passive_open_err()
672 if (!iwqp || !iwqp->iwdev) in irdma_event_connect_error()
707 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_process_options()
727 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_process_options()
758 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_handle_tcp_options()
819 if (cm_node->iwdev->iw_ooo) { in irdma_build_mpa_v2()
902 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_send_mpa_request()
1011 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_negotiate_mpa_v2_ird_ord()
1034 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_parse_mpa()
1044 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_parse_mpa()
1050 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_parse_mpa()
1056 ibdev_dbg(&cm_node->iwdev->ibdev, "CM: rev %d\n", in irdma_parse_mpa()
1065 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_parse_mpa()
1072 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_parse_mpa()
1079 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_parse_mpa()
1086 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_parse_mpa()
1133 struct irdma_sc_vsi *vsi = &cm_node->iwdev->vsi; in irdma_schedule_cm_timer()
1158 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_schedule_cm_timer()
1332 vsi = &cm_node->iwdev->vsi; in irdma_cm_timer_tick()
1432 struct irdma_sc_vsi *vsi = &cm_node->iwdev->vsi; in irdma_send_ack()
1507 static int irdma_del_multiple_qhash(struct irdma_device *iwdev, in irdma_del_multiple_qhash() argument
1516 spin_lock_irqsave(&iwdev->cm_core.listen_list_lock, flags); in irdma_del_multiple_qhash()
1522 ibdev_dbg(&iwdev->ibdev, in irdma_del_multiple_qhash()
1528 ibdev_dbg(&iwdev->ibdev, in irdma_del_multiple_qhash()
1539 ret = irdma_manage_qhash(iwdev, cm_info, in irdma_del_multiple_qhash()
1547 ibdev_dbg(&iwdev->ibdev, in irdma_del_multiple_qhash()
1553 spin_unlock_irqrestore(&iwdev->cm_core.listen_list_lock, flags); in irdma_del_multiple_qhash()
1655 static int irdma_add_mqh_6(struct irdma_device *iwdev, in irdma_add_mqh_6() argument
1672 (rdma_vlan_dev_real_dev(ip_dev) != iwdev->netdev)) && in irdma_add_mqh_6()
1673 ip_dev != iwdev->netdev) in irdma_add_mqh_6()
1678 ibdev_dbg(&iwdev->ibdev, "CM: idev == NULL\n"); in irdma_add_mqh_6()
1682 ibdev_dbg(&iwdev->ibdev, "CM: IP=%pI6, vlan_id=%d, MAC=%pM\n", in irdma_add_mqh_6()
1686 ibdev_dbg(&iwdev->ibdev, "CM: Allocating child listener %p\n", in irdma_add_mqh_6()
1689 ibdev_dbg(&iwdev->ibdev, "CM: listener memory allocation\n"); in irdma_add_mqh_6()
1702 if (!iwdev->vsi.dscp_mode) in irdma_add_mqh_6()
1708 ret = irdma_manage_qhash(iwdev, cm_info, in irdma_add_mqh_6()
1717 trace_irdma_add_mqh_6(iwdev, child_listen_node, in irdma_add_mqh_6()
1721 spin_lock_irqsave(&iwdev->cm_core.listen_list_lock, flags); in irdma_add_mqh_6()
1724 spin_unlock_irqrestore(&iwdev->cm_core.listen_list_lock, flags); in irdma_add_mqh_6()
1743 static int irdma_add_mqh_4(struct irdma_device *iwdev, in irdma_add_mqh_4() argument
1760 (rdma_vlan_dev_real_dev(ip_dev) != iwdev->netdev)) && in irdma_add_mqh_4()
1761 ip_dev != iwdev->netdev) in irdma_add_mqh_4()
1769 ibdev_dbg(&iwdev->ibdev, in irdma_add_mqh_4()
1775 ibdev_dbg(&iwdev->ibdev, "CM: Allocating child listener %p\n", in irdma_add_mqh_4()
1778 ibdev_dbg(&iwdev->ibdev, "CM: listener memory allocation\n"); in irdma_add_mqh_4()
1792 if (!iwdev->vsi.dscp_mode) in irdma_add_mqh_4()
1797 ret = irdma_manage_qhash(iwdev, cm_info, in irdma_add_mqh_4()
1808 trace_irdma_add_mqh_4(iwdev, child_listen_node, in irdma_add_mqh_4()
1812 spin_lock_irqsave(&iwdev->cm_core.listen_list_lock, in irdma_add_mqh_4()
1816 spin_unlock_irqrestore(&iwdev->cm_core.listen_list_lock, flags); in irdma_add_mqh_4()
1832 static int irdma_add_mqh(struct irdma_device *iwdev, in irdma_add_mqh() argument
1837 return irdma_add_mqh_4(iwdev, cm_info, cm_listen_node); in irdma_add_mqh()
1839 return irdma_add_mqh_6(iwdev, cm_info, cm_listen_node); in irdma_add_mqh()
1904 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_dec_refcnt_listen()
1920 irdma_del_apbvt(listener->iwdev, in irdma_dec_refcnt_listen()
1927 nfo.qh_qpid = listener->iwdev->vsi.ilq->qp_id; in irdma_dec_refcnt_listen()
1930 irdma_del_multiple_qhash(listener->iwdev, &nfo, in irdma_dec_refcnt_listen()
1934 irdma_manage_qhash(listener->iwdev, in irdma_dec_refcnt_listen()
1943 ibdev_dbg(&listener->iwdev->ibdev, in irdma_dec_refcnt_listen()
1979 static int irdma_addr_resolve_neigh(struct irdma_device *iwdev, u32 src_ip, in irdma_addr_resolve_neigh() argument
1991 ibdev_dbg(&iwdev->ibdev, "CM: ip_route_output fail\n"); in irdma_addr_resolve_neigh()
2000 rc = irdma_add_arp(iwdev->rf, &dst_ip, true, neigh->ha); in irdma_addr_resolve_neigh()
2042 static int irdma_addr_resolve_neigh_ipv6(struct irdma_device *iwdev, u32 *src, in irdma_addr_resolve_neigh_ipv6() argument
2059 ibdev_dbg(&iwdev->ibdev, in irdma_addr_resolve_neigh_ipv6()
2070 ibdev_dbg(&iwdev->ibdev, "CM: dst_neigh_lookup MAC=%pM\n", in irdma_addr_resolve_neigh_ipv6()
2073 trace_irdma_addr_resolve(iwdev, neigh->ha); in irdma_addr_resolve_neigh_ipv6()
2076 rc = irdma_add_arp(iwdev->rf, dest, false, neigh->ha); in irdma_addr_resolve_neigh_ipv6()
2172 struct irdma_device *iwdev = cm_node->iwdev; in irdma_cm_create_ah() local
2174 ether_addr_copy(ah_info.mac_addr, iwdev->netdev->dev_addr); in irdma_cm_create_ah()
2178 ah_info.vsi = &iwdev->vsi; in irdma_cm_create_ah()
2202 irdma_arp_table(iwdev->rf, ah_info.dest_ip_addr, in irdma_cm_create_ah()
2205 if (irdma_puda_create_ah(&iwdev->rf->sc_dev, &ah_info, wait, in irdma_cm_create_ah()
2220 struct irdma_device *iwdev = cm_node->iwdev; in irdma_cm_free_ah() local
2223 irdma_puda_free_ah(&iwdev->rf->sc_dev, cm_node->ah); in irdma_cm_free_ah()
2235 irdma_make_cm_node(struct irdma_cm_core *cm_core, struct irdma_device *iwdev, in irdma_make_cm_node() argument
2242 struct net_device *netdev = iwdev->netdev; in irdma_make_cm_node()
2252 if (cm_node->vlan_id >= VLAN_N_VID && iwdev->dcb_vlan_mode) in irdma_make_cm_node()
2258 ibdev_warn(&iwdev->ibdev, in irdma_make_cm_node()
2261 if (iwdev->vsi.dscp_mode) { in irdma_make_cm_node()
2271 ibdev_dbg(&iwdev->ibdev, in irdma_make_cm_node()
2274 trace_irdma_listener_tos(iwdev, cm_node->tos, in irdma_make_cm_node()
2284 cm_node->iwdev = iwdev; in irdma_make_cm_node()
2285 cm_node->dev = &iwdev->rf->sc_dev; in irdma_make_cm_node()
2301 cm_node->tcp_cntxt.rcv_wscale = iwdev->rcv_wscale; in irdma_make_cm_node()
2302 cm_node->tcp_cntxt.rcv_wnd = iwdev->rcv_wnd >> cm_node->tcp_cntxt.rcv_wscale; in irdma_make_cm_node()
2308 cm_node->tcp_cntxt.mss = iwdev->vsi.mtu - IRDMA_MTU_TO_MSS_IPV4; in irdma_make_cm_node()
2321 cm_node->tcp_cntxt.mss = iwdev->vsi.mtu - IRDMA_MTU_TO_MSS_IPV6; in irdma_make_cm_node()
2329 arpindex = irdma_arp_table(iwdev->rf, cm_node->rem_addr, in irdma_make_cm_node()
2333 oldarpindex = irdma_arp_table(iwdev->rf, cm_node->rem_addr, in irdma_make_cm_node()
2337 arpindex = irdma_addr_resolve_neigh(iwdev, in irdma_make_cm_node()
2342 arpindex = irdma_addr_resolve_neigh_ipv6(iwdev, in irdma_make_cm_node()
2354 iwdev->rf->arp_table[arpindex].mac_addr); in irdma_make_cm_node()
2373 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_destroy_connection()
2383 irdma_del_apbvt(cm_node->iwdev, cm_node->apbvt_entry); in irdma_destroy_connection()
2388 nfo.qh_qpid = cm_node->iwdev->vsi.ilq->qp_id; in irdma_destroy_connection()
2389 irdma_manage_qhash(cm_node->iwdev, &nfo, in irdma_destroy_connection()
2406 nfo.qh_qpid = cm_node->iwdev->vsi.ilq->qp_id; in irdma_destroy_connection()
2407 irdma_manage_qhash(cm_node->iwdev, &nfo, in irdma_destroy_connection()
2497 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_handle_fin_pkt()
2511 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_handle_rst_pkt()
2588 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_handle_rcv_mpa()
2608 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_handle_rcv_mpa()
2651 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_check_seq()
2662 nfo.qh_qpid = cm_node->iwdev->vsi.ilq->qp_id; in irdma_add_conn_est_qh()
2663 irdma_manage_qhash(cm_node->iwdev, &nfo, in irdma_add_conn_est_qh()
2756 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_handle_synack_pkt()
2764 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_handle_synack_pkt()
2774 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_handle_synack_pkt()
2948 struct irdma_device *iwdev, in irdma_make_listen_node() argument
2989 listener->iwdev = iwdev; in irdma_make_listen_node()
3012 struct irdma_device *iwdev, in irdma_create_cm_node() argument
3022 cm_node = irdma_make_cm_node(cm_core, iwdev, cm_info, NULL); in irdma_create_cm_node()
3076 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_cm_reject()
3122 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_cm_close()
3145 struct irdma_device *iwdev = vsi->back_vsi; in irdma_receive_ilq() local
3146 struct irdma_cm_core *cm_core = &iwdev->cm_core; in irdma_receive_ilq()
3154 if (iwdev->rf->sc_dev.hw_attrs.uk_attrs.hw_rev >= IRDMA_GEN_2) { in irdma_receive_ilq()
3171 ibdev_dbg(&cm_core->iwdev->ibdev, in irdma_receive_ilq()
3213 ibdev_dbg(&cm_core->iwdev->ibdev, in irdma_receive_ilq()
3219 cm_node = irdma_make_cm_node(cm_core, iwdev, &cm_info, in irdma_receive_ilq()
3222 ibdev_dbg(&cm_core->iwdev->ibdev, in irdma_receive_ilq()
3261 int irdma_setup_cm_core(struct irdma_device *iwdev, u8 rdma_ver) in irdma_setup_cm_core() argument
3263 struct irdma_cm_core *cm_core = &iwdev->cm_core; in irdma_setup_cm_core()
3265 cm_core->iwdev = iwdev; in irdma_setup_cm_core()
3266 cm_core->dev = &iwdev->rf->sc_dev; in irdma_setup_cm_core()
3309 cm_core->dev->ws_reset(&cm_core->iwdev->vsi); in irdma_cleanup_cm_core()
3323 tcp_info->drop_ooo_seg = !iwqp->iwdev->iw_ooo; in irdma_init_tcp_ctx()
3365 tcp_info->arp_idx = (u16)irdma_arp_table(iwqp->iwdev->rf, in irdma_init_tcp_ctx()
3377 tcp_info->arp_idx = (u16)irdma_arp_table(iwqp->iwdev->rf, in irdma_init_tcp_ctx()
3422 iwqp->tcp_info.src_mac_addr_idx = iwqp->iwdev->mac_ip_table_idx; in irdma_cm_init_tsa_conn()
3442 struct irdma_device *iwdev = iwqp->iwdev; in irdma_cm_disconn() local
3450 spin_lock_irqsave(&iwdev->rf->qptable_lock, flags); in irdma_cm_disconn()
3451 if (!iwdev->rf->qp_table[iwqp->ibqp.qp_num]) { in irdma_cm_disconn()
3452 spin_unlock_irqrestore(&iwdev->rf->qptable_lock, flags); in irdma_cm_disconn()
3453 ibdev_dbg(&iwdev->ibdev, in irdma_cm_disconn()
3460 spin_unlock_irqrestore(&iwdev->rf->qptable_lock, flags); in irdma_cm_disconn()
3464 queue_work(iwdev->cleanup_wq, &work->work); in irdma_cm_disconn()
3473 struct irdma_device *iwdev = iwqp->iwdev; in irdma_qp_disconnect() local
3477 ibdev_dbg(&iwdev->ibdev, "CM: Call close API\n"); in irdma_qp_disconnect()
3488 struct irdma_device *iwdev; in irdma_cm_disconn_true() local
3500 iwdev = iwqp->iwdev; in irdma_cm_disconn_true()
3502 if (rdma_protocol_roce(&iwdev->ibdev, 1)) { in irdma_cm_disconn_true()
3544 last_ae == IRDMA_AE_LLP_CONNECTION_RESET || iwdev->rf->reset || !cm_id) { in irdma_cm_disconn_true()
3566 spin_lock_irqsave(&iwdev->cm_core.ht_lock, flags); in irdma_cm_disconn_true()
3568 spin_unlock_irqrestore(&iwdev->cm_core.ht_lock, flags); in irdma_cm_disconn_true()
3573 spin_unlock_irqrestore(&iwdev->cm_core.ht_lock, flags); in irdma_cm_disconn_true()
3580 ibdev_dbg(&iwdev->ibdev, in irdma_cm_disconn_true()
3589 ibdev_dbg(&iwdev->ibdev, in irdma_cm_disconn_true()
3617 struct irdma_device *iwdev; in irdma_free_lsmm_rsrc() local
3619 iwdev = iwqp->iwdev; in irdma_free_lsmm_rsrc()
3623 iwdev->ibdev.ops.dereg_mr(iwqp->lsmm_mr, NULL); in irdma_free_lsmm_rsrc()
3624 dma_free_coherent(iwdev->rf->sc_dev.hw->device, in irdma_free_lsmm_rsrc()
3640 struct irdma_device *iwdev; in irdma_accept() local
3658 iwdev = iwqp->iwdev; in irdma_accept()
3659 dev = &iwdev->rf->sc_dev; in irdma_accept()
3670 ibdev_dbg(&iwdev->ibdev, "CM: Accept vlan_id=%d\n", in irdma_accept()
3752 ibdev_dbg(&iwdev->ibdev, in irdma_accept()
3770 ibdev_dbg(&iwdev->ibdev, in irdma_accept()
3792 struct irdma_device *iwdev; in irdma_reject() local
3800 iwdev = to_iwdev(cm_id->device); in irdma_reject()
3801 if (!iwdev) in irdma_reject()
3821 struct irdma_device *iwdev; in irdma_connect() local
3836 iwdev = iwqp->iwdev; in irdma_connect()
3837 if (!iwdev) in irdma_connect()
3854 if (iwdev->vsi.mtu < IRDMA_MIN_MTU_IPV4) in irdma_connect()
3866 if (iwdev->vsi.mtu < IRDMA_MIN_MTU_IPV6) in irdma_connect()
3880 cm_info.qh_qpid = iwdev->vsi.ilq->qp_id; in irdma_connect()
3882 if (iwdev->vsi.dscp_mode) { in irdma_connect()
3896 ibdev_dbg(&iwdev->ibdev, "DCB: TOS:[%d] UP:[%d]\n", cm_id->tos, in irdma_connect()
3899 trace_irdma_dcb_tos(iwdev, cm_id->tos, cm_info.user_pri); in irdma_connect()
3901 ret = irdma_create_cm_node(&iwdev->cm_core, iwdev, conn_param, &cm_info, in irdma_connect()
3908 if (irdma_manage_qhash(iwdev, &cm_info, in irdma_connect()
3916 cm_node->apbvt_entry = irdma_add_apbvt(iwdev, cm_info.loc_port); in irdma_connect()
3936 ibdev_dbg(&iwdev->ibdev, in irdma_connect()
3947 ibdev_dbg(&iwdev->ibdev, in irdma_connect()
3951 ibdev_dbg(&iwdev->ibdev, in irdma_connect()
3955 iwdev->cm_core.stats_connect_errs++; in irdma_connect()
3967 struct irdma_device *iwdev; in irdma_create_listen() local
3975 iwdev = to_iwdev(cm_id->device); in irdma_create_listen()
3976 if (!iwdev) in irdma_create_listen()
3981 cm_info.qh_qpid = iwdev->vsi.ilq->qp_id; in irdma_create_listen()
3984 if (iwdev->vsi.mtu < IRDMA_MIN_MTU_IPV4) in irdma_create_listen()
3998 if (iwdev->vsi.mtu < IRDMA_MIN_MTU_IPV6) in irdma_create_listen()
4014 if (cm_info.vlan_id >= VLAN_N_VID && iwdev->dcb_vlan_mode) in irdma_create_listen()
4019 trace_irdma_create_listen(iwdev, &cm_info); in irdma_create_listen()
4021 cm_listen_node = irdma_make_listen_node(&iwdev->cm_core, iwdev, in irdma_create_listen()
4024 ibdev_dbg(&iwdev->ibdev, in irdma_create_listen()
4032 if (iwdev->vsi.dscp_mode) in irdma_create_listen()
4034 iwdev->vsi.dscp_map[irdma_tos2dscp(cm_id->tos)]; in irdma_create_listen()
4040 err = irdma_add_mqh(iwdev, &cm_info, cm_listen_node); in irdma_create_listen()
4044 if (!iwdev->vsi.dscp_mode) in irdma_create_listen()
4050 err = irdma_manage_qhash(iwdev, &cm_info, in irdma_create_listen()
4060 cm_listen_node->apbvt_entry = irdma_add_apbvt(iwdev, in irdma_create_listen()
4067 ibdev_dbg(&iwdev->ibdev, in irdma_create_listen()
4077 irdma_cm_del_listen(&iwdev->cm_core, cm_listen_node, false); in irdma_create_listen()
4088 struct irdma_device *iwdev; in irdma_destroy_listen() local
4090 iwdev = to_iwdev(cm_id->device); in irdma_destroy_listen()
4092 irdma_cm_del_listen(&iwdev->cm_core, cm_id->provider_data, in irdma_destroy_listen()
4095 ibdev_dbg(&iwdev->ibdev, in irdma_destroy_listen()
4136 struct irdma_device *iwdev; in irdma_cm_event_connected() local
4148 iwdev = iwqp->iwdev; in irdma_cm_event_connected()
4149 dev = &iwdev->rf->sc_dev; in irdma_cm_event_connected()
4171 ibdev_dbg(&iwdev->ibdev, in irdma_cm_event_connected()
4208 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_cm_event_reset()
4260 ibdev_dbg(&cm_node->iwdev->ibdev, in irdma_cm_event_handler()
4289 void irdma_cm_teardown_connections(struct irdma_device *iwdev, u32 *ipaddr, in irdma_cm_teardown_connections() argument
4293 struct irdma_cm_core *cm_core = &iwdev->cm_core; in irdma_cm_teardown_connections()
4311 if (iwdev->rf->reset) in irdma_cm_teardown_connections()
4332 static void irdma_qhash_ctrl(struct irdma_device *iwdev, in irdma_qhash_ctrl() argument
4368 err = irdma_manage_qhash(iwdev, nfo, IRDMA_QHASH_TYPE_TCP_SYN, op, NULL, in irdma_qhash_ctrl()
4388 void irdma_if_notify(struct irdma_device *iwdev, struct net_device *netdev, in irdma_if_notify() argument
4391 struct irdma_cm_core *cm_core = &iwdev->cm_core; in irdma_if_notify()
4418 irdma_qhash_ctrl(iwdev, listen_node, &nfo, ipaddr, ipv4, in irdma_if_notify()
4422 if (!irdma_manage_qhash(iwdev, &nfo, in irdma_if_notify()
4432 irdma_cm_teardown_connections(iwdev, ipaddr, &nfo, false); in irdma_if_notify()