• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/dev/iser/

Lines Matching refs:ib_conn

83  * @ib_conn:   connection RDMA resources
91 iser_handle_comp_error(struct ib_conn *ib_conn,
95 struct iser_conn *iser_conn = container_of(ib_conn, struct iser_conn,
96 ib_conn);
102 ib_conn->post_recv_buf_count--;
118 struct ib_conn *ib_conn;
122 ib_conn = wc->qp->qp_context;
127 ib_conn);
131 iser_snd_completion(tx_desc, ib_conn);
136 struct iser_conn *iser_conn = container_of(ib_conn, struct iser_conn,
137 ib_conn);
149 mtx_lock(&ib_conn->beacon.flush_lock);
151 cv_signal(&ib_conn->beacon.flush_cv);
152 mtx_unlock(&ib_conn->beacon.flush_lock);
154 iser_handle_comp_error(ib_conn, wc);
370 iser_create_fastreg_pool(struct ib_conn *ib_conn, unsigned cmds_max)
372 struct iser_device *device = ib_conn->device;
376 INIT_LIST_HEAD(&ib_conn->fastreg.pool);
377 ib_conn->fastreg.pool_size = 0;
385 list_add_tail(&desc->list, &ib_conn->fastreg.pool);
386 ib_conn->fastreg.pool_size++;
392 iser_free_fastreg_pool(ib_conn);
400 iser_free_fastreg_pool(struct ib_conn *ib_conn)
405 if (list_empty(&ib_conn->fastreg.pool))
408 ISER_DBG("freeing conn %p fr pool", ib_conn);
410 list_for_each_entry_safe(desc, tmp, &ib_conn->fastreg.pool, list) {
417 if (i < ib_conn->fastreg.pool_size)
419 ib_conn->fastreg.pool_size - i);
428 iser_create_ib_conn_res(struct ib_conn *ib_conn)
437 iser_conn = container_of(ib_conn, struct iser_conn, ib_conn);
438 device = ib_conn->device;
448 ib_conn->comp = &device->comps[min_index];
449 ib_conn->comp->active_qps++;
451 ISER_INFO("cq index %d used for ib_conn %p", min_index, ib_conn);
455 init_attr.qp_context = (void *)ib_conn;
456 init_attr.send_cq = ib_conn->comp->cq;
457 init_attr.recv_cq = ib_conn->comp->cq;
476 ret = rdma_create_qp(ib_conn->cma_id, device->pd, &init_attr);
480 ib_conn->qp = ib_conn->cma_id->qp;
482 ib_conn, ib_conn->cma_id,
483 ib_conn->cma_id->qp);
489 ib_conn->comp->active_qps--;
581 struct ib_conn *ib_conn = &iser_conn->ib_conn;
582 struct iser_device *device = ib_conn->device;
585 iser_conn, ib_conn->cma_id, ib_conn->qp);
587 if (ib_conn->qp != NULL) {
589 ib_conn->comp->active_qps--;
591 rdma_destroy_qp(ib_conn->cma_id);
592 ib_conn->qp = NULL;
604 ib_conn->device = NULL;
616 struct ib_conn *ib_conn = &iser_conn->ib_conn;
628 if (ib_conn->qp == NULL) {
648 if (ib_conn->cma_id) {
649 err = rdma_disconnect(ib_conn->cma_id);
654 mtx_lock(&ib_conn->beacon.flush_lock);
655 memset(&ib_conn->beacon.send, 0, sizeof(struct ib_send_wr));
656 ib_conn->beacon.send.wr_id = ISER_BEACON_WRID;
657 ib_conn->beacon.send.opcode = IB_WR_SEND;
659 err = ib_post_send(ib_conn->qp, &ib_conn->beacon.send, &bad_send_wr);
661 ISER_ERR("conn %p failed to post send_beacon", ib_conn);
662 mtx_unlock(&ib_conn->beacon.flush_lock);
667 cv_wait(&ib_conn->beacon.flush_cv, &ib_conn->beacon.flush_lock);
670 memset(&ib_conn->beacon.recv, 0, sizeof(struct ib_recv_wr));
671 ib_conn->beacon.recv.wr_id = ISER_BEACON_WRID;
673 err = ib_post_recv(ib_conn->qp, &ib_conn->beacon.recv, &bad_recv_wr);
675 ISER_ERR("conn %p failed to post recv_beacon", ib_conn);
676 mtx_unlock(&ib_conn->beacon.flush_lock);
681 cv_wait(&ib_conn->beacon.flush_cv, &ib_conn->beacon.flush_lock);
682 mtx_unlock(&ib_conn->beacon.flush_lock);
715 struct ib_conn *ib_conn;
720 ib_conn = &iser_conn->ib_conn;
729 ib_conn->device = device;
749 struct ib_conn *ib_conn = &iser_conn->ib_conn;
750 struct iser_device *device = ib_conn->device;
752 ret = iser_create_ib_conn_res(ib_conn);
864 struct ib_conn *ib_conn = &iser_conn->ib_conn;
870 sge.lkey = ib_conn->device->mr->lkey;
877 ib_conn->post_recv_buf_count++;
878 ib_ret = ib_post_recv(ib_conn->qp, &rx_wr, &rx_wr_failed);
881 ib_conn->post_recv_buf_count--;
892 struct ib_conn *ib_conn = &iser_conn->ib_conn;
896 for (rx_wr = ib_conn->rx_wr, i = 0; i < count; i++, rx_wr++) {
908 ib_conn->post_recv_buf_count += count;
909 ib_ret = ib_post_recv(ib_conn->qp, ib_conn->rx_wr, &rx_wr_failed);
912 ib_conn->post_recv_buf_count -= count;
924 int iser_post_send(struct ib_conn *ib_conn, struct iser_tx_desc *tx_desc,
930 ib_dma_sync_single_for_device(ib_conn->device->ib_device,
941 ib_ret = ib_post_send(ib_conn->qp, &send_wr, &send_wr_failed);