Lines Matching refs:qp_attr

49 	struct ib_qp_attr qp_attr;  in smc_ib_modify_qp_init()  local
51 memset(&qp_attr, 0, sizeof(qp_attr)); in smc_ib_modify_qp_init()
52 qp_attr.qp_state = IB_QPS_INIT; in smc_ib_modify_qp_init()
53 qp_attr.pkey_index = 0; in smc_ib_modify_qp_init()
54 qp_attr.port_num = lnk->ibport; in smc_ib_modify_qp_init()
55 qp_attr.qp_access_flags = IB_ACCESS_LOCAL_WRITE in smc_ib_modify_qp_init()
57 return ib_modify_qp(lnk->roce_qp, &qp_attr, in smc_ib_modify_qp_init()
67 struct ib_qp_attr qp_attr; in smc_ib_modify_qp_rtr() local
70 memset(&qp_attr, 0, sizeof(qp_attr)); in smc_ib_modify_qp_rtr()
71 qp_attr.qp_state = IB_QPS_RTR; in smc_ib_modify_qp_rtr()
72 qp_attr.path_mtu = min(lnk->path_mtu, lnk->peer_mtu); in smc_ib_modify_qp_rtr()
73 qp_attr.ah_attr.type = RDMA_AH_ATTR_TYPE_ROCE; in smc_ib_modify_qp_rtr()
74 rdma_ah_set_port_num(&qp_attr.ah_attr, lnk->ibport); in smc_ib_modify_qp_rtr()
77 rdma_ah_set_grh(&qp_attr.ah_attr, NULL, 0, lnk->sgid_index, hop_lim, 0); in smc_ib_modify_qp_rtr()
78 rdma_ah_set_dgid_raw(&qp_attr.ah_attr, lnk->peer_gid); in smc_ib_modify_qp_rtr()
80 memcpy(&qp_attr.ah_attr.roce.dmac, lnk->lgr->nexthop_mac, in smc_ib_modify_qp_rtr()
83 memcpy(&qp_attr.ah_attr.roce.dmac, lnk->peer_mac, in smc_ib_modify_qp_rtr()
85 qp_attr.dest_qp_num = lnk->peer_qpn; in smc_ib_modify_qp_rtr()
86 qp_attr.rq_psn = lnk->peer_psn; /* starting receive packet seq # */ in smc_ib_modify_qp_rtr()
87 qp_attr.max_dest_rd_atomic = 1; /* max # of resources for incoming in smc_ib_modify_qp_rtr()
90 qp_attr.min_rnr_timer = SMC_QP_MIN_RNR_TIMER; in smc_ib_modify_qp_rtr()
92 return ib_modify_qp(lnk->roce_qp, &qp_attr, qp_attr_mask); in smc_ib_modify_qp_rtr()
97 struct ib_qp_attr qp_attr; in smc_ib_modify_qp_rts() local
99 memset(&qp_attr, 0, sizeof(qp_attr)); in smc_ib_modify_qp_rts()
100 qp_attr.qp_state = IB_QPS_RTS; in smc_ib_modify_qp_rts()
101 qp_attr.timeout = SMC_QP_TIMEOUT; /* local ack timeout */ in smc_ib_modify_qp_rts()
102 qp_attr.retry_cnt = SMC_QP_RETRY_CNT; /* retry count */ in smc_ib_modify_qp_rts()
103 qp_attr.rnr_retry = SMC_QP_RNR_RETRY; /* RNR retries, 7=infinite */ in smc_ib_modify_qp_rts()
104 qp_attr.sq_psn = lnk->psn_initial; /* starting send packet seq # */ in smc_ib_modify_qp_rts()
105 qp_attr.max_rd_atomic = 1; /* # of outstanding RDMA reads and in smc_ib_modify_qp_rts()
108 return ib_modify_qp(lnk->roce_qp, &qp_attr, in smc_ib_modify_qp_rts()
116 struct ib_qp_attr qp_attr; in smc_ib_modify_qp_error() local
118 memset(&qp_attr, 0, sizeof(qp_attr)); in smc_ib_modify_qp_error()
119 qp_attr.qp_state = IB_QPS_ERR; in smc_ib_modify_qp_error()
120 return ib_modify_qp(lnk->roce_qp, &qp_attr, IB_QP_STATE); in smc_ib_modify_qp_error()
661 struct ib_qp_init_attr qp_attr = { in smc_ib_create_queue_pair() local
682 lnk->roce_qp = ib_create_qp(lnk->roce_pd, &qp_attr); in smc_ib_create_queue_pair()