Lines Matching refs:qp_attr
430 int mthca_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr, int qp_attr_mask, in mthca_query_qp() argument
444 qp_attr->qp_state = IB_QPS_RESET; in mthca_query_qp()
465 qp_attr->qp_state = qp->state; in mthca_query_qp()
466 qp_attr->path_mtu = context->mtu_msgmax >> 5; in mthca_query_qp()
467 qp_attr->path_mig_state = in mthca_query_qp()
469 qp_attr->qkey = be32_to_cpu(context->qkey); in mthca_query_qp()
470 qp_attr->rq_psn = be32_to_cpu(context->rnr_nextrecvpsn) & 0xffffff; in mthca_query_qp()
471 qp_attr->sq_psn = be32_to_cpu(context->next_send_psn) & 0xffffff; in mthca_query_qp()
472 qp_attr->dest_qp_num = be32_to_cpu(context->remote_qpn) & 0xffffff; in mthca_query_qp()
473 qp_attr->qp_access_flags = in mthca_query_qp()
477 to_rdma_ah_attr(dev, &qp_attr->ah_attr, &context->pri_path); in mthca_query_qp()
478 to_rdma_ah_attr(dev, &qp_attr->alt_ah_attr, &context->alt_path); in mthca_query_qp()
479 qp_attr->alt_pkey_index = in mthca_query_qp()
481 qp_attr->alt_port_num = in mthca_query_qp()
482 rdma_ah_get_port_num(&qp_attr->alt_ah_attr); in mthca_query_qp()
485 qp_attr->pkey_index = be32_to_cpu(context->pri_path.port_pkey) & 0x7f; in mthca_query_qp()
486 qp_attr->port_num = in mthca_query_qp()
490 qp_attr->sq_draining = mthca_state == MTHCA_QP_STATE_DRAINING; in mthca_query_qp()
492 qp_attr->max_rd_atomic = 1 << ((be32_to_cpu(context->params1) >> 21) & 0x7); in mthca_query_qp()
494 qp_attr->max_dest_rd_atomic = in mthca_query_qp()
496 qp_attr->min_rnr_timer = in mthca_query_qp()
498 qp_attr->timeout = context->pri_path.ackto >> 3; in mthca_query_qp()
499 qp_attr->retry_cnt = (be32_to_cpu(context->params1) >> 16) & 0x7; in mthca_query_qp()
500 qp_attr->rnr_retry = context->pri_path.rnr_retry >> 5; in mthca_query_qp()
501 qp_attr->alt_timeout = context->alt_path.ackto >> 3; in mthca_query_qp()
504 qp_attr->cur_qp_state = qp_attr->qp_state; in mthca_query_qp()
505 qp_attr->cap.max_send_wr = qp->sq.max; in mthca_query_qp()
506 qp_attr->cap.max_recv_wr = qp->rq.max; in mthca_query_qp()
507 qp_attr->cap.max_send_sge = qp->sq.max_gs; in mthca_query_qp()
508 qp_attr->cap.max_recv_sge = qp->rq.max_gs; in mthca_query_qp()
509 qp_attr->cap.max_inline_data = qp->max_inline_data; in mthca_query_qp()
511 qp_init_attr->cap = qp_attr->cap; in mthca_query_qp()