cm_node 562 drivers/infiniband/hw/i40iw/i40iw.h int i40iw_send_syn(struct i40iw_cm_node *cm_node, u32 sendack); cm_node 563 drivers/infiniband/hw/i40iw/i40iw.h int i40iw_send_reset(struct i40iw_cm_node *cm_node); cm_node 124 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_record_ird_ord(struct i40iw_cm_node *cm_node, u32 conn_ird, cm_node 132 drivers/infiniband/hw/i40iw/i40iw_cm.c else if (!conn_ord && cm_node->send_rdma0_op == SEND_RDMA_READ_ZERO) cm_node 135 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->ird_size = conn_ird; cm_node 136 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->ord_size = conn_ord; cm_node 170 drivers/infiniband/hw/i40iw/i40iw_cm.c static inline void i40iw_fill_sockaddr4(struct i40iw_cm_node *cm_node, cm_node 179 drivers/infiniband/hw/i40iw/i40iw_cm.c laddr->sin_port = htons(cm_node->loc_port); cm_node 180 drivers/infiniband/hw/i40iw/i40iw_cm.c raddr->sin_port = htons(cm_node->rem_port); cm_node 182 drivers/infiniband/hw/i40iw/i40iw_cm.c laddr->sin_addr.s_addr = htonl(cm_node->loc_addr[0]); cm_node 183 drivers/infiniband/hw/i40iw/i40iw_cm.c raddr->sin_addr.s_addr = htonl(cm_node->rem_addr[0]); cm_node 191 drivers/infiniband/hw/i40iw/i40iw_cm.c static inline void i40iw_fill_sockaddr6(struct i40iw_cm_node *cm_node, cm_node 200 drivers/infiniband/hw/i40iw/i40iw_cm.c laddr6->sin6_port = htons(cm_node->loc_port); cm_node 201 drivers/infiniband/hw/i40iw/i40iw_cm.c raddr6->sin6_port = htons(cm_node->rem_port); cm_node 204 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->loc_addr); cm_node 206 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->rem_addr); cm_node 214 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_get_addr_info(struct i40iw_cm_node *cm_node, cm_node 217 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_info->ipv4 = cm_node->ipv4; cm_node 218 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_info->vlan_id = cm_node->vlan_id; cm_node 219 drivers/infiniband/hw/i40iw/i40iw_cm.c memcpy(cm_info->loc_addr, cm_node->loc_addr, sizeof(cm_info->loc_addr)); cm_node 220 drivers/infiniband/hw/i40iw/i40iw_cm.c memcpy(cm_info->rem_addr, cm_node->rem_addr, sizeof(cm_info->rem_addr)); cm_node 221 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_info->loc_port = cm_node->loc_port; cm_node 222 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_info->rem_port = cm_node->rem_port; cm_node 223 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_info->user_pri = cm_node->user_pri; cm_node 232 drivers/infiniband/hw/i40iw/i40iw_cm.c static inline void i40iw_get_cmevent_info(struct i40iw_cm_node *cm_node, cm_node 240 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node) { cm_node 241 drivers/infiniband/hw/i40iw/i40iw_cm.c event->private_data = (void *)cm_node->pdata_buf; cm_node 242 drivers/infiniband/hw/i40iw/i40iw_cm.c event->private_data_len = (u8)cm_node->pdata.size; cm_node 243 drivers/infiniband/hw/i40iw/i40iw_cm.c event->ird = cm_node->ird_size; cm_node 244 drivers/infiniband/hw/i40iw/i40iw_cm.c event->ord = cm_node->ord_size; cm_node 255 drivers/infiniband/hw/i40iw/i40iw_cm.c static int i40iw_send_cm_event(struct i40iw_cm_node *cm_node, cm_node 267 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->ipv4) cm_node 268 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_fill_sockaddr4(cm_node, &event); cm_node 270 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_fill_sockaddr6(cm_node, &event); cm_node 271 drivers/infiniband/hw/i40iw/i40iw_cm.c event.provider_data = (void *)cm_node; cm_node 272 drivers/infiniband/hw/i40iw/i40iw_cm.c event.private_data = (void *)cm_node->pdata_buf; cm_node 273 drivers/infiniband/hw/i40iw/i40iw_cm.c event.private_data_len = (u8)cm_node->pdata.size; cm_node 274 drivers/infiniband/hw/i40iw/i40iw_cm.c event.ird = cm_node->ird_size; cm_node 277 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_get_cmevent_info(cm_node, cm_id, &event); cm_node 280 drivers/infiniband/hw/i40iw/i40iw_cm.c event.ird = cm_node->ird_size; cm_node 281 drivers/infiniband/hw/i40iw/i40iw_cm.c event.ord = cm_node->ord_size; cm_node 299 drivers/infiniband/hw/i40iw/i40iw_cm.c static struct i40iw_cm_event *i40iw_create_event(struct i40iw_cm_node *cm_node, cm_node 304 drivers/infiniband/hw/i40iw/i40iw_cm.c if (!cm_node->cm_id) cm_node 313 drivers/infiniband/hw/i40iw/i40iw_cm.c event->cm_node = cm_node; cm_node 314 drivers/infiniband/hw/i40iw/i40iw_cm.c memcpy(event->cm_info.rem_addr, cm_node->rem_addr, sizeof(event->cm_info.rem_addr)); cm_node 315 drivers/infiniband/hw/i40iw/i40iw_cm.c memcpy(event->cm_info.loc_addr, cm_node->loc_addr, sizeof(event->cm_info.loc_addr)); cm_node 316 drivers/infiniband/hw/i40iw/i40iw_cm.c event->cm_info.rem_port = cm_node->rem_port; cm_node 317 drivers/infiniband/hw/i40iw/i40iw_cm.c event->cm_info.loc_port = cm_node->loc_port; cm_node 318 drivers/infiniband/hw/i40iw/i40iw_cm.c event->cm_info.cm_id = cm_node->cm_id; cm_node 320 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_debug(cm_node->dev, cm_node 323 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node, cm_node 337 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_free_retrans_entry(struct i40iw_cm_node *cm_node) cm_node 339 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_device *iwdev = cm_node->iwdev; cm_node 342 drivers/infiniband/hw/i40iw/i40iw_cm.c send_entry = cm_node->send_entry; cm_node 344 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->send_entry = NULL; cm_node 347 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_dec(&cm_node->ref_count); cm_node 355 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_cleanup_retrans_entry(struct i40iw_cm_node *cm_node) cm_node 359 drivers/infiniband/hw/i40iw/i40iw_cm.c spin_lock_irqsave(&cm_node->retrans_list_lock, flags); cm_node 360 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_free_retrans_entry(cm_node); cm_node 361 drivers/infiniband/hw/i40iw/i40iw_cm.c spin_unlock_irqrestore(&cm_node->retrans_list_lock, flags); cm_node 372 drivers/infiniband/hw/i40iw/i40iw_cm.c static struct i40iw_puda_buf *i40iw_form_cm_frame(struct i40iw_cm_node *cm_node, cm_node 379 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_sc_vsi *vsi = &cm_node->iwdev->vsi; cm_node 407 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->vlan_id <= VLAN_VID_MASK) cm_node 410 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->ipv4) cm_node 421 drivers/infiniband/hw/i40iw/i40iw_cm.c sqbuf->scratch = (void *)cm_node; cm_node 426 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->ipv4) { cm_node 434 drivers/infiniband/hw/i40iw/i40iw_cm.c ether_addr_copy(ethh->h_dest, cm_node->rem_mac); cm_node 435 drivers/infiniband/hw/i40iw/i40iw_cm.c ether_addr_copy(ethh->h_source, cm_node->loc_mac); cm_node 436 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->vlan_id <= VLAN_VID_MASK) { cm_node 438 drivers/infiniband/hw/i40iw/i40iw_cm.c vtag = (cm_node->user_pri << VLAN_PRIO_SHIFT) | cm_node->vlan_id; cm_node 448 drivers/infiniband/hw/i40iw/i40iw_cm.c iph->tos = cm_node->tos; cm_node 450 drivers/infiniband/hw/i40iw/i40iw_cm.c iph->id = htons(++cm_node->tcp_cntxt.loc_id); cm_node 455 drivers/infiniband/hw/i40iw/i40iw_cm.c iph->saddr = htonl(cm_node->loc_addr[0]); cm_node 456 drivers/infiniband/hw/i40iw/i40iw_cm.c iph->daddr = htonl(cm_node->rem_addr[0]); cm_node 464 drivers/infiniband/hw/i40iw/i40iw_cm.c ether_addr_copy(ethh->h_dest, cm_node->rem_mac); cm_node 465 drivers/infiniband/hw/i40iw/i40iw_cm.c ether_addr_copy(ethh->h_source, cm_node->loc_mac); cm_node 466 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->vlan_id <= VLAN_VID_MASK) { cm_node 468 drivers/infiniband/hw/i40iw/i40iw_cm.c vtag = (cm_node->user_pri << VLAN_PRIO_SHIFT) | cm_node->vlan_id; cm_node 475 drivers/infiniband/hw/i40iw/i40iw_cm.c ip6h->priority = cm_node->tos >> 4; cm_node 476 drivers/infiniband/hw/i40iw/i40iw_cm.c ip6h->flow_lbl[0] = cm_node->tos << 4; cm_node 483 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->loc_addr); cm_node 485 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->rem_addr); cm_node 488 drivers/infiniband/hw/i40iw/i40iw_cm.c tcph->source = htons(cm_node->loc_port); cm_node 489 drivers/infiniband/hw/i40iw/i40iw_cm.c tcph->dest = htons(cm_node->rem_port); cm_node 491 drivers/infiniband/hw/i40iw/i40iw_cm.c tcph->seq = htonl(cm_node->tcp_cntxt.loc_seq_num); cm_node 494 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.loc_ack_num = cm_node->tcp_cntxt.rcv_nxt; cm_node 495 drivers/infiniband/hw/i40iw/i40iw_cm.c tcph->ack_seq = htonl(cm_node->tcp_cntxt.loc_ack_num); cm_node 502 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.loc_seq_num++; cm_node 505 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.loc_seq_num += hdr_len + pd_len; cm_node 509 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.loc_seq_num++; cm_node 518 drivers/infiniband/hw/i40iw/i40iw_cm.c tcph->window = htons(cm_node->tcp_cntxt.rcv_wnd); cm_node 543 drivers/infiniband/hw/i40iw/i40iw_cm.c int i40iw_send_reset(struct i40iw_cm_node *cm_node) cm_node 548 drivers/infiniband/hw/i40iw/i40iw_cm.c sqbuf = i40iw_form_cm_frame(cm_node, NULL, NULL, NULL, flags); cm_node 554 drivers/infiniband/hw/i40iw/i40iw_cm.c return i40iw_schedule_cm_timer(cm_node, sqbuf, I40IW_TIMER_TYPE_SEND, 0, 1); cm_node 562 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_active_open_err(struct i40iw_cm_node *cm_node, bool reset) cm_node 564 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 565 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->cm_core->stats_connect_errs++; cm_node 567 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_debug(cm_node->dev, cm_node 571 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node, cm_node 572 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state); cm_node 573 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_inc(&cm_node->ref_count); cm_node 574 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_reset(cm_node); cm_node 577 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_CLOSED; cm_node 578 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_create_event(cm_node, I40IW_CM_EVENT_ABORTED); cm_node 586 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_passive_open_err(struct i40iw_cm_node *cm_node, bool reset) cm_node 588 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 589 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->cm_core->stats_passive_errs++; cm_node 590 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_CLOSED; cm_node 591 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_debug(cm_node->dev, cm_node 595 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node, cm_node 596 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state); cm_node 598 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_reset(cm_node); cm_node 600 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 612 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_id = event->cm_node->cm_id; cm_node 623 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_cm_event(event->cm_node, cm_id, cm_node 627 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(event->cm_node); cm_node 637 drivers/infiniband/hw/i40iw/i40iw_cm.c static int i40iw_process_options(struct i40iw_cm_node *cm_node, cm_node 657 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_debug(cm_node->dev, cm_node 668 drivers/infiniband/hw/i40iw/i40iw_cm.c if (tmp > 0 && tmp < cm_node->tcp_cntxt.mss) cm_node 669 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.mss = tmp; cm_node 672 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.snd_wscale = cm_node 676 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_debug(cm_node->dev, cm_node 685 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.mss = I40IW_CM_DEFAULT_MSS; cm_node 696 drivers/infiniband/hw/i40iw/i40iw_cm.c static int i40iw_handle_tcp_options(struct i40iw_cm_node *cm_node, cm_node 704 drivers/infiniband/hw/i40iw/i40iw_cm.c if (i40iw_process_options(cm_node, cm_node 708 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_debug(cm_node->dev, cm_node 712 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node); cm_node 714 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_passive_open_err(cm_node, true); cm_node 716 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_active_open_err(cm_node, true); cm_node 721 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.snd_wnd = ntohs(tcph->window) << cm_node 722 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.snd_wscale; cm_node 724 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->tcp_cntxt.snd_wnd > cm_node->tcp_cntxt.max_snd_wnd) cm_node 725 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.max_snd_wnd = cm_node->tcp_cntxt.snd_wnd; cm_node 734 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_build_mpa_v1(struct i40iw_cm_node *cm_node, cm_node 751 drivers/infiniband/hw/i40iw/i40iw_cm.c mpa_frame->rev = cm_node->mpa_frame_rev; cm_node 752 drivers/infiniband/hw/i40iw/i40iw_cm.c mpa_frame->priv_data_len = htons(cm_node->pdata.size); cm_node 761 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_build_mpa_v2(struct i40iw_cm_node *cm_node, cm_node 770 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_build_mpa_v1(cm_node, start_addr, mpa_key); cm_node 775 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->mpav2_ird_ord == IETF_NO_IRD_ORD) { cm_node 779 drivers/infiniband/hw/i40iw/i40iw_cm.c ctrl_ird = (cm_node->ird_size > IETF_NO_IRD_ORD) ? cm_node 780 drivers/infiniband/hw/i40iw/i40iw_cm.c IETF_NO_IRD_ORD : cm_node->ird_size; cm_node 781 drivers/infiniband/hw/i40iw/i40iw_cm.c ctrl_ord = (cm_node->ord_size > IETF_NO_IRD_ORD) ? cm_node 782 drivers/infiniband/hw/i40iw/i40iw_cm.c IETF_NO_IRD_ORD : cm_node->ord_size; cm_node 793 drivers/infiniband/hw/i40iw/i40iw_cm.c switch (cm_node->send_rdma0_op) { cm_node 815 drivers/infiniband/hw/i40iw/i40iw_cm.c static int i40iw_cm_build_mpa_frame(struct i40iw_cm_node *cm_node, cm_node 821 drivers/infiniband/hw/i40iw/i40iw_cm.c switch (cm_node->mpa_frame_rev) { cm_node 824 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_build_mpa_v1(cm_node, mpa->addr, mpa_key); cm_node 828 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_build_mpa_v2(cm_node, mpa->addr, mpa_key); cm_node 841 drivers/infiniband/hw/i40iw/i40iw_cm.c static int i40iw_send_mpa_request(struct i40iw_cm_node *cm_node) cm_node 845 drivers/infiniband/hw/i40iw/i40iw_cm.c if (!cm_node) { cm_node 850 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->mpa_hdr.addr = &cm_node->mpa_frame; cm_node 851 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->mpa_hdr.size = i40iw_cm_build_mpa_frame(cm_node, cm_node 852 drivers/infiniband/hw/i40iw/i40iw_cm.c &cm_node->mpa_hdr, cm_node 854 drivers/infiniband/hw/i40iw/i40iw_cm.c if (!cm_node->mpa_hdr.size) { cm_node 855 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_pr_err("mpa size = %d\n", cm_node->mpa_hdr.size); cm_node 859 drivers/infiniband/hw/i40iw/i40iw_cm.c sqbuf = i40iw_form_cm_frame(cm_node, cm_node 861 drivers/infiniband/hw/i40iw/i40iw_cm.c &cm_node->mpa_hdr, cm_node 862 drivers/infiniband/hw/i40iw/i40iw_cm.c &cm_node->pdata, cm_node 868 drivers/infiniband/hw/i40iw/i40iw_cm.c return i40iw_schedule_cm_timer(cm_node, sqbuf, I40IW_TIMER_TYPE_SEND, 1, 0); cm_node 877 drivers/infiniband/hw/i40iw/i40iw_cm.c static int i40iw_send_mpa_reject(struct i40iw_cm_node *cm_node, cm_node 884 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->mpa_hdr.addr = &cm_node->mpa_frame; cm_node 885 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->mpa_hdr.size = i40iw_cm_build_mpa_frame(cm_node, cm_node 886 drivers/infiniband/hw/i40iw/i40iw_cm.c &cm_node->mpa_hdr, cm_node 889 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->mpa_frame.flags |= IETF_MPA_FLAGS_REJECT; cm_node 893 drivers/infiniband/hw/i40iw/i40iw_cm.c sqbuf = i40iw_form_cm_frame(cm_node, cm_node 895 drivers/infiniband/hw/i40iw/i40iw_cm.c &cm_node->mpa_hdr, cm_node 902 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_FIN_WAIT1; cm_node 903 drivers/infiniband/hw/i40iw/i40iw_cm.c return i40iw_schedule_cm_timer(cm_node, sqbuf, I40IW_TIMER_TYPE_SEND, 1, 0); cm_node 913 drivers/infiniband/hw/i40iw/i40iw_cm.c static int i40iw_parse_mpa(struct i40iw_cm_node *cm_node, u8 *buffer, u32 *type, u32 len) cm_node 940 drivers/infiniband/hw/i40iw/i40iw_cm.c if (mpa_frame->rev > cm_node->mpa_frame_rev) { cm_node 944 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->mpa_frame_rev = mpa_frame->rev; cm_node 946 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->state != I40IW_CM_STATE_MPAREQ_SENT) { cm_node 989 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->mpav2_ird_ord = IETF_NO_IRD_ORD; cm_node 993 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->state != I40IW_CM_STATE_MPAREQ_SENT) { cm_node 996 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->ird_size = 1; cm_node 997 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->ord_size > ird_size) cm_node 998 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->ord_size = ird_size; cm_node 1003 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->ord_size > ird_size) cm_node 1004 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->ord_size = ird_size; cm_node 1006 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->ird_size < ord_size) cm_node 1013 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->send_rdma0_op = SEND_RDMA_READ_ZERO; cm_node 1015 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->send_rdma0_op = SEND_RDMA_WRITE_ZERO; cm_node 1018 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_debug(cm_node->dev, I40IW_DEBUG_CM, cm_node 1020 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->ord_size, cm_node->ird_size); cm_node 1029 drivers/infiniband/hw/i40iw/i40iw_cm.c memcpy(cm_node->pdata_buf, buffer + mpa_hdr_len, priv_data_len); cm_node 1030 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->pdata.size = priv_data_len; cm_node 1036 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->snd_mark_en = true; cm_node 1054 drivers/infiniband/hw/i40iw/i40iw_cm.c int i40iw_schedule_cm_timer(struct i40iw_cm_node *cm_node, cm_node 1060 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_sc_vsi *vsi = &cm_node->iwdev->vsi; cm_node 1061 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_core *cm_core = cm_node->cm_core; cm_node 1083 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->close_entry) { cm_node 1088 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->close_entry = new_send; cm_node 1092 drivers/infiniband/hw/i40iw/i40iw_cm.c spin_lock_irqsave(&cm_node->retrans_list_lock, flags); cm_node 1093 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->send_entry = new_send; cm_node 1094 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_inc(&cm_node->ref_count); cm_node 1095 drivers/infiniband/hw/i40iw/i40iw_cm.c spin_unlock_irqrestore(&cm_node->retrans_list_lock, flags); cm_node 1101 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 1103 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 1124 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_retrans_expired(struct i40iw_cm_node *cm_node) cm_node 1126 drivers/infiniband/hw/i40iw/i40iw_cm.c struct iw_cm_id *cm_id = cm_node->cm_id; cm_node 1127 drivers/infiniband/hw/i40iw/i40iw_cm.c enum i40iw_cm_node_state state = cm_node->state; cm_node 1129 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_CLOSED; cm_node 1133 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 1137 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->cm_id) cm_node 1139 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_reset(cm_node); cm_node 1142 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_inc(&cm_node->ref_count); cm_node 1143 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_reset(cm_node); cm_node 1144 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_create_event(cm_node, I40IW_CM_EVENT_ABORTED); cm_node 1154 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_handle_close_entry(struct i40iw_cm_node *cm_node, u32 rem_node) cm_node 1156 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_timer_entry *close_entry = cm_node->close_entry; cm_node 1157 drivers/infiniband/hw/i40iw/i40iw_cm.c struct iw_cm_id *cm_id = cm_node->cm_id; cm_node 1178 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 1183 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->close_entry = NULL; cm_node 1194 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_node *cm_node; cm_node 1198 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node = container_of(list_node, struct i40iw_cm_node, list); cm_node 1199 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->close_entry || cm_node->send_entry) { cm_node 1200 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_inc(&cm_node->ref_count); cm_node 1201 drivers/infiniband/hw/i40iw/i40iw_cm.c list_add(&cm_node->timer_entry, timer_list); cm_node 1213 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_node *cm_node; cm_node 1233 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node = container_of(list_node, cm_node 1236 drivers/infiniband/hw/i40iw/i40iw_cm.c close_entry = cm_node->close_entry; cm_node 1246 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_handle_close_entry(cm_node, 1); cm_node 1250 drivers/infiniband/hw/i40iw/i40iw_cm.c spin_lock_irqsave(&cm_node->retrans_list_lock, flags); cm_node 1252 drivers/infiniband/hw/i40iw/i40iw_cm.c send_entry = cm_node->send_entry; cm_node 1256 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->state != I40IW_CM_STATE_OFFLOADED) { cm_node 1263 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_free_retrans_entry(cm_node); cm_node 1268 drivers/infiniband/hw/i40iw/i40iw_cm.c if ((cm_node->state == I40IW_CM_STATE_OFFLOADED) || cm_node 1269 drivers/infiniband/hw/i40iw/i40iw_cm.c (cm_node->state == I40IW_CM_STATE_CLOSED)) { cm_node 1270 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_free_retrans_entry(cm_node); cm_node 1275 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_free_retrans_entry(cm_node); cm_node 1277 drivers/infiniband/hw/i40iw/i40iw_cm.c spin_unlock_irqrestore(&cm_node->retrans_list_lock, flags); cm_node 1278 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_retrans_expired(cm_node); cm_node 1279 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_CLOSED; cm_node 1280 drivers/infiniband/hw/i40iw/i40iw_cm.c spin_lock_irqsave(&cm_node->retrans_list_lock, flags); cm_node 1283 drivers/infiniband/hw/i40iw/i40iw_cm.c spin_unlock_irqrestore(&cm_node->retrans_list_lock, flags); cm_node 1285 drivers/infiniband/hw/i40iw/i40iw_cm.c vsi = &cm_node->iwdev->vsi; cm_node 1287 drivers/infiniband/hw/i40iw/i40iw_cm.c if (!cm_node->ack_rcvd) { cm_node 1290 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->cm_core->stats_pkt_retrans++; cm_node 1292 drivers/infiniband/hw/i40iw/i40iw_cm.c spin_lock_irqsave(&cm_node->retrans_list_lock, flags); cm_node 1309 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_debug(cm_node->dev, cm_node 1312 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node, cm_node 1313 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state); cm_node 1314 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_free_retrans_entry(cm_node); cm_node 1316 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 1319 drivers/infiniband/hw/i40iw/i40iw_cm.c spin_unlock_irqrestore(&cm_node->retrans_list_lock, flags); cm_node 1320 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 1338 drivers/infiniband/hw/i40iw/i40iw_cm.c int i40iw_send_syn(struct i40iw_cm_node *cm_node, u32 sendack) cm_node 1352 drivers/infiniband/hw/i40iw/i40iw_cm.c if (!cm_node) { cm_node 1360 drivers/infiniband/hw/i40iw/i40iw_cm.c options->as_mss.mss = htons(cm_node->tcp_cntxt.mss); cm_node 1366 drivers/infiniband/hw/i40iw/i40iw_cm.c options->as_windowscale.shiftcount = cm_node->tcp_cntxt.rcv_wscale; cm_node 1377 drivers/infiniband/hw/i40iw/i40iw_cm.c sqbuf = i40iw_form_cm_frame(cm_node, &opts, NULL, NULL, flags); cm_node 1382 drivers/infiniband/hw/i40iw/i40iw_cm.c return i40iw_schedule_cm_timer(cm_node, sqbuf, I40IW_TIMER_TYPE_SEND, 1, 0); cm_node 1389 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_send_ack(struct i40iw_cm_node *cm_node) cm_node 1392 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_sc_vsi *vsi = &cm_node->iwdev->vsi; cm_node 1394 drivers/infiniband/hw/i40iw/i40iw_cm.c sqbuf = i40iw_form_cm_frame(cm_node, NULL, NULL, NULL, SET_ACK); cm_node 1405 drivers/infiniband/hw/i40iw/i40iw_cm.c static int i40iw_send_fin(struct i40iw_cm_node *cm_node) cm_node 1409 drivers/infiniband/hw/i40iw/i40iw_cm.c sqbuf = i40iw_form_cm_frame(cm_node, NULL, NULL, NULL, SET_ACK | SET_FIN); cm_node 1414 drivers/infiniband/hw/i40iw/i40iw_cm.c return i40iw_schedule_cm_timer(cm_node, sqbuf, I40IW_TIMER_TYPE_SEND, 1, 0); cm_node 1436 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_node *cm_node; cm_node 1444 drivers/infiniband/hw/i40iw/i40iw_cm.c list_for_each_entry(cm_node, hte, list) { cm_node 1445 drivers/infiniband/hw/i40iw/i40iw_cm.c if (!memcmp(cm_node->loc_addr, loc_addr, sizeof(cm_node->loc_addr)) && cm_node 1446 drivers/infiniband/hw/i40iw/i40iw_cm.c (cm_node->loc_port == loc_port) && cm_node 1447 drivers/infiniband/hw/i40iw/i40iw_cm.c !memcmp(cm_node->rem_addr, rem_addr, sizeof(cm_node->rem_addr)) && cm_node 1448 drivers/infiniband/hw/i40iw/i40iw_cm.c (cm_node->rem_port == rem_port)) { cm_node 1450 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_inc(&cm_node->ref_count); cm_node 1452 drivers/infiniband/hw/i40iw/i40iw_cm.c return cm_node; cm_node 1507 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_node *cm_node) cm_node 1511 drivers/infiniband/hw/i40iw/i40iw_cm.c if (!cm_node || !cm_core) { cm_node 1517 drivers/infiniband/hw/i40iw/i40iw_cm.c list_add_tail(&cm_node->list, &cm_core->non_accelerated_list); cm_node 1528 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_node *cm_node; cm_node 1530 drivers/infiniband/hw/i40iw/i40iw_cm.c list_for_each_entry(cm_node, hte, list) { cm_node 1531 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->loc_port == port) cm_node 1848 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_node *cm_node; cm_node 1861 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node = container_of(list_pos, struct i40iw_cm_node, list); cm_node 1862 drivers/infiniband/hw/i40iw/i40iw_cm.c if ((cm_node->listener == listener) && cm_node 1863 drivers/infiniband/hw/i40iw/i40iw_cm.c !cm_node->accelerated) { cm_node 1864 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_inc(&cm_node->ref_count); cm_node 1865 drivers/infiniband/hw/i40iw/i40iw_cm.c list_add(&cm_node->reset_entry, &reset_list); cm_node 1872 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node = container_of(list_pos, struct i40iw_cm_node, reset_entry); cm_node 1873 drivers/infiniband/hw/i40iw/i40iw_cm.c loopback = cm_node->loopbackpartner; cm_node 1874 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->state >= I40IW_CM_STATE_FIN_WAIT1) { cm_node 1875 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 1878 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 1879 drivers/infiniband/hw/i40iw/i40iw_cm.c err = i40iw_send_reset(cm_node); cm_node 1881 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_CLOSED; cm_node 1884 drivers/infiniband/hw/i40iw/i40iw_cm.c old_state = cm_node->state; cm_node 1885 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_LISTENER_DESTROYED; cm_node 1887 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 1892 drivers/infiniband/hw/i40iw/i40iw_cm.c event.cm_node = loopback; cm_node 1904 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_LISTENER_DESTROYED; cm_node 1905 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 2162 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_node *cm_node; cm_node 2168 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node = kzalloc(sizeof(*cm_node), GFP_ATOMIC); cm_node 2169 drivers/infiniband/hw/i40iw/i40iw_cm.c if (!cm_node) cm_node 2173 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->ipv4 = cm_info->ipv4; cm_node 2174 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->vlan_id = cm_info->vlan_id; cm_node 2175 drivers/infiniband/hw/i40iw/i40iw_cm.c if ((cm_node->vlan_id == I40IW_NO_VLAN) && iwdev->dcb) cm_node 2176 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->vlan_id = 0; cm_node 2177 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tos = cm_info->tos; cm_node 2178 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->user_pri = cm_info->user_pri; cm_node 2184 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tos = max(listener->tos, cm_info->tos); cm_node 2185 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->user_pri = rt_tos2priority(cm_node->tos); cm_node 2187 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tos, cm_node->user_pri); cm_node 2189 drivers/infiniband/hw/i40iw/i40iw_cm.c memcpy(cm_node->loc_addr, cm_info->loc_addr, sizeof(cm_node->loc_addr)); cm_node 2190 drivers/infiniband/hw/i40iw/i40iw_cm.c memcpy(cm_node->rem_addr, cm_info->rem_addr, sizeof(cm_node->rem_addr)); cm_node 2191 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->loc_port = cm_info->loc_port; cm_node 2192 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->rem_port = cm_info->rem_port; cm_node 2194 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->mpa_frame_rev = iwdev->mpa_version; cm_node 2195 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->send_rdma0_op = SEND_RDMA_READ_ZERO; cm_node 2196 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->ird_size = I40IW_MAX_IRD_SIZE; cm_node 2197 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->ord_size = I40IW_MAX_ORD_SIZE; cm_node 2199 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->listener = listener; cm_node 2200 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->cm_id = cm_info->cm_id; cm_node 2201 drivers/infiniband/hw/i40iw/i40iw_cm.c ether_addr_copy(cm_node->loc_mac, netdev->dev_addr); cm_node 2202 drivers/infiniband/hw/i40iw/i40iw_cm.c spin_lock_init(&cm_node->retrans_list_lock); cm_node 2203 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->ack_rcvd = false; cm_node 2205 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_set(&cm_node->ref_count, 1); cm_node 2207 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->cm_core = cm_core; cm_node 2208 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.loc_id = I40IW_CM_DEF_LOCAL_ID; cm_node 2209 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.rcv_wscale = I40IW_CM_DEFAULT_RCV_WND_SCALE; cm_node 2210 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.rcv_wnd = cm_node 2212 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->ipv4) { cm_node 2213 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.loc_seq_num = secure_tcp_seq(htonl(cm_node->loc_addr[0]), cm_node 2214 drivers/infiniband/hw/i40iw/i40iw_cm.c htonl(cm_node->rem_addr[0]), cm_node 2215 drivers/infiniband/hw/i40iw/i40iw_cm.c htons(cm_node->loc_port), cm_node 2216 drivers/infiniband/hw/i40iw/i40iw_cm.c htons(cm_node->rem_port)); cm_node 2217 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.mss = iwdev->vsi.mtu - I40IW_MTU_TO_MSS_IPV4; cm_node 2220 drivers/infiniband/hw/i40iw/i40iw_cm.c htonl(cm_node->loc_addr[0]), htonl(cm_node->loc_addr[1]), cm_node 2221 drivers/infiniband/hw/i40iw/i40iw_cm.c htonl(cm_node->loc_addr[2]), htonl(cm_node->loc_addr[3]) cm_node 2224 drivers/infiniband/hw/i40iw/i40iw_cm.c htonl(cm_node->rem_addr[0]), htonl(cm_node->rem_addr[1]), cm_node 2225 drivers/infiniband/hw/i40iw/i40iw_cm.c htonl(cm_node->rem_addr[2]), htonl(cm_node->rem_addr[3]) cm_node 2227 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.loc_seq_num = secure_tcpv6_seq(loc, rem, cm_node 2228 drivers/infiniband/hw/i40iw/i40iw_cm.c htons(cm_node->loc_port), cm_node 2229 drivers/infiniband/hw/i40iw/i40iw_cm.c htons(cm_node->rem_port)); cm_node 2230 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.mss = iwdev->vsi.mtu - I40IW_MTU_TO_MSS_IPV6; cm_node 2233 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->iwdev = iwdev; cm_node 2234 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->dev = &iwdev->sc_dev; cm_node 2236 drivers/infiniband/hw/i40iw/i40iw_cm.c if ((cm_node->ipv4 && cm_node 2237 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_ipv4_is_loopback(cm_node->loc_addr[0], cm_node->rem_addr[0])) || cm_node 2238 drivers/infiniband/hw/i40iw/i40iw_cm.c (!cm_node->ipv4 && i40iw_ipv6_is_loopback(cm_node->loc_addr, cm_node 2239 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->rem_addr))) { cm_node 2241 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->rem_addr, cm_node 2247 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->rem_addr, cm_node 2251 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->ipv4) cm_node 2266 drivers/infiniband/hw/i40iw/i40iw_cm.c kfree(cm_node); cm_node 2269 drivers/infiniband/hw/i40iw/i40iw_cm.c ether_addr_copy(cm_node->rem_mac, iwdev->arp_table[arpindex].mac_addr); cm_node 2270 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_add_hte_node(cm_core, cm_node); cm_node 2272 drivers/infiniband/hw/i40iw/i40iw_cm.c return cm_node; cm_node 2279 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_rem_ref_cm_node(struct i40iw_cm_node *cm_node) cm_node 2281 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_core *cm_core = cm_node->cm_core; cm_node 2286 drivers/infiniband/hw/i40iw/i40iw_cm.c spin_lock_irqsave(&cm_node->cm_core->ht_lock, flags); cm_node 2287 drivers/infiniband/hw/i40iw/i40iw_cm.c if (atomic_dec_return(&cm_node->ref_count)) { cm_node 2288 drivers/infiniband/hw/i40iw/i40iw_cm.c spin_unlock_irqrestore(&cm_node->cm_core->ht_lock, flags); cm_node 2291 drivers/infiniband/hw/i40iw/i40iw_cm.c list_del(&cm_node->list); cm_node 2292 drivers/infiniband/hw/i40iw/i40iw_cm.c spin_unlock_irqrestore(&cm_node->cm_core->ht_lock, flags); cm_node 2295 drivers/infiniband/hw/i40iw/i40iw_cm.c if (!cm_node->accelerated && cm_node->accept_pend) { cm_node 2297 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_dec(&cm_node->listener->pend_accepts_cnt); cm_node 2299 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->close_entry) cm_node 2300 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_handle_close_entry(cm_node, 0); cm_node 2301 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->listener) { cm_node 2302 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_dec_refcnt_listen(cm_core, cm_node->listener, 0, true); cm_node 2304 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->apbvt_set) { cm_node 2305 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_manage_apbvt(cm_node->iwdev, cm_node 2306 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->loc_port, cm_node 2308 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->apbvt_set = 0; cm_node 2310 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_get_addr_info(cm_node, &nfo); cm_node 2311 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->qhash_set) { cm_node 2312 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_manage_qhash(cm_node->iwdev, cm_node 2318 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->qhash_set = 0; cm_node 2322 drivers/infiniband/hw/i40iw/i40iw_cm.c iwqp = cm_node->iwqp; cm_node 2324 drivers/infiniband/hw/i40iw/i40iw_cm.c iwqp->cm_node = NULL; cm_node 2326 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->iwqp = NULL; cm_node 2327 drivers/infiniband/hw/i40iw/i40iw_cm.c } else if (cm_node->qhash_set) { cm_node 2328 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_get_addr_info(cm_node, &nfo); cm_node 2329 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_manage_qhash(cm_node->iwdev, cm_node 2335 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->qhash_set = 0; cm_node 2338 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->cm_core->stats_nodes_destroyed++; cm_node 2339 drivers/infiniband/hw/i40iw/i40iw_cm.c kfree(cm_node); cm_node 2346 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_handle_fin_pkt(struct i40iw_cm_node *cm_node) cm_node 2350 drivers/infiniband/hw/i40iw/i40iw_cm.c switch (cm_node->state) { cm_node 2355 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.rcv_nxt++; cm_node 2356 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2357 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_LAST_ACK; cm_node 2358 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_fin(cm_node); cm_node 2361 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_create_event(cm_node, I40IW_CM_EVENT_ABORTED); cm_node 2362 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.rcv_nxt++; cm_node 2363 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2364 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_CLOSED; cm_node 2365 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_inc(&cm_node->ref_count); cm_node 2366 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_reset(cm_node); cm_node 2369 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.rcv_nxt++; cm_node 2370 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2371 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_CLOSING; cm_node 2372 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_ack(cm_node); cm_node 2380 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.rcv_nxt++; cm_node 2381 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2382 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_TIME_WAIT; cm_node 2383 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_ack(cm_node); cm_node 2385 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_schedule_cm_timer(cm_node, NULL, I40IW_TIMER_TYPE_CLOSE, 1, 0); cm_node 2387 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_pr_err("node %p state = %d\n", cm_node, cm_node->state); cm_node 2390 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.rcv_nxt++; cm_node 2391 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2392 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_CLOSED; cm_node 2393 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 2397 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_pr_err("bad state node %p state = %d\n", cm_node, cm_node->state); cm_node 2407 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_handle_rst_pkt(struct i40iw_cm_node *cm_node, cm_node 2410 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2411 drivers/infiniband/hw/i40iw/i40iw_cm.c switch (cm_node->state) { cm_node 2414 drivers/infiniband/hw/i40iw/i40iw_cm.c switch (cm_node->mpa_frame_rev) { cm_node 2416 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->mpa_frame_rev = IETF_MPA_V1; cm_node 2418 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_SYN_SENT; cm_node 2419 drivers/infiniband/hw/i40iw/i40iw_cm.c if (i40iw_send_syn(cm_node, 0)) cm_node 2420 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_active_open_err(cm_node, false); cm_node 2424 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_active_open_err(cm_node, false); cm_node 2429 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_add_return(1, &cm_node->passive_state); cm_node 2434 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_pr_err("Bad state state = %d\n", cm_node->state); cm_node 2435 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_passive_open_err(cm_node, false); cm_node 2438 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_active_open_err(cm_node, false); cm_node 2445 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->cm_id->rem_ref(cm_node->cm_id); cm_node 2448 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_CLOSED; cm_node 2449 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 2461 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_handle_rcv_mpa(struct i40iw_cm_node *cm_node, cm_node 2471 drivers/infiniband/hw/i40iw/i40iw_cm.c ret = i40iw_parse_mpa(cm_node, dataloc, &res_type, datasize); cm_node 2473 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->state == I40IW_CM_STATE_MPAREQ_SENT) cm_node 2474 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_active_open_err(cm_node, true); cm_node 2476 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_passive_open_err(cm_node, true); cm_node 2480 drivers/infiniband/hw/i40iw/i40iw_cm.c switch (cm_node->state) { cm_node 2484 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_MPAREQ_RCVD; cm_node 2486 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_ack(cm_node); /* ACK received MPA request */ cm_node 2487 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_set(&cm_node->passive_state, cm_node 2491 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2494 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_MPAREJ_RCVD; cm_node 2497 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_OFFLOADED; cm_node 2499 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_ack(cm_node); cm_node 2502 drivers/infiniband/hw/i40iw/i40iw_cm.c pr_err("%s wrong cm_node state =%d\n", __func__, cm_node->state); cm_node 2505 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_create_event(cm_node, type); cm_node 2512 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_indicate_pkt_err(struct i40iw_cm_node *cm_node) cm_node 2514 drivers/infiniband/hw/i40iw/i40iw_cm.c switch (cm_node->state) { cm_node 2517 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_active_open_err(cm_node, true); cm_node 2521 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_passive_open_err(cm_node, true); cm_node 2534 drivers/infiniband/hw/i40iw/i40iw_cm.c static int i40iw_check_syn(struct i40iw_cm_node *cm_node, struct tcphdr *tcph) cm_node 2538 drivers/infiniband/hw/i40iw/i40iw_cm.c if (ntohl(tcph->ack_seq) != cm_node->tcp_cntxt.loc_seq_num) { cm_node 2540 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_active_open_err(cm_node, true); cm_node 2550 drivers/infiniband/hw/i40iw/i40iw_cm.c static int i40iw_check_seq(struct i40iw_cm_node *cm_node, struct tcphdr *tcph) cm_node 2555 drivers/infiniband/hw/i40iw/i40iw_cm.c u32 loc_seq_num = cm_node->tcp_cntxt.loc_seq_num; cm_node 2556 drivers/infiniband/hw/i40iw/i40iw_cm.c u32 rcv_nxt = cm_node->tcp_cntxt.rcv_nxt; cm_node 2561 drivers/infiniband/hw/i40iw/i40iw_cm.c rcv_wnd = cm_node->tcp_cntxt.rcv_wnd; cm_node 2568 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_indicate_pkt_err(cm_node); cm_node 2578 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_handle_syn_pkt(struct i40iw_cm_node *cm_node, cm_node 2590 drivers/infiniband/hw/i40iw/i40iw_cm.c switch (cm_node->state) { cm_node 2594 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_active_open_err(cm_node, 1); cm_node 2598 drivers/infiniband/hw/i40iw/i40iw_cm.c if (atomic_read(&cm_node->listener->pend_accepts_cnt) > cm_node 2599 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->listener->backlog) { cm_node 2600 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->cm_core->stats_backlog_drops++; cm_node 2601 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_passive_open_err(cm_node, false); cm_node 2604 drivers/infiniband/hw/i40iw/i40iw_cm.c ret = i40iw_handle_tcp_options(cm_node, tcph, optionsize, 1); cm_node 2606 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_passive_open_err(cm_node, false); cm_node 2610 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.rcv_nxt = inc_sequence + 1; cm_node 2611 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->accept_pend = 1; cm_node 2612 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_inc(&cm_node->listener->pend_accepts_cnt); cm_node 2614 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_SYN_RCVD; cm_node 2615 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_get_addr_info(cm_node, &nfo); cm_node 2616 drivers/infiniband/hw/i40iw/i40iw_cm.c ret = i40iw_manage_qhash(cm_node->iwdev, cm_node 2620 drivers/infiniband/hw/i40iw/i40iw_cm.c (void *)cm_node, cm_node 2622 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->qhash_set = true; cm_node 2625 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2626 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_inc(&cm_node->ref_count); cm_node 2627 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_reset(cm_node); cm_node 2647 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_handle_synack_pkt(struct i40iw_cm_node *cm_node, cm_node 2657 drivers/infiniband/hw/i40iw/i40iw_cm.c switch (cm_node->state) { cm_node 2659 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2661 drivers/infiniband/hw/i40iw/i40iw_cm.c if (i40iw_check_syn(cm_node, tcph)) { cm_node 2665 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.rem_ack_num = ntohl(tcph->ack_seq); cm_node 2667 drivers/infiniband/hw/i40iw/i40iw_cm.c ret = i40iw_handle_tcp_options(cm_node, tcph, optionsize, 0); cm_node 2669 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_debug(cm_node->dev, cm_node 2672 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node); cm_node 2675 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2676 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.rcv_nxt = inc_sequence + 1; cm_node 2677 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_ack(cm_node); /* ACK for the syn_ack */ cm_node 2678 drivers/infiniband/hw/i40iw/i40iw_cm.c ret = i40iw_send_mpa_request(cm_node); cm_node 2680 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_debug(cm_node->dev, cm_node 2683 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node); cm_node 2686 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_MPAREQ_SENT; cm_node 2689 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_passive_open_err(cm_node, true); cm_node 2692 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.loc_seq_num = ntohl(tcph->ack_seq); cm_node 2693 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2694 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_CLOSED; cm_node 2695 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_reset(cm_node); cm_node 2698 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.loc_seq_num = ntohl(tcph->ack_seq); cm_node 2699 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2700 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_inc(&cm_node->ref_count); cm_node 2701 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_reset(cm_node); cm_node 2721 drivers/infiniband/hw/i40iw/i40iw_cm.c static int i40iw_handle_ack_pkt(struct i40iw_cm_node *cm_node, cm_node 2732 drivers/infiniband/hw/i40iw/i40iw_cm.c if (i40iw_check_seq(cm_node, tcph)) cm_node 2736 drivers/infiniband/hw/i40iw/i40iw_cm.c switch (cm_node->state) { cm_node 2738 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2739 drivers/infiniband/hw/i40iw/i40iw_cm.c ret = i40iw_handle_tcp_options(cm_node, tcph, optionsize, 1); cm_node 2742 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.rem_ack_num = ntohl(tcph->ack_seq); cm_node 2743 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_ESTABLISHED; cm_node 2745 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.rcv_nxt = inc_sequence + datasize; cm_node 2746 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_handle_rcv_mpa(cm_node, rbuf); cm_node 2750 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2752 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.rcv_nxt = inc_sequence + datasize; cm_node 2753 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_handle_rcv_mpa(cm_node, rbuf); cm_node 2757 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.rem_ack_num = ntohl(tcph->ack_seq); cm_node 2759 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.rcv_nxt = inc_sequence + datasize; cm_node 2760 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->ack_rcvd = false; cm_node 2761 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_handle_rcv_mpa(cm_node, rbuf); cm_node 2763 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->ack_rcvd = true; cm_node 2767 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2768 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_CLOSED; cm_node 2769 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_reset(cm_node); cm_node 2772 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2773 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_inc(&cm_node->ref_count); cm_node 2774 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_reset(cm_node); cm_node 2778 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2779 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_CLOSED; cm_node 2780 drivers/infiniband/hw/i40iw/i40iw_cm.c if (!cm_node->accept_pend) cm_node 2781 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->cm_id->rem_ref(cm_node->cm_id); cm_node 2782 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 2785 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2786 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_FIN_WAIT2; cm_node 2794 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 2805 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_process_packet(struct i40iw_cm_node *cm_node, cm_node 2827 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_handle_syn_pkt(cm_node, rbuf); cm_node 2830 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_handle_synack_pkt(cm_node, rbuf); cm_node 2833 drivers/infiniband/hw/i40iw/i40iw_cm.c ret = i40iw_handle_ack_pkt(cm_node, rbuf); cm_node 2835 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_handle_fin_pkt(cm_node); cm_node 2838 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_handle_rst_pkt(cm_node, rbuf); cm_node 2842 drivers/infiniband/hw/i40iw/i40iw_cm.c (!i40iw_check_seq(cm_node, (struct tcphdr *)rbuf->tcph))) cm_node 2843 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_handle_fin_pkt(cm_node); cm_node 2924 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_node *cm_node; cm_node 2933 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node = i40iw_make_cm_node(cm_core, iwdev, cm_info, NULL); cm_node 2934 drivers/infiniband/hw/i40iw/i40iw_cm.c if (!cm_node) cm_node 2937 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.client = 1; cm_node 2938 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.rcv_wscale = I40IW_CM_DEFAULT_RCV_WND_SCALE; cm_node 2940 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_record_ird_ord(cm_node, conn_param->ird, conn_param->ord); cm_node 2946 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->rem_port, cm_node 2947 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->vlan_id, cm_node 2950 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 2963 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 2967 drivers/infiniband/hw/i40iw/i40iw_cm.c loopback_remotenode->loopbackpartner = cm_node; cm_node 2970 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->loopbackpartner = loopback_remotenode; cm_node 2975 drivers/infiniband/hw/i40iw/i40iw_cm.c if (loopback_remotenode->ord_size > cm_node->ird_size) cm_node 2977 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->ird_size; cm_node 2979 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_OFFLOADED; cm_node 2980 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.rcv_nxt = cm_node 2983 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.loc_seq_num; cm_node 2984 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.max_snd_wnd = cm_node 2986 drivers/infiniband/hw/i40iw/i40iw_cm.c loopback_remotenode->tcp_cntxt.max_snd_wnd = cm_node->tcp_cntxt.rcv_wnd; cm_node 2987 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.snd_wnd = loopback_remotenode->tcp_cntxt.rcv_wnd; cm_node 2988 drivers/infiniband/hw/i40iw/i40iw_cm.c loopback_remotenode->tcp_cntxt.snd_wnd = cm_node->tcp_cntxt.rcv_wnd; cm_node 2989 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.snd_wscale = loopback_remotenode->tcp_cntxt.rcv_wscale; cm_node 2990 drivers/infiniband/hw/i40iw/i40iw_cm.c loopback_remotenode->tcp_cntxt.snd_wscale = cm_node->tcp_cntxt.rcv_wscale; cm_node 2992 drivers/infiniband/hw/i40iw/i40iw_cm.c return cm_node; cm_node 2995 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->pdata.size = private_data_len; cm_node 2996 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->pdata.addr = cm_node->pdata_buf; cm_node 2998 drivers/infiniband/hw/i40iw/i40iw_cm.c memcpy(cm_node->pdata_buf, private_data, private_data_len); cm_node 3000 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_SYN_SENT; cm_node 3001 drivers/infiniband/hw/i40iw/i40iw_cm.c return cm_node; cm_node 3010 drivers/infiniband/hw/i40iw/i40iw_cm.c static int i40iw_cm_reject(struct i40iw_cm_node *cm_node, const void *pdata, u8 plen) cm_node 3015 drivers/infiniband/hw/i40iw/i40iw_cm.c struct iw_cm_id *cm_id = cm_node->cm_id; cm_node 3016 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_node *loopback = cm_node->loopbackpartner; cm_node 3018 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->tcp_cntxt.client) cm_node 3020 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 3023 drivers/infiniband/hw/i40iw/i40iw_cm.c passive_state = atomic_add_return(1, &cm_node->passive_state); cm_node 3025 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_CLOSED; cm_node 3026 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 3028 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->state == I40IW_CM_STATE_LISTENER_DESTROYED) { cm_node 3029 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 3031 drivers/infiniband/hw/i40iw/i40iw_cm.c ret = i40iw_send_mpa_reject(cm_node, pdata, plen); cm_node 3033 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_CLOSED; cm_node 3034 drivers/infiniband/hw/i40iw/i40iw_cm.c err = i40iw_send_reset(cm_node); cm_node 3043 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->cm_id = NULL; cm_node 3044 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->state == I40IW_CM_STATE_LISTENER_DESTROYED) { cm_node 3045 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 3052 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 3068 drivers/infiniband/hw/i40iw/i40iw_cm.c static int i40iw_cm_close(struct i40iw_cm_node *cm_node) cm_node 3072 drivers/infiniband/hw/i40iw/i40iw_cm.c if (!cm_node) cm_node 3075 drivers/infiniband/hw/i40iw/i40iw_cm.c switch (cm_node->state) { cm_node 3083 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 3084 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_reset(cm_node); cm_node 3087 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_LAST_ACK; cm_node 3088 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_fin(cm_node); cm_node 3098 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cleanup_retrans_entry(cm_node); cm_node 3099 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_reset(cm_node); cm_node 3106 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 3109 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->send_entry) cm_node 3111 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 3125 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_node *cm_node; cm_node 3178 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node = i40iw_find_node(cm_core, cm_node 3186 drivers/infiniband/hw/i40iw/i40iw_cm.c if (!cm_node) { cm_node 3206 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node = i40iw_make_cm_node(cm_core, iwdev, &cm_info, listener); cm_node 3207 drivers/infiniband/hw/i40iw/i40iw_cm.c if (!cm_node) { cm_node 3216 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_LISTENING; cm_node 3218 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 3221 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_inc(&cm_node->ref_count); cm_node 3222 drivers/infiniband/hw/i40iw/i40iw_cm.c } else if (cm_node->state == I40IW_CM_STATE_OFFLOADED) { cm_node 3223 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 3226 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_process_packet(cm_node, rbuf); cm_node 3227 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 3298 drivers/infiniband/hw/i40iw/i40iw_cm.c static void i40iw_init_tcp_ctx(struct i40iw_cm_node *cm_node, cm_node 3302 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->ipv4 = cm_node->ipv4; cm_node 3315 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->snd_wscale = cm_node->tcp_cntxt.snd_wscale; cm_node 3316 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->rcv_wscale = cm_node->tcp_cntxt.rcv_wscale; cm_node 3318 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->snd_nxt = cpu_to_le32(cm_node->tcp_cntxt.loc_seq_num); cm_node 3319 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->snd_wnd = cpu_to_le32(cm_node->tcp_cntxt.snd_wnd); cm_node 3320 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->rcv_nxt = cpu_to_le32(cm_node->tcp_cntxt.rcv_nxt); cm_node 3321 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->snd_max = cpu_to_le32(cm_node->tcp_cntxt.loc_seq_num); cm_node 3323 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->snd_una = cpu_to_le32(cm_node->tcp_cntxt.loc_seq_num); cm_node 3324 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->cwnd = cpu_to_le32(2 * cm_node->tcp_cntxt.mss); cm_node 3325 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->snd_wl1 = cpu_to_le32(cm_node->tcp_cntxt.rcv_nxt); cm_node 3326 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->snd_wl2 = cpu_to_le32(cm_node->tcp_cntxt.loc_seq_num); cm_node 3327 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->max_snd_window = cpu_to_le32(cm_node->tcp_cntxt.max_snd_wnd); cm_node 3328 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->rcv_wnd = cpu_to_le32(cm_node->tcp_cntxt.rcv_wnd << cm_node 3329 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->tcp_cntxt.rcv_wscale); cm_node 3332 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->snd_mss = cpu_to_le32(((u32)cm_node->tcp_cntxt.mss)); cm_node 3333 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->vlan_id <= VLAN_VID_MASK) { cm_node 3335 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->vlan_tag = cpu_to_le16(((u16)cm_node->user_pri << I40IW_VLAN_PRIO_SHIFT) | cm_node 3336 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->vlan_id); cm_node 3338 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->ipv4) { cm_node 3339 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->src_port = cpu_to_le16(cm_node->loc_port); cm_node 3340 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->dst_port = cpu_to_le16(cm_node->rem_port); cm_node 3342 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->dest_ip_addr3 = cpu_to_le32(cm_node->rem_addr[0]); cm_node 3343 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->local_ipaddr3 = cpu_to_le32(cm_node->loc_addr[0]); cm_node 3352 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->src_port = cpu_to_le16(cm_node->loc_port); cm_node 3353 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->dst_port = cpu_to_le16(cm_node->rem_port); cm_node 3354 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->dest_ip_addr0 = cpu_to_le32(cm_node->rem_addr[0]); cm_node 3355 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->dest_ip_addr1 = cpu_to_le32(cm_node->rem_addr[1]); cm_node 3356 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->dest_ip_addr2 = cpu_to_le32(cm_node->rem_addr[2]); cm_node 3357 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->dest_ip_addr3 = cpu_to_le32(cm_node->rem_addr[3]); cm_node 3358 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->local_ipaddr0 = cpu_to_le32(cm_node->loc_addr[0]); cm_node 3359 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->local_ipaddr1 = cpu_to_le32(cm_node->loc_addr[1]); cm_node 3360 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->local_ipaddr2 = cpu_to_le32(cm_node->loc_addr[2]); cm_node 3361 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info->local_ipaddr3 = cpu_to_le32(cm_node->loc_addr[3]); cm_node 3378 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_node *cm_node) cm_node 3394 drivers/infiniband/hw/i40iw/i40iw_cm.c iwarp_info->ord_size = cm_node->ord_size; cm_node 3395 drivers/infiniband/hw/i40iw/i40iw_cm.c iwarp_info->ird_size = i40iw_derive_hw_ird_setting(cm_node->ird_size); cm_node 3409 drivers/infiniband/hw/i40iw/i40iw_cm.c ctx_info->user_pri = cm_node->user_pri; cm_node 3411 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_init_tcp_ctx(cm_node, &tcp_info, iwqp); cm_node 3412 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->snd_mark_en) { cm_node 3415 drivers/infiniband/hw/i40iw/i40iw_cm.c SNDMARKER_SEQNMASK) + cm_node->lsmm_size; cm_node 3418 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_OFFLOADED; cm_node 3421 drivers/infiniband/hw/i40iw/i40iw_cm.c tcp_info.tos = cm_node->tos; cm_node 3495 drivers/infiniband/hw/i40iw/i40iw_cm.c if (iwqp->cm_node) { cm_node 3497 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cm_close(iwqp->cm_node); cm_node 3641 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_node *cm_node; cm_node 3661 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node = (struct i40iw_cm_node *)cm_id->provider_data; cm_node 3664 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->ipv4 = true; cm_node 3665 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->vlan_id = i40iw_get_vlan_ipv4(cm_node->loc_addr); cm_node 3667 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->ipv4 = false; cm_node 3668 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_netdev_vlan_ipv6(cm_node->loc_addr, &cm_node->vlan_id); cm_node 3670 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_debug(cm_node->dev, cm_node 3673 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->vlan_id); cm_node 3674 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->state == I40IW_CM_STATE_LISTENER_DESTROYED) { cm_node 3675 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->loopbackpartner) cm_node 3676 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node->loopbackpartner); cm_node 3677 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 3681 drivers/infiniband/hw/i40iw/i40iw_cm.c passive_state = atomic_add_return(1, &cm_node->passive_state); cm_node 3683 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 3687 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->cm_core->stats_accepts++; cm_node 3688 drivers/infiniband/hw/i40iw/i40iw_cm.c iwqp->cm_node = (void *)cm_node; cm_node 3689 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->iwqp = iwqp; cm_node 3697 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->pdata.size = conn_param->private_data_len; cm_node 3699 drivers/infiniband/hw/i40iw/i40iw_cm.c accept.size = i40iw_cm_build_mpa_frame(cm_node, &accept, MPA_KEY_REPLY); cm_node 3704 drivers/infiniband/hw/i40iw/i40iw_cm.c if ((cm_node->ipv4 && cm_node 3705 drivers/infiniband/hw/i40iw/i40iw_cm.c !i40iw_ipv4_is_loopback(cm_node->loc_addr[0], cm_node->rem_addr[0])) || cm_node 3706 drivers/infiniband/hw/i40iw/i40iw_cm.c (!cm_node->ipv4 && cm_node 3707 drivers/infiniband/hw/i40iw/i40iw_cm.c !i40iw_ipv6_is_loopback(cm_node->loc_addr, cm_node->rem_addr))) { cm_node 3740 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->cm_id = cm_id; cm_node 3745 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->lsmm_size = accept.size + conn_param->private_data_len; cm_node 3746 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cm_init_tsa_conn(iwqp, cm_node); cm_node 3751 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->qhash_set = false; cm_node 3754 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->accelerated = true; cm_node 3756 drivers/infiniband/hw/i40iw/i40iw_cm.c list_move_tail(&cm_node->list, &cm_core->accelerated_list); cm_node 3760 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_cm_event(cm_node, cm_id, IW_CM_EVENT_ESTABLISHED, 0); cm_node 3764 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->loopbackpartner) { cm_node 3765 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->loopbackpartner->pdata.size = conn_param->private_data_len; cm_node 3768 drivers/infiniband/hw/i40iw/i40iw_cm.c memcpy(cm_node->loopbackpartner->pdata_buf, cm_node 3771 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_create_event(cm_node->loopbackpartner, I40IW_CM_EVENT_CONNECTED); cm_node 3774 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->accept_pend) { cm_node 3775 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_dec(&cm_node->listener->pend_accepts_cnt); cm_node 3776 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->accept_pend = 0; cm_node 3790 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_node *cm_node; cm_node 3793 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node = (struct i40iw_cm_node *)cm_id->provider_data; cm_node 3794 drivers/infiniband/hw/i40iw/i40iw_cm.c loopback = cm_node->loopbackpartner; cm_node 3795 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->cm_id = cm_id; cm_node 3796 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->pdata.size = pdata_len; cm_node 3801 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->cm_core->stats_rejects++; cm_node 3811 drivers/infiniband/hw/i40iw/i40iw_cm.c return i40iw_cm_reject(cm_node, pdata, pdata_len); cm_node 3824 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_node *cm_node; cm_node 3880 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node = i40iw_create_cm_node(&iwdev->cm_core, iwdev, cm_node 3883 drivers/infiniband/hw/i40iw/i40iw_cm.c if (IS_ERR(cm_node)) { cm_node 3884 drivers/infiniband/hw/i40iw/i40iw_cm.c ret = PTR_ERR(cm_node); cm_node 3898 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->qhash_set = true; cm_node 3907 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->apbvt_set = true; cm_node 3908 drivers/infiniband/hw/i40iw/i40iw_cm.c iwqp->cm_node = cm_node; cm_node 3909 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->iwqp = iwqp; cm_node 3913 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->state != I40IW_CM_STATE_OFFLOADED) { cm_node 3914 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->state = I40IW_CM_STATE_SYN_SENT; cm_node 3915 drivers/infiniband/hw/i40iw/i40iw_cm.c ret = i40iw_send_syn(cm_node, 0); cm_node 3920 drivers/infiniband/hw/i40iw/i40iw_cm.c if (cm_node->loopbackpartner) { cm_node 3921 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->loopbackpartner->state = I40IW_CM_STATE_MPAREQ_RCVD; cm_node 3922 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_create_event(cm_node->loopbackpartner, cm_node 3926 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_debug(cm_node->dev, cm_node 3929 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->rem_port, cm_node 3930 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node, cm_node 3931 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->cm_id); cm_node 3947 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 4083 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_node *cm_node; cm_node 4091 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node = event->cm_node; cm_node 4092 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_id = cm_node->cm_id; cm_node 4102 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cm_init_tsa_conn(iwqp, cm_node); cm_node 4103 drivers/infiniband/hw/i40iw/i40iw_cm.c read0 = (cm_node->send_rdma0_op == SEND_RDMA_READ_ZERO); cm_node 4112 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->qhash_set = false; cm_node 4115 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->accelerated = true; cm_node 4117 drivers/infiniband/hw/i40iw/i40iw_cm.c list_move_tail(&cm_node->list, &cm_core->accelerated_list); cm_node 4119 drivers/infiniband/hw/i40iw/i40iw_cm.c status = i40iw_send_cm_event(cm_node, cm_id, IW_CM_EVENT_CONNECT_REPLY, cm_node 4129 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_cm_event(event->cm_node, cm_node 4134 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(event->cm_node); cm_node 4143 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_node *cm_node = event->cm_node; cm_node 4144 drivers/infiniband/hw/i40iw/i40iw_cm.c struct iw_cm_id *cm_id = cm_node->cm_id; cm_node 4154 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_debug(cm_node->dev, cm_node 4157 drivers/infiniband/hw/i40iw/i40iw_cm.c event->cm_node, cm_id); cm_node 4160 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_cm_event(cm_node, cm_node->cm_id, IW_CM_EVENT_DISCONNECT, -ECONNRESET); cm_node 4161 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_cm_event(cm_node, cm_node->cm_id, IW_CM_EVENT_CLOSE, 0); cm_node 4173 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_node *cm_node; cm_node 4175 drivers/infiniband/hw/i40iw/i40iw_cm.c if (!event || !event->cm_node || !event->cm_node->cm_core) cm_node 4178 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node = event->cm_node; cm_node 4182 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_cm_event(cm_node, cm_node 4183 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->cm_id, cm_node 4191 drivers/infiniband/hw/i40iw/i40iw_cm.c if (!event->cm_node->cm_id || cm_node 4192 drivers/infiniband/hw/i40iw/i40iw_cm.c (event->cm_node->state != I40IW_CM_STATE_OFFLOADED)) cm_node 4197 drivers/infiniband/hw/i40iw/i40iw_cm.c if (!event->cm_node->cm_id || cm_node 4198 drivers/infiniband/hw/i40iw/i40iw_cm.c (cm_node->state == I40IW_CM_STATE_OFFLOADED)) cm_node 4200 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_send_cm_event(cm_node, cm_node 4201 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node->cm_id, cm_node 4206 drivers/infiniband/hw/i40iw/i40iw_cm.c if (!event->cm_node->cm_id || cm_node 4207 drivers/infiniband/hw/i40iw/i40iw_cm.c (event->cm_node->state == I40IW_CM_STATE_OFFLOADED)) cm_node 4217 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(event->cm_node); cm_node 4227 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_inc(&event->cm_node->ref_count); cm_node 4231 drivers/infiniband/hw/i40iw/i40iw_cm.c queue_work(event->cm_node->cm_core->event_wq, &event->event_work); cm_node 4316 drivers/infiniband/hw/i40iw/i40iw_cm.c struct i40iw_cm_node *cm_node; cm_node 4325 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node = container_of(list_node, struct i40iw_cm_node, list); cm_node 4327 drivers/infiniband/hw/i40iw/i40iw_cm.c (nfo->vlan_id == cm_node->vlan_id && cm_node 4328 drivers/infiniband/hw/i40iw/i40iw_cm.c (!memcmp(cm_node->loc_addr, ipaddr, nfo->ipv4 ? 4 : 16) || cm_node 4329 drivers/infiniband/hw/i40iw/i40iw_cm.c !memcmp(cm_node->rem_addr, ipaddr, nfo->ipv4 ? 4 : 16)))) { cm_node 4330 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_inc(&cm_node->ref_count); cm_node 4331 drivers/infiniband/hw/i40iw/i40iw_cm.c list_add(&cm_node->teardown_entry, &teardown_list); cm_node 4336 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node = container_of(list_node, struct i40iw_cm_node, list); cm_node 4338 drivers/infiniband/hw/i40iw/i40iw_cm.c (nfo->vlan_id == cm_node->vlan_id && cm_node 4339 drivers/infiniband/hw/i40iw/i40iw_cm.c (!memcmp(cm_node->loc_addr, ipaddr, nfo->ipv4 ? 4 : 16) || cm_node 4340 drivers/infiniband/hw/i40iw/i40iw_cm.c !memcmp(cm_node->rem_addr, ipaddr, nfo->ipv4 ? 4 : 16)))) { cm_node 4341 drivers/infiniband/hw/i40iw/i40iw_cm.c atomic_inc(&cm_node->ref_count); cm_node 4342 drivers/infiniband/hw/i40iw/i40iw_cm.c list_add(&cm_node->teardown_entry, &teardown_list); cm_node 4348 drivers/infiniband/hw/i40iw/i40iw_cm.c cm_node = container_of(list_node, struct i40iw_cm_node, cm_node 4351 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_modify_qp(&cm_node->iwqp->ibqp, &attr, IB_QP_STATE, NULL); cm_node 4353 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_cm_disconn(cm_node->iwqp); cm_node 4354 drivers/infiniband/hw/i40iw/i40iw_cm.c i40iw_rem_ref_cm_node(cm_node); cm_node 398 drivers/infiniband/hw/i40iw/i40iw_cm.h struct i40iw_cm_node *cm_node; cm_node 435 drivers/infiniband/hw/i40iw/i40iw_cm.h int i40iw_schedule_cm_timer(struct i40iw_cm_node *cm_node, cm_node 344 drivers/infiniband/hw/i40iw/i40iw_hw.c i40iw_schedule_cm_timer(iwqp->cm_node, cm_node 1400 drivers/infiniband/hw/i40iw/i40iw_utils.c struct i40iw_cm_node *cm_node; cm_node 1420 drivers/infiniband/hw/i40iw/i40iw_utils.c cm_node = i40iw_find_node(&iwdev->cm_core, rem_port, rem_addr, loc_port, cm_node 1422 drivers/infiniband/hw/i40iw/i40iw_utils.c if (!cm_node) cm_node 1424 drivers/infiniband/hw/i40iw/i40iw_utils.c iwqp = cm_node->iwqp; cm_node 815 drivers/infiniband/hw/i40iw/i40iw_verbs.c i40iw_send_reset(iwqp->cm_node); cm_node 999 drivers/infiniband/hw/i40iw/i40iw_verbs.c i40iw_schedule_cm_timer(iwqp->cm_node, cm_node 145 drivers/infiniband/hw/i40iw/i40iw_verbs.h void *cm_node;