Lines Matching refs:comm

128     hermon_loopback_comm_t *comm);
130 hermon_loopback_comm_t *comm, int sz);
132 hermon_loopback_comm_t *comm);
134 hermon_loopback_comm_t *comm, uint_t qp_num);
140 hermon_loopback_comm_t *comm);
2856 hermon_loopback_comm_t *comm)
2858 bzero(&comm->hlc_cq_attr, sizeof (ibt_cq_attr_t));
2859 bzero(&comm->hlc_qp_attr, sizeof (ibt_qp_alloc_attr_t));
2860 bzero(&comm->hlc_qp_info, sizeof (ibt_qp_info_t));
2862 comm->hlc_wrid = 1;
2863 comm->hlc_cq_attr.cq_size = 128;
2864 comm->hlc_qp_attr.qp_sizes.cs_sq_sgl = 3;
2865 comm->hlc_qp_attr.qp_sizes.cs_rq_sgl = 3;
2866 comm->hlc_qp_attr.qp_sizes.cs_sq = 16;
2867 comm->hlc_qp_attr.qp_sizes.cs_rq = 16;
2868 comm->hlc_qp_attr.qp_flags = IBT_WR_SIGNALED;
2870 comm->hlc_qp_info.qp_state = IBT_STATE_RESET;
2871 comm->hlc_qp_info.qp_trans = IBT_RC_SRV;
2872 comm->hlc_qp_info.qp_flags = IBT_CEP_RDMA_RD | IBT_CEP_RDMA_WR;
2873 comm->hlc_qp_info.qp_transport.rc.rc_path.cep_hca_port_num =
2875 comm->hlc_qp_info.qp_transport.rc.rc_path.cep_pkey_ix =
2877 comm->hlc_qp_info.qp_transport.rc.rc_path.cep_timeout =
2879 comm->hlc_qp_info.qp_transport.rc.rc_path.cep_adds_vect.av_srvl = 0;
2880 comm->hlc_qp_info.qp_transport.rc.rc_path.cep_adds_vect.av_srate =
2882 comm->hlc_qp_info.qp_transport.rc.rc_path.cep_adds_vect.av_send_grh = 0;
2883 comm->hlc_qp_info.qp_transport.rc.rc_path.cep_adds_vect.av_dlid =
2885 comm->hlc_qp_info.qp_transport.rc.rc_retry_cnt = lstate->hls_retry;
2886 comm->hlc_qp_info.qp_transport.rc.rc_sq_psn = 0;
2887 comm->hlc_qp_info.qp_transport.rc.rc_rq_psn = 0;
2888 comm->hlc_qp_info.qp_transport.rc.rc_rdma_ra_in = 4;
2889 comm->hlc_qp_info.qp_transport.rc.rc_rdma_ra_out = 4;
2890 comm->hlc_qp_info.qp_transport.rc.rc_dst_qpn = 0;
2891 comm->hlc_qp_info.qp_transport.rc.rc_min_rnr_nak = IBT_RNR_NAK_655ms;
2892 comm->hlc_qp_info.qp_transport.rc.rc_path_mtu = IB_MTU_1K;
2900 hermon_loopback_comm_t *comm, int sz)
2902 _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*comm))
2905 comm->hlc_buf_sz = sz;
2906 comm->hlc_buf = kmem_zalloc(sz, KM_NOSLEEP);
2907 if (comm->hlc_buf == NULL) {
2912 comm->hlc_memattr.mr_vaddr = (uint64_t)(uintptr_t)comm->hlc_buf;
2913 comm->hlc_memattr.mr_len = (ib_msglen_t)sz;
2914 comm->hlc_memattr.mr_as = NULL;
2915 comm->hlc_memattr.mr_flags = IBT_MR_NOSLEEP |
2918 comm->hlc_status = hermon_mr_register(lstate->hls_state,
2919 lstate->hls_pd_hdl, &comm->hlc_memattr, &comm->hlc_mrhdl,
2922 _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*comm->hlc_mrhdl))
2924 comm->hlc_mrdesc.md_vaddr = comm->hlc_mrhdl->mr_bindinfo.bi_addr;
2925 comm->hlc_mrdesc.md_lkey = comm->hlc_mrhdl->mr_lkey;
2926 comm->hlc_mrdesc.md_rkey = comm->hlc_mrhdl->mr_rkey;
2927 if (comm->hlc_status != IBT_SUCCESS) {
2938 hermon_loopback_comm_t *comm)
2943 _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*comm))
2948 bzero(&comm->hlc_cq_attr, sizeof (ibt_cq_attr_t));
2949 comm->hlc_cq_attr.cq_size = 128;
2950 comm->hlc_status = hermon_cq_alloc(lstate->hls_state,
2951 (ibt_cq_hdl_t)NULL, &comm->hlc_cq_attr, &real_size,
2952 &comm->hlc_cqhdl[i], HERMON_NOSLEEP);
2953 if (comm->hlc_status != IBT_SUCCESS) {
2960 hermon_loopback_init_qp_info(lstate, comm);
2961 comm->hlc_qp_attr.qp_pd_hdl = (ibt_pd_hdl_t)lstate->hls_pd_hdl;
2962 comm->hlc_qp_attr.qp_scq_hdl = (ibt_cq_hdl_t)comm->hlc_cqhdl[0];
2963 comm->hlc_qp_attr.qp_rcq_hdl = (ibt_cq_hdl_t)comm->hlc_cqhdl[1];
2964 comm->hlc_qp_attr.qp_ibc_scq_hdl = (ibt_opaque1_t)comm->hlc_cqhdl[0];
2965 comm->hlc_qp_attr.qp_ibc_rcq_hdl = (ibt_opaque1_t)comm->hlc_cqhdl[1];
2966 qpinfo.qpi_attrp = &comm->hlc_qp_attr;
2969 qpinfo.qpi_queueszp = &comm->hlc_chan_sizes;
2970 qpinfo.qpi_qpn = &comm->hlc_qp_num;
2971 comm->hlc_status = hermon_qp_alloc(lstate->hls_state, &qpinfo,
2973 if (comm->hlc_status == DDI_SUCCESS) {
2974 comm->hlc_qp_hdl = qpinfo.qpi_qphdl;
2977 if (comm->hlc_status != IBT_SUCCESS) {
2989 hermon_loopback_comm_t *comm, uint_t qp_num)
2991 _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*comm))
2995 hermon_loopback_init_qp_info(lstate, comm);
2996 comm->hlc_qp_info.qp_state = IBT_STATE_INIT;
2997 comm->hlc_status = hermon_qp_modify(lstate->hls_state, comm->hlc_qp_hdl,
2998 IBT_CEP_SET_STATE, &comm->hlc_qp_info, &comm->hlc_queue_sizes);
2999 if (comm->hlc_status != IBT_SUCCESS) {
3007 comm->hlc_qp_info.qp_state = IBT_STATE_RTR;
3008 comm->hlc_qp_info.qp_transport.rc.rc_path.cep_adds_vect.av_dlid
3010 comm->hlc_qp_info.qp_transport.rc.rc_dst_qpn = qp_num;
3011 comm->hlc_status = hermon_qp_modify(lstate->hls_state, comm->hlc_qp_hdl,
3012 IBT_CEP_SET_STATE, &comm->hlc_qp_info, &comm->hlc_queue_sizes);
3013 if (comm->hlc_status != IBT_SUCCESS) {
3019 comm->hlc_qp_info.qp_current_state = IBT_STATE_RTR;
3020 comm->hlc_qp_info.qp_state = IBT_STATE_RTS;
3021 comm->hlc_status = hermon_qp_modify(lstate->hls_state, comm->hlc_qp_hdl,
3022 IBT_CEP_SET_STATE, &comm->hlc_qp_info, &comm->hlc_queue_sizes);
3023 if (comm->hlc_status != IBT_SUCCESS) {
3110 hermon_loopback_comm_t *comm)
3112 _NOTE(NOW_INVISIBLE_TO_OTHER_THREADS(*comm))
3114 comm->hlc_wc.wc_status = 0;
3115 comm->hlc_num_polled = 0;
3116 comm->hlc_status = hermon_cq_poll(lstate->hls_state,
3117 comm->hlc_cqhdl[0], &comm->hlc_wc, 1, &comm->hlc_num_polled);
3118 if ((comm->hlc_status == IBT_SUCCESS) &&
3119 (comm->hlc_wc.wc_status != IBT_WC_SUCCESS)) {
3120 comm->hlc_status = ibc_get_ci_failure(0);
3122 return (comm->hlc_status);