Lines Matching refs:qp_attr

47 	struct ib_qp_attr qp_attr;  in smc_ib_modify_qp_init()  local
49 memset(&qp_attr, 0, sizeof(qp_attr)); in smc_ib_modify_qp_init()
50 qp_attr.qp_state = IB_QPS_INIT; in smc_ib_modify_qp_init()
51 qp_attr.pkey_index = 0; in smc_ib_modify_qp_init()
52 qp_attr.port_num = lnk->ibport; in smc_ib_modify_qp_init()
53 qp_attr.qp_access_flags = IB_ACCESS_LOCAL_WRITE in smc_ib_modify_qp_init()
55 return ib_modify_qp(lnk->roce_qp, &qp_attr, in smc_ib_modify_qp_init()
65 struct ib_qp_attr qp_attr; in smc_ib_modify_qp_rtr() local
68 memset(&qp_attr, 0, sizeof(qp_attr)); in smc_ib_modify_qp_rtr()
69 qp_attr.qp_state = IB_QPS_RTR; in smc_ib_modify_qp_rtr()
70 qp_attr.path_mtu = min(lnk->path_mtu, lnk->peer_mtu); in smc_ib_modify_qp_rtr()
71 qp_attr.ah_attr.type = RDMA_AH_ATTR_TYPE_ROCE; in smc_ib_modify_qp_rtr()
72 rdma_ah_set_port_num(&qp_attr.ah_attr, lnk->ibport); in smc_ib_modify_qp_rtr()
75 rdma_ah_set_grh(&qp_attr.ah_attr, NULL, 0, lnk->sgid_index, hop_lim, 0); in smc_ib_modify_qp_rtr()
76 rdma_ah_set_dgid_raw(&qp_attr.ah_attr, lnk->peer_gid); in smc_ib_modify_qp_rtr()
78 memcpy(&qp_attr.ah_attr.roce.dmac, lnk->lgr->nexthop_mac, in smc_ib_modify_qp_rtr()
81 memcpy(&qp_attr.ah_attr.roce.dmac, lnk->peer_mac, in smc_ib_modify_qp_rtr()
83 qp_attr.dest_qp_num = lnk->peer_qpn; in smc_ib_modify_qp_rtr()
84 qp_attr.rq_psn = lnk->peer_psn; /* starting receive packet seq # */ in smc_ib_modify_qp_rtr()
85 qp_attr.max_dest_rd_atomic = 1; /* max # of resources for incoming in smc_ib_modify_qp_rtr()
88 qp_attr.min_rnr_timer = SMC_QP_MIN_RNR_TIMER; in smc_ib_modify_qp_rtr()
90 return ib_modify_qp(lnk->roce_qp, &qp_attr, qp_attr_mask); in smc_ib_modify_qp_rtr()
95 struct ib_qp_attr qp_attr; in smc_ib_modify_qp_rts() local
97 memset(&qp_attr, 0, sizeof(qp_attr)); in smc_ib_modify_qp_rts()
98 qp_attr.qp_state = IB_QPS_RTS; in smc_ib_modify_qp_rts()
99 qp_attr.timeout = SMC_QP_TIMEOUT; /* local ack timeout */ in smc_ib_modify_qp_rts()
100 qp_attr.retry_cnt = SMC_QP_RETRY_CNT; /* retry count */ in smc_ib_modify_qp_rts()
101 qp_attr.rnr_retry = SMC_QP_RNR_RETRY; /* RNR retries, 7=infinite */ in smc_ib_modify_qp_rts()
102 qp_attr.sq_psn = lnk->psn_initial; /* starting send packet seq # */ in smc_ib_modify_qp_rts()
103 qp_attr.max_rd_atomic = 1; /* # of outstanding RDMA reads and in smc_ib_modify_qp_rts()
106 return ib_modify_qp(lnk->roce_qp, &qp_attr, in smc_ib_modify_qp_rts()
114 struct ib_qp_attr qp_attr; in smc_ib_modify_qp_error() local
116 memset(&qp_attr, 0, sizeof(qp_attr)); in smc_ib_modify_qp_error()
117 qp_attr.qp_state = IB_QPS_ERR; in smc_ib_modify_qp_error()
118 return ib_modify_qp(lnk->roce_qp, &qp_attr, IB_QP_STATE); in smc_ib_modify_qp_error()
658 struct ib_qp_init_attr qp_attr = { in smc_ib_create_queue_pair() local
678 lnk->roce_qp = ib_create_qp(lnk->roce_pd, &qp_attr); in smc_ib_create_queue_pair()