cep 440 drivers/infiniband/sw/siw/siw.h struct siw_cep *cep; cep 736 drivers/infiniband/sw/siw/siw.h #define siw_dbg_cep(cep, fmt, ...) \ cep 737 drivers/infiniband/sw/siw/siw.h ibdev_dbg(&cep->sdev->base_dev, "CEP[0x%pK] %s: " fmt, \ cep 738 drivers/infiniband/sw/siw/siw.h cep, __func__, ##__VA_ARGS__) cep 38 drivers/infiniband/sw/siw/siw_cm.c static int siw_cm_upcall(struct siw_cep *cep, enum iw_cm_event_type reason, cep 53 drivers/infiniband/sw/siw/siw_cm.c struct siw_cep *cep = sk_to_cep(sk); cep 56 drivers/infiniband/sw/siw/siw_cm.c cep->sk_state_change = sk->sk_state_change; cep 57 drivers/infiniband/sw/siw/siw_cm.c cep->sk_data_ready = sk->sk_data_ready; cep 58 drivers/infiniband/sw/siw/siw_cm.c cep->sk_write_space = sk->sk_write_space; cep 59 drivers/infiniband/sw/siw/siw_cm.c cep->sk_error_report = sk->sk_error_report; cep 63 drivers/infiniband/sw/siw/siw_cm.c static void siw_sk_restore_upcalls(struct sock *sk, struct siw_cep *cep) cep 65 drivers/infiniband/sw/siw/siw_cm.c sk->sk_state_change = cep->sk_state_change; cep 66 drivers/infiniband/sw/siw/siw_cm.c sk->sk_data_ready = cep->sk_data_ready; cep 67 drivers/infiniband/sw/siw/siw_cm.c sk->sk_write_space = cep->sk_write_space; cep 68 drivers/infiniband/sw/siw/siw_cm.c sk->sk_error_report = cep->sk_error_report; cep 72 drivers/infiniband/sw/siw/siw_cm.c static void siw_qp_socket_assoc(struct siw_cep *cep, struct siw_qp *qp) cep 74 drivers/infiniband/sw/siw/siw_cm.c struct socket *s = cep->sock; cep 89 drivers/infiniband/sw/siw/siw_cm.c struct siw_cep *cep; cep 93 drivers/infiniband/sw/siw/siw_cm.c cep = sk_to_cep(sk); cep 94 drivers/infiniband/sw/siw/siw_cm.c if (cep) { cep 95 drivers/infiniband/sw/siw/siw_cm.c siw_sk_restore_upcalls(sk, cep); cep 96 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 108 drivers/infiniband/sw/siw/siw_cm.c struct siw_cep *cep; cep 114 drivers/infiniband/sw/siw/siw_cm.c cep = sk_to_cep(sk); cep 115 drivers/infiniband/sw/siw/siw_cm.c if (!cep) { cep 133 drivers/infiniband/sw/siw/siw_cm.c siw_cm_upcall(cep, IW_CM_EVENT_ESTABLISHED, 0); cep 137 drivers/infiniband/sw/siw/siw_cm.c siw_qp_socket_assoc(cep, qp); cep 140 drivers/infiniband/sw/siw/siw_cm.c static void siw_sk_assign_rtr_upcalls(struct siw_cep *cep) cep 142 drivers/infiniband/sw/siw/siw_cm.c struct sock *sk = cep->sock->sk; cep 150 drivers/infiniband/sw/siw/siw_cm.c static void siw_cep_socket_assoc(struct siw_cep *cep, struct socket *s) cep 152 drivers/infiniband/sw/siw/siw_cm.c cep->sock = s; cep 153 drivers/infiniband/sw/siw/siw_cm.c siw_cep_get(cep); cep 154 drivers/infiniband/sw/siw/siw_cm.c s->sk->sk_user_data = cep; cep 162 drivers/infiniband/sw/siw/siw_cm.c struct siw_cep *cep = kzalloc(sizeof(*cep), GFP_KERNEL); cep 165 drivers/infiniband/sw/siw/siw_cm.c if (!cep) cep 168 drivers/infiniband/sw/siw/siw_cm.c INIT_LIST_HEAD(&cep->listenq); cep 169 drivers/infiniband/sw/siw/siw_cm.c INIT_LIST_HEAD(&cep->devq); cep 170 drivers/infiniband/sw/siw/siw_cm.c INIT_LIST_HEAD(&cep->work_freelist); cep 172 drivers/infiniband/sw/siw/siw_cm.c kref_init(&cep->ref); cep 173 drivers/infiniband/sw/siw/siw_cm.c cep->state = SIW_EPSTATE_IDLE; cep 174 drivers/infiniband/sw/siw/siw_cm.c init_waitqueue_head(&cep->waitq); cep 175 drivers/infiniband/sw/siw/siw_cm.c spin_lock_init(&cep->lock); cep 176 drivers/infiniband/sw/siw/siw_cm.c cep->sdev = sdev; cep 177 drivers/infiniband/sw/siw/siw_cm.c cep->enhanced_rdma_conn_est = false; cep 180 drivers/infiniband/sw/siw/siw_cm.c list_add_tail(&cep->devq, &sdev->cep_list); cep 183 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "new endpoint\n"); cep 184 drivers/infiniband/sw/siw/siw_cm.c return cep; cep 187 drivers/infiniband/sw/siw/siw_cm.c static void siw_cm_free_work(struct siw_cep *cep) cep 192 drivers/infiniband/sw/siw/siw_cm.c list_for_each_safe(w, tmp, &cep->work_freelist) { cep 199 drivers/infiniband/sw/siw/siw_cm.c static void siw_cancel_mpatimer(struct siw_cep *cep) cep 201 drivers/infiniband/sw/siw/siw_cm.c spin_lock_bh(&cep->lock); cep 202 drivers/infiniband/sw/siw/siw_cm.c if (cep->mpa_timer) { cep 203 drivers/infiniband/sw/siw/siw_cm.c if (cancel_delayed_work(&cep->mpa_timer->work)) { cep 204 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 205 drivers/infiniband/sw/siw/siw_cm.c kfree(cep->mpa_timer); /* not needed again */ cep 207 drivers/infiniband/sw/siw/siw_cm.c cep->mpa_timer = NULL; cep 209 drivers/infiniband/sw/siw/siw_cm.c spin_unlock_bh(&cep->lock); cep 215 drivers/infiniband/sw/siw/siw_cm.c spin_lock_bh(&work->cep->lock); cep 216 drivers/infiniband/sw/siw/siw_cm.c list_add(&work->list, &work->cep->work_freelist); cep 217 drivers/infiniband/sw/siw/siw_cm.c spin_unlock_bh(&work->cep->lock); cep 220 drivers/infiniband/sw/siw/siw_cm.c static void siw_cep_set_inuse(struct siw_cep *cep) cep 224 drivers/infiniband/sw/siw/siw_cm.c spin_lock_irqsave(&cep->lock, flags); cep 226 drivers/infiniband/sw/siw/siw_cm.c if (cep->in_use) { cep 227 drivers/infiniband/sw/siw/siw_cm.c spin_unlock_irqrestore(&cep->lock, flags); cep 228 drivers/infiniband/sw/siw/siw_cm.c wait_event_interruptible(cep->waitq, !cep->in_use); cep 233 drivers/infiniband/sw/siw/siw_cm.c cep->in_use = 1; cep 234 drivers/infiniband/sw/siw/siw_cm.c spin_unlock_irqrestore(&cep->lock, flags); cep 238 drivers/infiniband/sw/siw/siw_cm.c static void siw_cep_set_free(struct siw_cep *cep) cep 242 drivers/infiniband/sw/siw/siw_cm.c spin_lock_irqsave(&cep->lock, flags); cep 243 drivers/infiniband/sw/siw/siw_cm.c cep->in_use = 0; cep 244 drivers/infiniband/sw/siw/siw_cm.c spin_unlock_irqrestore(&cep->lock, flags); cep 246 drivers/infiniband/sw/siw/siw_cm.c wake_up(&cep->waitq); cep 251 drivers/infiniband/sw/siw/siw_cm.c struct siw_cep *cep = container_of(ref, struct siw_cep, ref); cep 252 drivers/infiniband/sw/siw/siw_cm.c struct siw_device *sdev = cep->sdev; cep 255 drivers/infiniband/sw/siw/siw_cm.c WARN_ON(cep->listen_cep); cep 258 drivers/infiniband/sw/siw/siw_cm.c kfree(cep->mpa.pdata); cep 259 drivers/infiniband/sw/siw/siw_cm.c spin_lock_bh(&cep->lock); cep 260 drivers/infiniband/sw/siw/siw_cm.c if (!list_empty(&cep->work_freelist)) cep 261 drivers/infiniband/sw/siw/siw_cm.c siw_cm_free_work(cep); cep 262 drivers/infiniband/sw/siw/siw_cm.c spin_unlock_bh(&cep->lock); cep 265 drivers/infiniband/sw/siw/siw_cm.c list_del(&cep->devq); cep 268 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "free endpoint\n"); cep 269 drivers/infiniband/sw/siw/siw_cm.c kfree(cep); cep 272 drivers/infiniband/sw/siw/siw_cm.c static struct siw_cm_work *siw_get_work(struct siw_cep *cep) cep 276 drivers/infiniband/sw/siw/siw_cm.c spin_lock_bh(&cep->lock); cep 277 drivers/infiniband/sw/siw/siw_cm.c if (!list_empty(&cep->work_freelist)) { cep 278 drivers/infiniband/sw/siw/siw_cm.c work = list_entry(cep->work_freelist.next, struct siw_cm_work, cep 282 drivers/infiniband/sw/siw/siw_cm.c spin_unlock_bh(&cep->lock); cep 286 drivers/infiniband/sw/siw/siw_cm.c static int siw_cm_alloc_work(struct siw_cep *cep, int num) cep 293 drivers/infiniband/sw/siw/siw_cm.c if (!(list_empty(&cep->work_freelist))) cep 294 drivers/infiniband/sw/siw/siw_cm.c siw_cm_free_work(cep); cep 297 drivers/infiniband/sw/siw/siw_cm.c work->cep = cep; cep 299 drivers/infiniband/sw/siw/siw_cm.c list_add(&work->list, &cep->work_freelist); cep 309 drivers/infiniband/sw/siw/siw_cm.c static int siw_cm_upcall(struct siw_cep *cep, enum iw_cm_event_type reason, cep 320 drivers/infiniband/sw/siw/siw_cm.c event.provider_data = cep; cep 321 drivers/infiniband/sw/siw/siw_cm.c id = cep->listen_cep->cm_id; cep 323 drivers/infiniband/sw/siw/siw_cm.c id = cep->cm_id; cep 329 drivers/infiniband/sw/siw/siw_cm.c event.ird = cep->ird; cep 330 drivers/infiniband/sw/siw/siw_cm.c event.ord = cep->ord; cep 332 drivers/infiniband/sw/siw/siw_cm.c event.ird = cep->ord; cep 333 drivers/infiniband/sw/siw/siw_cm.c event.ord = cep->ird; cep 338 drivers/infiniband/sw/siw/siw_cm.c u16 pd_len = be16_to_cpu(cep->mpa.hdr.params.pd_len); cep 345 drivers/infiniband/sw/siw/siw_cm.c event.private_data = cep->mpa.pdata; cep 348 drivers/infiniband/sw/siw/siw_cm.c if (cep->enhanced_rdma_conn_est) { cep 355 drivers/infiniband/sw/siw/siw_cm.c getname_local(cep->sock, &event.local_addr); cep 356 drivers/infiniband/sw/siw/siw_cm.c getname_peer(cep->sock, &event.remote_addr); cep 358 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "[QP %u]: reason=%d, status=%d\n", cep 359 drivers/infiniband/sw/siw/siw_cm.c cep->qp ? qp_id(cep->qp) : UINT_MAX, reason, status); cep 374 drivers/infiniband/sw/siw/siw_cm.c struct siw_cep *cep = qp->cep; cep 379 drivers/infiniband/sw/siw/siw_cm.c if (!qp->cep) cep 383 drivers/infiniband/sw/siw/siw_cm.c siw_cm_queue_work(cep, SIW_CM_WORK_CLOSE_LLP); cep 385 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_inuse(cep); cep 387 drivers/infiniband/sw/siw/siw_cm.c if (cep->state == SIW_EPSTATE_CLOSED) { cep 388 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "already closed\n"); cep 391 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "immediate close, state %d\n", cep->state); cep 396 drivers/infiniband/sw/siw/siw_cm.c if (cep->cm_id) { cep 397 drivers/infiniband/sw/siw/siw_cm.c switch (cep->state) { cep 399 drivers/infiniband/sw/siw/siw_cm.c siw_cm_upcall(cep, IW_CM_EVENT_CONNECT_REPLY, cep 404 drivers/infiniband/sw/siw/siw_cm.c siw_cm_upcall(cep, IW_CM_EVENT_CLOSE, 0); cep 416 drivers/infiniband/sw/siw/siw_cm.c cep->cm_id->rem_ref(cep->cm_id); cep 417 drivers/infiniband/sw/siw/siw_cm.c cep->cm_id = NULL; cep 418 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 420 drivers/infiniband/sw/siw/siw_cm.c cep->state = SIW_EPSTATE_CLOSED; cep 422 drivers/infiniband/sw/siw/siw_cm.c if (cep->sock) { cep 423 drivers/infiniband/sw/siw/siw_cm.c siw_socket_disassoc(cep->sock); cep 427 drivers/infiniband/sw/siw/siw_cm.c sock_release(cep->sock); cep 428 drivers/infiniband/sw/siw/siw_cm.c cep->sock = NULL; cep 430 drivers/infiniband/sw/siw/siw_cm.c if (cep->qp) { cep 431 drivers/infiniband/sw/siw/siw_cm.c cep->qp = NULL; cep 435 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_free(cep); cep 439 drivers/infiniband/sw/siw/siw_cm.c void siw_cep_put(struct siw_cep *cep) cep 441 drivers/infiniband/sw/siw/siw_cm.c WARN_ON(kref_read(&cep->ref) < 1); cep 442 drivers/infiniband/sw/siw/siw_cm.c kref_put(&cep->ref, __siw_cep_dealloc); cep 445 drivers/infiniband/sw/siw/siw_cm.c void siw_cep_get(struct siw_cep *cep) cep 447 drivers/infiniband/sw/siw/siw_cm.c kref_get(&cep->ref); cep 453 drivers/infiniband/sw/siw/siw_cm.c static int siw_send_mpareqrep(struct siw_cep *cep, const void *pdata, u8 pd_len) cep 455 drivers/infiniband/sw/siw/siw_cm.c struct socket *s = cep->sock; cep 456 drivers/infiniband/sw/siw/siw_cm.c struct mpa_rr *rr = &cep->mpa.hdr; cep 469 drivers/infiniband/sw/siw/siw_cm.c if (cep->enhanced_rdma_conn_est) { cep 471 drivers/infiniband/sw/siw/siw_cm.c iov[iovec_num].iov_base = &cep->mpa.v2_ctrl; cep 472 drivers/infiniband/sw/siw/siw_cm.c iov[iovec_num].iov_len = sizeof(cep->mpa.v2_ctrl); cep 473 drivers/infiniband/sw/siw/siw_cm.c mpa_len += sizeof(cep->mpa.v2_ctrl); cep 481 drivers/infiniband/sw/siw/siw_cm.c if (cep->enhanced_rdma_conn_est) cep 482 drivers/infiniband/sw/siw/siw_cm.c pd_len += sizeof(cep->mpa.v2_ctrl); cep 500 drivers/infiniband/sw/siw/siw_cm.c static int siw_recv_mpa_rr(struct siw_cep *cep) cep 502 drivers/infiniband/sw/siw/siw_cm.c struct mpa_rr *hdr = &cep->mpa.hdr; cep 503 drivers/infiniband/sw/siw/siw_cm.c struct socket *s = cep->sock; cep 507 drivers/infiniband/sw/siw/siw_cm.c if (cep->mpa.bytes_rcvd < sizeof(struct mpa_rr)) { cep 508 drivers/infiniband/sw/siw/siw_cm.c rcvd = ksock_recv(s, (char *)hdr + cep->mpa.bytes_rcvd, cep 509 drivers/infiniband/sw/siw/siw_cm.c sizeof(struct mpa_rr) - cep->mpa.bytes_rcvd, cep 514 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.bytes_rcvd += rcvd; cep 516 drivers/infiniband/sw/siw/siw_cm.c if (cep->mpa.bytes_rcvd < sizeof(struct mpa_rr)) cep 529 drivers/infiniband/sw/siw/siw_cm.c to_rcv = pd_len - (cep->mpa.bytes_rcvd - sizeof(struct mpa_rr)); cep 544 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "peer EOF\n"); cep 548 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "error: %d\n", rcvd); cep 551 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "peer sent extra data: %d\n", rcvd); cep 560 drivers/infiniband/sw/siw/siw_cm.c if (!cep->mpa.pdata) { cep 561 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.pdata = kmalloc(pd_len + 4, GFP_KERNEL); cep 562 drivers/infiniband/sw/siw/siw_cm.c if (!cep->mpa.pdata) cep 566 drivers/infiniband/sw/siw/siw_cm.c s, cep->mpa.pdata + cep->mpa.bytes_rcvd - sizeof(struct mpa_rr), cep 575 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.bytes_rcvd += rcvd; cep 578 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "%d bytes private data received\n", pd_len); cep 590 drivers/infiniband/sw/siw/siw_cm.c static int siw_proc_mpareq(struct siw_cep *cep) cep 596 drivers/infiniband/sw/siw/siw_cm.c rv = siw_recv_mpa_rr(cep); cep 600 drivers/infiniband/sw/siw/siw_cm.c req = &cep->mpa.hdr; cep 625 drivers/infiniband/sw/siw/siw_cm.c cep->enhanced_rdma_conn_est = true; cep 646 drivers/infiniband/sw/siw/siw_cm.c if (cep->enhanced_rdma_conn_est) { cep 647 drivers/infiniband/sw/siw/siw_cm.c struct mpa_v2_data *v2 = (struct mpa_v2_data *)cep->mpa.pdata; cep 654 drivers/infiniband/sw/siw/siw_cm.c cep->ord = ntohs(v2->ird) & MPA_IRD_ORD_MASK; cep 655 drivers/infiniband/sw/siw/siw_cm.c cep->ord = min(cep->ord, SIW_MAX_ORD_QP); cep 656 drivers/infiniband/sw/siw/siw_cm.c cep->ird = ntohs(v2->ord) & MPA_IRD_ORD_MASK; cep 657 drivers/infiniband/sw/siw/siw_cm.c cep->ird = min(cep->ird, SIW_MAX_IRD_QP); cep 660 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.v2_ctrl.ird = htons(cep->ird); cep 661 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.v2_ctrl.ord = htons(cep->ord); cep 672 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.v2_ctrl.ird |= MPA_V2_PEER_TO_PEER; cep 675 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.v2_ctrl.ord |= MPA_V2_RDMA_WRITE_RTR; cep 677 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.v2_ctrl.ord |= MPA_V2_RDMA_READ_RTR; cep 679 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.v2_ctrl.ord |= MPA_V2_RDMA_WRITE_RTR; cep 683 drivers/infiniband/sw/siw/siw_cm.c cep->state = SIW_EPSTATE_RECVD_MPAREQ; cep 686 drivers/infiniband/sw/siw/siw_cm.c siw_cep_get(cep); cep 687 drivers/infiniband/sw/siw/siw_cm.c rv = siw_cm_upcall(cep, IW_CM_EVENT_CONNECT_REQUEST, 0); cep 689 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 694 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "reject: crc %d:%d:%d, m %d:%d\n", cep 706 drivers/infiniband/sw/siw/siw_cm.c kfree(cep->mpa.pdata); cep 708 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.pdata = NULL; cep 710 drivers/infiniband/sw/siw/siw_cm.c siw_send_mpareqrep(cep, NULL, 0); cep 715 drivers/infiniband/sw/siw/siw_cm.c static int siw_proc_mpareply(struct siw_cep *cep) cep 719 drivers/infiniband/sw/siw/siw_cm.c struct siw_qp *qp = cep->qp; cep 727 drivers/infiniband/sw/siw/siw_cm.c rv = siw_recv_mpa_rr(cep); cep 729 drivers/infiniband/sw/siw/siw_cm.c siw_cancel_mpatimer(cep); cep 733 drivers/infiniband/sw/siw/siw_cm.c rep = &cep->mpa.hdr; cep 748 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "got mpa reject\n"); cep 749 drivers/infiniband/sw/siw/siw_cm.c siw_cm_upcall(cep, IW_CM_EVENT_CONNECT_REPLY, -ECONNRESET); cep 754 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "peer allows GSO on TX\n"); cep 761 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "reply unsupp: crc %d:%d:%d, m %d:%d\n", cep 766 drivers/infiniband/sw/siw/siw_cm.c siw_cm_upcall(cep, IW_CM_EVENT_CONNECT_REPLY, -ECONNREFUSED); cep 770 drivers/infiniband/sw/siw/siw_cm.c if (cep->enhanced_rdma_conn_est) { cep 779 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "mpa reply error: vers %d, enhcd %d\n", cep 785 drivers/infiniband/sw/siw/siw_cm.c siw_cm_upcall(cep, IW_CM_EVENT_CONNECT_REPLY, cep 789 drivers/infiniband/sw/siw/siw_cm.c v2 = (struct mpa_v2_data *)cep->mpa.pdata; cep 793 drivers/infiniband/sw/siw/siw_cm.c if (cep->ird < rep_ord && cep 795 drivers/infiniband/sw/siw/siw_cm.c rep_ord > cep->sdev->attrs.max_ird)) { cep 796 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "ird %d, rep_ord %d, max_ord %d\n", cep 797 drivers/infiniband/sw/siw/siw_cm.c cep->ird, rep_ord, cep 798 drivers/infiniband/sw/siw/siw_cm.c cep->sdev->attrs.max_ord); cep 801 drivers/infiniband/sw/siw/siw_cm.c if (cep->ord > rep_ird && relaxed_ird_negotiation == false) { cep 802 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "ord %d, rep_ird %d\n", cep->ord, cep 810 drivers/infiniband/sw/siw/siw_cm.c cep->ird = rep_ord; cep 811 drivers/infiniband/sw/siw/siw_cm.c cep->ord = rep_ird; cep 825 drivers/infiniband/sw/siw/siw_cm.c if (cep->mpa.v2_ctrl_req.ird & MPA_V2_PEER_TO_PEER) cep 827 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.v2_ctrl_req.ord & cep 839 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, cep 862 drivers/infiniband/sw/siw/siw_cm.c qp_attrs.irq_size = cep->ird; cep 863 drivers/infiniband/sw/siw/siw_cm.c qp_attrs.orq_size = cep->ord; cep 864 drivers/infiniband/sw/siw/siw_cm.c qp_attrs.sk = cep->sock; cep 879 drivers/infiniband/sw/siw/siw_cm.c siw_qp_socket_assoc(cep, qp); cep 890 drivers/infiniband/sw/siw/siw_cm.c rv = siw_cm_upcall(cep, IW_CM_EVENT_CONNECT_REPLY, 0); cep 892 drivers/infiniband/sw/siw/siw_cm.c cep->state = SIW_EPSTATE_RDMA_MODE; cep 898 drivers/infiniband/sw/siw/siw_cm.c siw_cm_upcall(cep, IW_CM_EVENT_CONNECT_REPLY, -EINVAL); cep 907 drivers/infiniband/sw/siw/siw_cm.c static void siw_accept_newconn(struct siw_cep *cep) cep 909 drivers/infiniband/sw/siw/siw_cm.c struct socket *s = cep->sock; cep 914 drivers/infiniband/sw/siw/siw_cm.c if (cep->state != SIW_EPSTATE_LISTENING) cep 917 drivers/infiniband/sw/siw/siw_cm.c new_cep = siw_cep_alloc(cep->sdev); cep 933 drivers/infiniband/sw/siw/siw_cm.c new_cep->sk_state_change = cep->sk_state_change; cep 934 drivers/infiniband/sw/siw/siw_cm.c new_cep->sk_data_ready = cep->sk_data_ready; cep 935 drivers/infiniband/sw/siw/siw_cm.c new_cep->sk_write_space = cep->sk_write_space; cep 936 drivers/infiniband/sw/siw/siw_cm.c new_cep->sk_error_report = cep->sk_error_report; cep 943 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "kernel_accept() error: %d\n", rv); cep 956 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "setsockopt NODELAY error: %d\n", rv); cep 968 drivers/infiniband/sw/siw/siw_cm.c new_cep->listen_cep = cep; cep 969 drivers/infiniband/sw/siw/siw_cm.c siw_cep_get(cep); cep 975 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "immediate mpa request\n"); cep 982 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 999 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "error %d\n", rv); cep 1005 drivers/infiniband/sw/siw/siw_cm.c struct siw_cep *cep; cep 1009 drivers/infiniband/sw/siw/siw_cm.c cep = work->cep; cep 1011 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "[QP %u]: work type: %d, state %d\n", cep 1012 drivers/infiniband/sw/siw/siw_cm.c cep->qp ? qp_id(cep->qp) : UINT_MAX, cep 1013 drivers/infiniband/sw/siw/siw_cm.c work->type, cep->state); cep 1015 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_inuse(cep); cep 1019 drivers/infiniband/sw/siw/siw_cm.c siw_accept_newconn(cep); cep 1023 drivers/infiniband/sw/siw/siw_cm.c if (cep->state == SIW_EPSTATE_AWAIT_MPAREQ) { cep 1024 drivers/infiniband/sw/siw/siw_cm.c if (cep->listen_cep) { cep 1025 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_inuse(cep->listen_cep); cep 1027 drivers/infiniband/sw/siw/siw_cm.c if (cep->listen_cep->state == cep 1029 drivers/infiniband/sw/siw/siw_cm.c rv = siw_proc_mpareq(cep); cep 1033 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_free(cep->listen_cep); cep 1036 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep->listen_cep); cep 1037 drivers/infiniband/sw/siw/siw_cm.c cep->listen_cep = NULL; cep 1039 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 1042 drivers/infiniband/sw/siw/siw_cm.c } else if (cep->state == SIW_EPSTATE_AWAIT_MPAREP) { cep 1043 drivers/infiniband/sw/siw/siw_cm.c rv = siw_proc_mpareply(cep); cep 1050 drivers/infiniband/sw/siw/siw_cm.c if (cep->state == SIW_EPSTATE_RDMA_MODE) { cep 1051 drivers/infiniband/sw/siw/siw_cm.c cep->sock->sk->sk_data_ready(cep->sock->sk); cep 1052 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "already in RDMA mode"); cep 1054 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "out of state: %d\n", cep 1055 drivers/infiniband/sw/siw/siw_cm.c cep->state); cep 1066 drivers/infiniband/sw/siw/siw_cm.c if (cep->qp && cep->qp->term_info.valid) cep 1067 drivers/infiniband/sw/siw/siw_cm.c siw_send_terminate(cep->qp); cep 1069 drivers/infiniband/sw/siw/siw_cm.c if (cep->cm_id) cep 1070 drivers/infiniband/sw/siw/siw_cm.c siw_cm_upcall(cep, IW_CM_EVENT_CLOSE, 0); cep 1076 drivers/infiniband/sw/siw/siw_cm.c if (cep->cm_id) { cep 1077 drivers/infiniband/sw/siw/siw_cm.c if (cep->state == SIW_EPSTATE_AWAIT_MPAREP) { cep 1081 drivers/infiniband/sw/siw/siw_cm.c siw_cm_upcall(cep, IW_CM_EVENT_CONNECT_REPLY, cep 1083 drivers/infiniband/sw/siw/siw_cm.c } else if (cep->state == SIW_EPSTATE_RDMA_MODE) { cep 1088 drivers/infiniband/sw/siw/siw_cm.c siw_cm_upcall(cep, IW_CM_EVENT_DISCONNECT, 0); cep 1089 drivers/infiniband/sw/siw/siw_cm.c siw_cm_upcall(cep, IW_CM_EVENT_CLOSE, 0); cep 1096 drivers/infiniband/sw/siw/siw_cm.c if (cep->state == SIW_EPSTATE_RECVD_MPAREQ) { cep 1100 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, cep 1102 drivers/infiniband/sw/siw/siw_cm.c } else if (cep->state == SIW_EPSTATE_AWAIT_MPAREQ) { cep 1106 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "no mpareq: drop listener\n"); cep 1107 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep->listen_cep); cep 1108 drivers/infiniband/sw/siw/siw_cm.c cep->listen_cep = NULL; cep 1115 drivers/infiniband/sw/siw/siw_cm.c cep->mpa_timer = NULL; cep 1117 drivers/infiniband/sw/siw/siw_cm.c if (cep->state == SIW_EPSTATE_AWAIT_MPAREP) { cep 1123 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.hdr.params.pd_len = 0; cep 1125 drivers/infiniband/sw/siw/siw_cm.c if (cep->cm_id) cep 1126 drivers/infiniband/sw/siw/siw_cm.c siw_cm_upcall(cep, IW_CM_EVENT_CONNECT_REPLY, cep 1130 drivers/infiniband/sw/siw/siw_cm.c } else if (cep->state == SIW_EPSTATE_AWAIT_MPAREQ) { cep 1134 drivers/infiniband/sw/siw/siw_cm.c if (cep->listen_cep) { cep 1135 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep->listen_cep); cep 1136 drivers/infiniband/sw/siw/siw_cm.c cep->listen_cep = NULL; cep 1146 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, cep 1148 drivers/infiniband/sw/siw/siw_cm.c cep->mpa_timer ? "y" : "n", cep 1149 drivers/infiniband/sw/siw/siw_cm.c cep->qp ? qp_id(cep->qp) : UINT_MAX); cep 1151 drivers/infiniband/sw/siw/siw_cm.c siw_cancel_mpatimer(cep); cep 1153 drivers/infiniband/sw/siw/siw_cm.c cep->state = SIW_EPSTATE_CLOSED; cep 1155 drivers/infiniband/sw/siw/siw_cm.c if (cep->qp) { cep 1156 drivers/infiniband/sw/siw/siw_cm.c struct siw_qp *qp = cep->qp; cep 1162 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_free(cep); cep 1167 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_inuse(cep); cep 1168 drivers/infiniband/sw/siw/siw_cm.c cep->qp = NULL; cep 1171 drivers/infiniband/sw/siw/siw_cm.c if (cep->sock) { cep 1172 drivers/infiniband/sw/siw/siw_cm.c siw_socket_disassoc(cep->sock); cep 1173 drivers/infiniband/sw/siw/siw_cm.c sock_release(cep->sock); cep 1174 drivers/infiniband/sw/siw/siw_cm.c cep->sock = NULL; cep 1176 drivers/infiniband/sw/siw/siw_cm.c if (cep->cm_id) { cep 1177 drivers/infiniband/sw/siw/siw_cm.c cep->cm_id->rem_ref(cep->cm_id); cep 1178 drivers/infiniband/sw/siw/siw_cm.c cep->cm_id = NULL; cep 1179 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 1182 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_free(cep); cep 1184 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 1189 drivers/infiniband/sw/siw/siw_cm.c int siw_cm_queue_work(struct siw_cep *cep, enum siw_work_type type) cep 1191 drivers/infiniband/sw/siw/siw_cm.c struct siw_cm_work *work = siw_get_work(cep); cep 1195 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "failed with no work available\n"); cep 1199 drivers/infiniband/sw/siw/siw_cm.c work->cep = cep; cep 1201 drivers/infiniband/sw/siw/siw_cm.c siw_cep_get(cep); cep 1206 drivers/infiniband/sw/siw/siw_cm.c cep->mpa_timer = work; cep 1208 drivers/infiniband/sw/siw/siw_cm.c if (cep->state == SIW_EPSTATE_AWAIT_MPAREP) cep 1213 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "[QP %u]: work type: %d, timeout %lu\n", cep 1214 drivers/infiniband/sw/siw/siw_cm.c cep->qp ? qp_id(cep->qp) : -1, type, delay); cep 1223 drivers/infiniband/sw/siw/siw_cm.c struct siw_cep *cep; cep 1227 drivers/infiniband/sw/siw/siw_cm.c cep = sk_to_cep(sk); cep 1228 drivers/infiniband/sw/siw/siw_cm.c if (!cep) cep 1231 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "state: %d\n", cep->state); cep 1233 drivers/infiniband/sw/siw/siw_cm.c switch (cep->state) { cep 1242 drivers/infiniband/sw/siw/siw_cm.c siw_cm_queue_work(cep, SIW_CM_WORK_READ_MPAHDR); cep 1246 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "unexpected data, state %d\n", cep->state); cep 1255 drivers/infiniband/sw/siw/siw_cm.c struct siw_cep *cep = sk_to_cep(sk); cep 1257 drivers/infiniband/sw/siw/siw_cm.c if (cep) cep 1258 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "state: %d\n", cep->state); cep 1263 drivers/infiniband/sw/siw/siw_cm.c struct siw_cep *cep = sk_to_cep(sk); cep 1265 drivers/infiniband/sw/siw/siw_cm.c if (cep) { cep 1266 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "error %d, socket state: %d, cep state: %d\n", cep 1267 drivers/infiniband/sw/siw/siw_cm.c sk->sk_err, sk->sk_state, cep->state); cep 1268 drivers/infiniband/sw/siw/siw_cm.c cep->sk_error_report(sk); cep 1274 drivers/infiniband/sw/siw/siw_cm.c struct siw_cep *cep; cep 1279 drivers/infiniband/sw/siw/siw_cm.c cep = sk_to_cep(sk); cep 1280 drivers/infiniband/sw/siw/siw_cm.c if (!cep) { cep 1285 drivers/infiniband/sw/siw/siw_cm.c orig_state_change = cep->sk_state_change; cep 1287 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "state: %d\n", cep->state); cep 1295 drivers/infiniband/sw/siw/siw_cm.c siw_cm_queue_work(cep, SIW_CM_WORK_ACCEPT); cep 1300 drivers/infiniband/sw/siw/siw_cm.c if (cep->qp) cep 1301 drivers/infiniband/sw/siw/siw_cm.c cep->qp->tx_ctx.tx_suspend = 1; cep 1302 drivers/infiniband/sw/siw/siw_cm.c siw_cm_queue_work(cep, SIW_CM_WORK_PEER_CLOSE); cep 1306 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "unexpected socket state %d\n", sk->sk_state); cep 1340 drivers/infiniband/sw/siw/siw_cm.c struct siw_cep *cep = NULL; cep 1416 drivers/infiniband/sw/siw/siw_cm.c cep = siw_cep_alloc(sdev); cep 1417 drivers/infiniband/sw/siw/siw_cm.c if (!cep) { cep 1421 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_inuse(cep); cep 1424 drivers/infiniband/sw/siw/siw_cm.c siw_cep_get(cep); cep 1425 drivers/infiniband/sw/siw/siw_cm.c qp->cep = cep; cep 1428 drivers/infiniband/sw/siw/siw_cm.c cep->qp = qp; cep 1431 drivers/infiniband/sw/siw/siw_cm.c cep->cm_id = id; cep 1438 drivers/infiniband/sw/siw/siw_cm.c rv = siw_cm_alloc_work(cep, 4); cep 1443 drivers/infiniband/sw/siw/siw_cm.c cep->ird = params->ird; cep 1444 drivers/infiniband/sw/siw/siw_cm.c cep->ord = params->ord; cep 1446 drivers/infiniband/sw/siw/siw_cm.c if (p2p_mode && cep->ord == 0) cep 1447 drivers/infiniband/sw/siw/siw_cm.c cep->ord = 1; cep 1449 drivers/infiniband/sw/siw/siw_cm.c cep->state = SIW_EPSTATE_CONNECTING; cep 1454 drivers/infiniband/sw/siw/siw_cm.c siw_cep_socket_assoc(cep, s); cep 1456 drivers/infiniband/sw/siw/siw_cm.c cep->state = SIW_EPSTATE_AWAIT_MPAREP; cep 1462 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.hdr.params.bits = 0; cep 1469 drivers/infiniband/sw/siw/siw_cm.c __mpa_rr_set_revision(&cep->mpa.hdr.params.bits, version); cep 1472 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.hdr.params.bits |= MPA_RR_FLAG_GSO_EXP; cep 1475 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.hdr.params.bits |= MPA_RR_FLAG_CRC; cep 1484 drivers/infiniband/sw/siw/siw_cm.c cep->enhanced_rdma_conn_est = true; cep 1485 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.hdr.params.bits |= MPA_RR_FLAG_ENHANCED; cep 1487 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.v2_ctrl.ird = htons(cep->ird); cep 1488 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.v2_ctrl.ord = htons(cep->ord); cep 1491 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.v2_ctrl.ird |= MPA_V2_PEER_TO_PEER; cep 1492 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.v2_ctrl.ord |= rtr_type; cep 1495 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.v2_ctrl_req.ird = cep->mpa.v2_ctrl.ird; cep 1496 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.v2_ctrl_req.ord = cep->mpa.v2_ctrl.ord; cep 1498 drivers/infiniband/sw/siw/siw_cm.c memcpy(cep->mpa.hdr.key, MPA_KEY_REQ, 16); cep 1500 drivers/infiniband/sw/siw/siw_cm.c rv = siw_send_mpareqrep(cep, params->private_data, pd_len); cep 1504 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.hdr.params.pd_len = 0; cep 1507 drivers/infiniband/sw/siw/siw_cm.c rv = siw_cm_queue_work(cep, SIW_CM_WORK_MPATIMEOUT); cep 1509 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "[QP %u]: exit\n", qp_id(qp)); cep 1510 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_free(cep); cep 1517 drivers/infiniband/sw/siw/siw_cm.c if (cep) { cep 1520 drivers/infiniband/sw/siw/siw_cm.c cep->sock = NULL; cep 1522 drivers/infiniband/sw/siw/siw_cm.c cep->qp = NULL; cep 1524 drivers/infiniband/sw/siw/siw_cm.c cep->cm_id = NULL; cep 1526 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 1528 drivers/infiniband/sw/siw/siw_cm.c qp->cep = NULL; cep 1529 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 1531 drivers/infiniband/sw/siw/siw_cm.c cep->state = SIW_EPSTATE_CLOSED; cep 1533 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_free(cep); cep 1535 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 1563 drivers/infiniband/sw/siw/siw_cm.c struct siw_cep *cep = (struct siw_cep *)id->provider_data; cep 1569 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_inuse(cep); cep 1570 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 1573 drivers/infiniband/sw/siw/siw_cm.c if (cep->mpa.hdr.params.pd_len) { cep 1574 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.hdr.params.pd_len = 0; cep 1575 drivers/infiniband/sw/siw/siw_cm.c kfree(cep->mpa.pdata); cep 1576 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.pdata = NULL; cep 1578 drivers/infiniband/sw/siw/siw_cm.c siw_cancel_mpatimer(cep); cep 1580 drivers/infiniband/sw/siw/siw_cm.c if (cep->state != SIW_EPSTATE_RECVD_MPAREQ) { cep 1581 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "out of state\n"); cep 1583 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_free(cep); cep 1584 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 1591 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_free(cep); cep 1592 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 1602 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "[QP %d]\n", params->qpn); cep 1604 drivers/infiniband/sw/siw/siw_cm.c if (try_gso && cep->mpa.hdr.params.bits & MPA_RR_FLAG_GSO_EXP) { cep 1605 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "peer allows GSO on TX\n"); cep 1611 drivers/infiniband/sw/siw/siw_cm.c cep, cep 1619 drivers/infiniband/sw/siw/siw_cm.c if (cep->enhanced_rdma_conn_est) cep 1624 drivers/infiniband/sw/siw/siw_cm.c cep, cep 1631 drivers/infiniband/sw/siw/siw_cm.c if (cep->enhanced_rdma_conn_est) { cep 1632 drivers/infiniband/sw/siw/siw_cm.c if (params->ord > cep->ord) { cep 1634 drivers/infiniband/sw/siw/siw_cm.c params->ord = cep->ord; cep 1636 drivers/infiniband/sw/siw/siw_cm.c cep->ird = params->ird; cep 1637 drivers/infiniband/sw/siw/siw_cm.c cep->ord = params->ord; cep 1643 drivers/infiniband/sw/siw/siw_cm.c if (params->ird < cep->ird) { cep 1645 drivers/infiniband/sw/siw/siw_cm.c cep->ird <= sdev->attrs.max_ird) cep 1646 drivers/infiniband/sw/siw/siw_cm.c params->ird = cep->ird; cep 1653 drivers/infiniband/sw/siw/siw_cm.c if (cep->mpa.v2_ctrl.ord & cep 1659 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.v2_ctrl.ord = cep 1661 drivers/infiniband/sw/siw/siw_cm.c (cep->mpa.v2_ctrl.ord & ~MPA_V2_MASK_IRD_ORD); cep 1662 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.v2_ctrl.ird = cep 1664 drivers/infiniband/sw/siw/siw_cm.c (cep->mpa.v2_ctrl.ird & ~MPA_V2_MASK_IRD_ORD); cep 1666 drivers/infiniband/sw/siw/siw_cm.c cep->ird = params->ird; cep 1667 drivers/infiniband/sw/siw/siw_cm.c cep->ord = params->ord; cep 1669 drivers/infiniband/sw/siw/siw_cm.c cep->cm_id = id; cep 1673 drivers/infiniband/sw/siw/siw_cm.c qp_attrs.orq_size = cep->ord; cep 1674 drivers/infiniband/sw/siw/siw_cm.c qp_attrs.irq_size = cep->ird; cep 1675 drivers/infiniband/sw/siw/siw_cm.c qp_attrs.sk = cep->sock; cep 1676 drivers/infiniband/sw/siw/siw_cm.c if (cep->mpa.hdr.params.bits & MPA_RR_FLAG_CRC) cep 1680 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "[QP%u]: moving to rts\n", qp_id(qp)); cep 1683 drivers/infiniband/sw/siw/siw_cm.c siw_cep_get(cep); cep 1684 drivers/infiniband/sw/siw/siw_cm.c qp->cep = cep; cep 1687 drivers/infiniband/sw/siw/siw_cm.c cep->qp = qp; cep 1689 drivers/infiniband/sw/siw/siw_cm.c cep->state = SIW_EPSTATE_RDMA_MODE; cep 1701 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "[QP %u]: send mpa reply, %d byte pdata\n", cep 1704 drivers/infiniband/sw/siw/siw_cm.c rv = siw_send_mpareqrep(cep, params->private_data, cep 1710 drivers/infiniband/sw/siw/siw_cm.c siw_sk_assign_rtr_upcalls(cep); cep 1712 drivers/infiniband/sw/siw/siw_cm.c siw_qp_socket_assoc(cep, qp); cep 1713 drivers/infiniband/sw/siw/siw_cm.c rv = siw_cm_upcall(cep, IW_CM_EVENT_ESTABLISHED, 0); cep 1717 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_free(cep); cep 1721 drivers/infiniband/sw/siw/siw_cm.c siw_socket_disassoc(cep->sock); cep 1722 drivers/infiniband/sw/siw/siw_cm.c sock_release(cep->sock); cep 1723 drivers/infiniband/sw/siw/siw_cm.c cep->sock = NULL; cep 1725 drivers/infiniband/sw/siw/siw_cm.c cep->state = SIW_EPSTATE_CLOSED; cep 1727 drivers/infiniband/sw/siw/siw_cm.c if (cep->cm_id) { cep 1728 drivers/infiniband/sw/siw/siw_cm.c cep->cm_id->rem_ref(id); cep 1729 drivers/infiniband/sw/siw/siw_cm.c cep->cm_id = NULL; cep 1731 drivers/infiniband/sw/siw/siw_cm.c if (qp->cep) { cep 1732 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 1733 drivers/infiniband/sw/siw/siw_cm.c qp->cep = NULL; cep 1735 drivers/infiniband/sw/siw/siw_cm.c cep->qp = NULL; cep 1738 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_free(cep); cep 1739 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 1752 drivers/infiniband/sw/siw/siw_cm.c struct siw_cep *cep = (struct siw_cep *)id->provider_data; cep 1754 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_inuse(cep); cep 1755 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 1757 drivers/infiniband/sw/siw/siw_cm.c siw_cancel_mpatimer(cep); cep 1759 drivers/infiniband/sw/siw/siw_cm.c if (cep->state != SIW_EPSTATE_RECVD_MPAREQ) { cep 1760 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "out of state\n"); cep 1762 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_free(cep); cep 1763 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); /* put last reference */ cep 1767 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "cep->state %d, pd_len %d\n", cep->state, cep 1770 drivers/infiniband/sw/siw/siw_cm.c if (__mpa_rr_revision(cep->mpa.hdr.params.bits) >= MPA_REVISION_1) { cep 1771 drivers/infiniband/sw/siw/siw_cm.c cep->mpa.hdr.params.bits |= MPA_RR_FLAG_REJECT; /* reject */ cep 1772 drivers/infiniband/sw/siw/siw_cm.c siw_send_mpareqrep(cep, pdata, pd_len); cep 1774 drivers/infiniband/sw/siw/siw_cm.c siw_socket_disassoc(cep->sock); cep 1775 drivers/infiniband/sw/siw/siw_cm.c sock_release(cep->sock); cep 1776 drivers/infiniband/sw/siw/siw_cm.c cep->sock = NULL; cep 1778 drivers/infiniband/sw/siw/siw_cm.c cep->state = SIW_EPSTATE_CLOSED; cep 1780 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_free(cep); cep 1781 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 1795 drivers/infiniband/sw/siw/siw_cm.c struct siw_cep *cep = NULL; cep 1840 drivers/infiniband/sw/siw/siw_cm.c cep = siw_cep_alloc(sdev); cep 1841 drivers/infiniband/sw/siw/siw_cm.c if (!cep) { cep 1845 drivers/infiniband/sw/siw/siw_cm.c siw_cep_socket_assoc(cep, s); cep 1847 drivers/infiniband/sw/siw/siw_cm.c rv = siw_cm_alloc_work(cep, backlog); cep 1859 drivers/infiniband/sw/siw/siw_cm.c cep->cm_id = id; cep 1891 drivers/infiniband/sw/siw/siw_cm.c list_add_tail(&cep->listenq, (struct list_head *)id->provider_data); cep 1892 drivers/infiniband/sw/siw/siw_cm.c cep->state = SIW_EPSTATE_LISTENING; cep 1901 drivers/infiniband/sw/siw/siw_cm.c if (cep) { cep 1902 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_inuse(cep); cep 1904 drivers/infiniband/sw/siw/siw_cm.c if (cep->cm_id) { cep 1905 drivers/infiniband/sw/siw/siw_cm.c cep->cm_id->rem_ref(cep->cm_id); cep 1906 drivers/infiniband/sw/siw/siw_cm.c cep->cm_id = NULL; cep 1908 drivers/infiniband/sw/siw/siw_cm.c cep->sock = NULL; cep 1910 drivers/infiniband/sw/siw/siw_cm.c cep->state = SIW_EPSTATE_CLOSED; cep 1912 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_free(cep); cep 1913 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 1929 drivers/infiniband/sw/siw/siw_cm.c struct siw_cep *cep = list_entry(p, struct siw_cep, listenq); cep 1933 drivers/infiniband/sw/siw/siw_cm.c siw_dbg_cep(cep, "drop cep, state %d\n", cep->state); cep 1935 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_inuse(cep); cep 1937 drivers/infiniband/sw/siw/siw_cm.c if (cep->cm_id) { cep 1938 drivers/infiniband/sw/siw/siw_cm.c cep->cm_id->rem_ref(cep->cm_id); cep 1939 drivers/infiniband/sw/siw/siw_cm.c cep->cm_id = NULL; cep 1941 drivers/infiniband/sw/siw/siw_cm.c if (cep->sock) { cep 1942 drivers/infiniband/sw/siw/siw_cm.c siw_socket_disassoc(cep->sock); cep 1943 drivers/infiniband/sw/siw/siw_cm.c sock_release(cep->sock); cep 1944 drivers/infiniband/sw/siw/siw_cm.c cep->sock = NULL; cep 1946 drivers/infiniband/sw/siw/siw_cm.c cep->state = SIW_EPSTATE_CLOSED; cep 1947 drivers/infiniband/sw/siw/siw_cm.c siw_cep_set_free(cep); cep 1948 drivers/infiniband/sw/siw/siw_cm.c siw_cep_put(cep); cep 89 drivers/infiniband/sw/siw/siw_cm.h struct siw_cep *cep; cep 120 drivers/infiniband/sw/siw/siw_cm.h void siw_cep_get(struct siw_cep *cep); cep 121 drivers/infiniband/sw/siw/siw_cm.h void siw_cep_put(struct siw_cep *cep); cep 122 drivers/infiniband/sw/siw/siw_cm.h int siw_cm_queue_work(struct siw_cep *cep, enum siw_work_type type); cep 168 drivers/infiniband/sw/siw/siw_qp.c if (qp->cep) { cep 169 drivers/infiniband/sw/siw/siw_qp.c siw_cep_put(qp->cep); cep 170 drivers/infiniband/sw/siw/siw_qp.c qp->cep = NULL; cep 185 drivers/infiniband/sw/siw/siw_qp.c struct siw_cep *cep; cep 189 drivers/infiniband/sw/siw/siw_qp.c cep = sk_to_cep(sk); cep 190 drivers/infiniband/sw/siw/siw_qp.c if (cep) { cep 191 drivers/infiniband/sw/siw/siw_qp.c cep->sk_write_space(sk); cep 194 drivers/infiniband/sw/siw/siw_qp.c (void)siw_sq_start(cep->qp); cep 408 drivers/infiniband/sw/siw/siw_qp.c if (!s && qp->cep) cep 410 drivers/infiniband/sw/siw/siw_qp.c s = qp->cep->sock; cep 690 drivers/infiniband/sw/siw/siw_qp.c if (qp->cep) { cep 691 drivers/infiniband/sw/siw/siw_qp.c siw_cep_put(qp->cep); cep 692 drivers/infiniband/sw/siw/siw_qp.c qp->cep = NULL; cep 1319 drivers/infiniband/sw/siw/siw_qp.c if (qp->cep) cep 1320 drivers/infiniband/sw/siw/siw_qp.c siw_cep_put(qp->cep); cep 631 drivers/infiniband/sw/siw/siw_verbs.c if (qp->cep) { cep 632 drivers/infiniband/sw/siw/siw_verbs.c siw_cep_put(qp->cep); cep 633 drivers/infiniband/sw/siw/siw_verbs.c qp->cep = NULL; cep 741 drivers/misc/mic/scif/scif_api.c struct scif_endpt *cep; cep 797 drivers/misc/mic/scif/scif_api.c cep = kzalloc(sizeof(*cep), GFP_KERNEL); cep 798 drivers/misc/mic/scif/scif_api.c if (!cep) { cep 802 drivers/misc/mic/scif/scif_api.c spin_lock_init(&cep->lock); cep 803 drivers/misc/mic/scif/scif_api.c mutex_init(&cep->sendlock); cep 804 drivers/misc/mic/scif/scif_api.c mutex_init(&cep->recvlock); cep 805 drivers/misc/mic/scif/scif_api.c cep->state = SCIFEP_CONNECTING; cep 806 drivers/misc/mic/scif/scif_api.c cep->remote_dev = &scif_dev[peer->node]; cep 807 drivers/misc/mic/scif/scif_api.c cep->remote_ep = conreq->msg.payload[0]; cep 809 drivers/misc/mic/scif/scif_api.c scif_rma_ep_init(cep); cep 811 drivers/misc/mic/scif/scif_api.c err = scif_reserve_dma_chan(cep); cep 818 drivers/misc/mic/scif/scif_api.c cep->qp_info.qp = kzalloc(sizeof(*cep->qp_info.qp), GFP_KERNEL); cep 819 drivers/misc/mic/scif/scif_api.c if (!cep->qp_info.qp) { cep 824 drivers/misc/mic/scif/scif_api.c err = scif_anon_inode_getfile(cep); cep 828 drivers/misc/mic/scif/scif_api.c cep->qp_info.qp->magic = SCIFEP_MAGIC; cep 829 drivers/misc/mic/scif/scif_api.c spdev = scif_get_peer_dev(cep->remote_dev); cep 834 drivers/misc/mic/scif/scif_api.c err = scif_setup_qp_accept(cep->qp_info.qp, &cep->qp_info.qp_offset, cep 836 drivers/misc/mic/scif/scif_api.c cep->remote_dev); cep 838 drivers/misc/mic/scif/scif_api.c dev_dbg(&cep->remote_dev->sdev->dev, cep 840 drivers/misc/mic/scif/scif_api.c lep, cep, err, cep->qp_info.qp_offset); cep 845 drivers/misc/mic/scif/scif_api.c cep->port.node = lep->port.node; cep 846 drivers/misc/mic/scif/scif_api.c cep->port.port = lep->port.port; cep 847 drivers/misc/mic/scif/scif_api.c cep->peer.node = peer->node; cep 848 drivers/misc/mic/scif/scif_api.c cep->peer.port = peer->port; cep 849 drivers/misc/mic/scif/scif_api.c init_waitqueue_head(&cep->sendwq); cep 850 drivers/misc/mic/scif/scif_api.c init_waitqueue_head(&cep->recvwq); cep 851 drivers/misc/mic/scif/scif_api.c init_waitqueue_head(&cep->conwq); cep 854 drivers/misc/mic/scif/scif_api.c msg.src = cep->port; cep 855 drivers/misc/mic/scif/scif_api.c msg.payload[0] = cep->remote_ep; cep 856 drivers/misc/mic/scif/scif_api.c msg.payload[1] = cep->qp_info.qp_offset; cep 857 drivers/misc/mic/scif/scif_api.c msg.payload[2] = (u64)cep; cep 859 drivers/misc/mic/scif/scif_api.c err = _scif_nodeqp_send(cep->remote_dev, &msg); cep 865 drivers/misc/mic/scif/scif_api.c err = wait_event_timeout(cep->conwq, cep->state != SCIFEP_CONNECTING, cep 867 drivers/misc/mic/scif/scif_api.c if (!err && scifdev_alive(cep)) cep 874 drivers/misc/mic/scif/scif_api.c spin_lock(&cep->lock); cep 876 drivers/misc/mic/scif/scif_api.c if (cep->state == SCIFEP_CLOSING) { cep 881 drivers/misc/mic/scif/scif_api.c spin_unlock(&cep->lock); cep 882 drivers/misc/mic/scif/scif_api.c scif_teardown_ep(cep); cep 883 drivers/misc/mic/scif/scif_api.c kfree(cep); cep 893 drivers/misc/mic/scif/scif_api.c scif_get_port(cep->port.port); cep 894 drivers/misc/mic/scif/scif_api.c *newepd = (scif_epd_t)cep; cep 895 drivers/misc/mic/scif/scif_api.c spin_unlock(&cep->lock); cep 898 drivers/misc/mic/scif/scif_api.c scif_anon_inode_fput(cep); cep 900 drivers/misc/mic/scif/scif_api.c scif_teardown_ep(cep); cep 902 drivers/misc/mic/scif/scif_api.c kfree(cep); cep 1340 drivers/scsi/cxgbi/libcxgbi.c struct cxgbi_sock *csk = cconn->cep->csk; cep 1483 drivers/scsi/cxgbi/libcxgbi.c cconn->cep->csk, task, tdata->dlen, cep 1895 drivers/scsi/cxgbi/libcxgbi.c struct cxgbi_sock *csk = cconn->cep->csk; cep 2079 drivers/scsi/cxgbi/libcxgbi.c if (cconn && cconn->cep) cep 2080 drivers/scsi/cxgbi/libcxgbi.c csk = cconn->cep->csk; cep 2104 drivers/scsi/cxgbi/libcxgbi.c err = cxgbi_sock_send_pdus(cconn->cep->csk, skb); cep 2247 drivers/scsi/cxgbi/libcxgbi.c struct cxgbi_sock *csk = cconn->cep->csk; cep 2319 drivers/scsi/cxgbi/libcxgbi.c struct cxgbi_endpoint *cep = ep->dd_data; cep 2328 drivers/scsi/cxgbi/libcxgbi.c if (!cep) cep 2331 drivers/scsi/cxgbi/libcxgbi.c csk = cep->csk; cep 2378 drivers/scsi/cxgbi/libcxgbi.c struct cxgbi_endpoint *cep; cep 2387 drivers/scsi/cxgbi/libcxgbi.c cep = ep->dd_data; cep 2388 drivers/scsi/cxgbi/libcxgbi.c csk = cep->csk; cep 2405 drivers/scsi/cxgbi/libcxgbi.c cconn->chba = cep->chba; cep 2406 drivers/scsi/cxgbi/libcxgbi.c cconn->cep = cep; cep 2407 drivers/scsi/cxgbi/libcxgbi.c cep->cconn = cconn; cep 2427 drivers/scsi/cxgbi/libcxgbi.c struct cxgbi_endpoint *cep; cep 2438 drivers/scsi/cxgbi/libcxgbi.c cep = ep->dd_data; cep 2439 drivers/scsi/cxgbi/libcxgbi.c chba = cep->chba; cep 2557 drivers/scsi/cxgbi/libcxgbi.c struct cxgbi_endpoint *cep; cep 2626 drivers/scsi/cxgbi/libcxgbi.c ep = iscsi_create_endpoint(sizeof(*cep)); cep 2633 drivers/scsi/cxgbi/libcxgbi.c cep = ep->dd_data; cep 2634 drivers/scsi/cxgbi/libcxgbi.c cep->csk = csk; cep 2635 drivers/scsi/cxgbi/libcxgbi.c cep->chba = hba; cep 2639 drivers/scsi/cxgbi/libcxgbi.c ep, cep, csk, hba, hba->ndev->name); cep 2652 drivers/scsi/cxgbi/libcxgbi.c struct cxgbi_endpoint *cep = ep->dd_data; cep 2653 drivers/scsi/cxgbi/libcxgbi.c struct cxgbi_sock *csk = cep->csk; cep 2663 drivers/scsi/cxgbi/libcxgbi.c struct cxgbi_endpoint *cep = ep->dd_data; cep 2664 drivers/scsi/cxgbi/libcxgbi.c struct cxgbi_conn *cconn = cep->cconn; cep 2665 drivers/scsi/cxgbi/libcxgbi.c struct cxgbi_sock *csk = cep->csk; cep 2669 drivers/scsi/cxgbi/libcxgbi.c ep, cep, cconn, csk, csk->state, csk->flags); cep 2674 drivers/scsi/cxgbi/libcxgbi.c cep->csk->user_data = NULL; cep 2675 drivers/scsi/cxgbi/libcxgbi.c cconn->cep = NULL; cep 512 drivers/scsi/cxgbi/libcxgbi.h struct cxgbi_endpoint *cep; cep 51 tools/perf/util/s390-sample-raw.c struct cf_ctrset_entry *cep, ce; cep 56 tools/perf/util/s390-sample-raw.c cep = (struct cf_ctrset_entry *)(buf + offset); cep 57 tools/perf/util/s390-sample-raw.c ce.def = be16_to_cpu(cep->def); cep 58 tools/perf/util/s390-sample-raw.c ce.set = be16_to_cpu(cep->set); cep 59 tools/perf/util/s390-sample-raw.c ce.ctr = be16_to_cpu(cep->ctr); cep 60 tools/perf/util/s390-sample-raw.c ce.res1 = be16_to_cpu(cep->res1); cep 161 tools/perf/util/s390-sample-raw.c struct cf_ctrset_entry *cep, ce; cep 169 tools/perf/util/s390-sample-raw.c cep = (struct cf_ctrset_entry *)(buf + offset); cep 171 tools/perf/util/s390-sample-raw.c ce.def = be16_to_cpu(cep->def); cep 172 tools/perf/util/s390-sample-raw.c ce.set = be16_to_cpu(cep->set); cep 173 tools/perf/util/s390-sample-raw.c ce.ctr = be16_to_cpu(cep->ctr); cep 174 tools/perf/util/s390-sample-raw.c ce.res1 = be16_to_cpu(cep->res1); cep 178 tools/perf/util/s390-sample-raw.c (struct cf_trailer_entry *)cep); cep 184 tools/perf/util/s390-sample-raw.c for (i = 0, p = (u64 *)(cep + 1); i < ce.ctr; ++i, ++p) {