Lines Matching refs:flow_state

349 	qpriv->flow_state.psn = 0;  in hfi1_qp_priv_init()
350 qpriv->flow_state.index = RXE_NUM_TID_FLOWS; in hfi1_qp_priv_init()
351 qpriv->flow_state.last_index = RXE_NUM_TID_FLOWS; in hfi1_qp_priv_init()
352 qpriv->flow_state.generation = KERN_GENERATION_RESERVED; in hfi1_qp_priv_init()
783 struct tid_flow_state *fs = &qpriv->flow_state; in hfi1_kern_setup_hw_flow()
823 struct tid_flow_state *fs = &qpriv->flow_state; in hfi1_kern_clear_hw_flow()
1519 memset(&flow->flow_state, 0x0, sizeof(flow->flow_state)); in hfi1_kern_exp_rcv_setup()
1520 flow->idx = qpriv->flow_state.index; in hfi1_kern_exp_rcv_setup()
1521 flow->flow_state.generation = qpriv->flow_state.generation; in hfi1_kern_exp_rcv_setup()
1522 flow->flow_state.spsn = qpriv->flow_state.psn; in hfi1_kern_exp_rcv_setup()
1523 flow->flow_state.lpsn = flow->flow_state.spsn + flow->npkts - 1; in hfi1_kern_exp_rcv_setup()
1524 flow->flow_state.r_next_psn = in hfi1_kern_exp_rcv_setup()
1525 full_flow_psn(flow, flow->flow_state.spsn); in hfi1_kern_exp_rcv_setup()
1526 qpriv->flow_state.psn += flow->npkts; in hfi1_kern_exp_rcv_setup()
1692 if (cmp_psn(psn, flow->flow_state.ib_spsn) >= 0 && in find_flow_ib()
1693 cmp_psn(psn, flow->flow_state.ib_lpsn) <= 0) { in find_flow_ib()
1718 *bth2 = mask_psn(flow->flow_state.ib_spsn + flow->pkt); in hfi1_build_tid_rdma_read_packet()
1753 cpu_to_be32((flow->flow_state.generation << in hfi1_build_tid_rdma_read_packet()
1755 ((flow->flow_state.spsn + flow->pkt) & in hfi1_build_tid_rdma_read_packet()
1839 if ((qpriv->flow_state.psn + npkts) > MAX_TID_FLOW_PSN - 1) { in hfi1_build_tid_rdma_read_req()
1870 flow->flow_state.ib_spsn = req->s_next_psn; in hfi1_build_tid_rdma_read_req()
1871 flow->flow_state.ib_lpsn = in hfi1_build_tid_rdma_read_req()
1872 flow->flow_state.ib_spsn + flow->npkts - 1; in hfi1_build_tid_rdma_read_req()
1945 flow->flow_state.generation = flow_psn >> HFI1_KDETH_BTH_SEQ_SHIFT; in tid_rdma_rcv_read_request()
1946 flow->flow_state.spsn = flow_psn & HFI1_KDETH_BTH_SEQ_MASK; in tid_rdma_rcv_read_request()
1949 flow->flow_state.lpsn = flow->flow_state.spsn + in tid_rdma_rcv_read_request()
1951 flow->flow_state.ib_spsn = psn; in tid_rdma_rcv_read_request()
1952 flow->flow_state.ib_lpsn = flow->flow_state.ib_spsn + flow->npkts - 1; in tid_rdma_rcv_read_request()
2073 struct flow_state *fstate; in tid_rdma_rcv_error()
2127 fstate = &req->flows[req->clear_tail].flow_state; in tid_rdma_rcv_error()
2386 resp->verbs_psn = cpu_to_be32(mask_psn(flow->flow_state.ib_spsn + in hfi1_build_tid_rdma_read_resp()
2391 *bth2 = mask_psn(((flow->flow_state.spsn + flow->pkt++) & in hfi1_build_tid_rdma_read_resp()
2393 (flow->flow_state.generation << in hfi1_build_tid_rdma_read_resp()
2476 if (cmp_psn(ipsn, flow->flow_state.ib_lpsn)) { in hfi1_rc_rcv_tid_rdma_read_resp()
2479 if (cmp_psn(kpsn, flow->flow_state.r_next_psn)) in hfi1_rc_rcv_tid_rdma_read_resp()
2481 flow->flow_state.r_next_psn = mask_psn(kpsn + 1); in hfi1_rc_rcv_tid_rdma_read_resp()
2512 flow->flow_state.r_next_psn = mask_psn(kpsn + 1); in hfi1_rc_rcv_tid_rdma_read_resp()
2639 hfi1_restart_rc(qp, flow->flow_state.ib_spsn, 0); in restart_tid_rdma_read_req()
2762 flow->flow_state.r_next_psn); in handle_read_kdeth_eflags()
2786 flow->flow_state.lpsn); in handle_read_kdeth_eflags()
2793 flow->flow_state.r_next_psn = in handle_read_kdeth_eflags()
2800 flow->flow_state.r_next_psn = last_psn; in handle_read_kdeth_eflags()
2959 flow->flow_state.r_next_psn = in hfi1_handle_kdeth_eflags()
2963 flow->flow_state.r_next_psn; in hfi1_handle_kdeth_eflags()
2975 flow->flow_state.r_next_psn); in hfi1_handle_kdeth_eflags()
2988 flow->flow_state.lpsn)) in hfi1_handle_kdeth_eflags()
2990 flow->flow_state.r_next_psn = in hfi1_handle_kdeth_eflags()
2993 flow->flow_state.r_next_psn; in hfi1_handle_kdeth_eflags()
3034 qpriv->s_nak_psn = mask_psn(flow->flow_state.r_next_psn); in hfi1_handle_kdeth_eflags()
3075 delta_pkts = delta_psn(*bth2, flow->flow_state.ib_spsn); in hfi1_tid_rdma_restart_req()
3079 flow->flow_state.spsn)); in hfi1_tid_rdma_restart_req()
3176 fs = &qpriv->flow_state; in hfi1_qp_kern_exp_rcv_clear_all()
3498 if (qpriv->flow_state.index < RXE_NUM_TID_FLOWS && in hfi1_tid_write_alloc_resources()
3532 if (qpriv->flow_state.index >= RXE_NUM_TID_FLOWS) { in hfi1_tid_write_alloc_resources()
3548 if (qpriv->flow_state.psn + npkts > MAX_TID_FLOW_PSN - 1) { in hfi1_tid_write_alloc_resources()
3888 flow->flow_state.resp_ib_psn = bth2; in hfi1_build_tid_rdma_write_resp()
3920 cpu_to_be32((flow->flow_state.generation << in hfi1_build_tid_rdma_write_resp()
3922 (flow->flow_state.spsn & in hfi1_build_tid_rdma_write_resp()
4116 flow->flow_state.generation = flow_psn >> HFI1_KDETH_BTH_SEQ_SHIFT; in hfi1_rc_rcv_tid_rdma_write_resp()
4117 flow->flow_state.spsn = flow_psn & HFI1_KDETH_BTH_SEQ_MASK; in hfi1_rc_rcv_tid_rdma_write_resp()
4118 flow->flow_state.resp_ib_psn = psn; in hfi1_rc_rcv_tid_rdma_write_resp()
4123 flow->flow_state.lpsn = flow->flow_state.spsn + in hfi1_rc_rcv_tid_rdma_write_resp()
4247 *bth2 = mask_psn(((flow->flow_state.spsn + flow->pkt++) & in hfi1_build_tid_rdma_packet()
4249 (flow->flow_state.generation << in hfi1_build_tid_rdma_packet()
4253 if (flow->flow_state.lpsn + 1 + in hfi1_build_tid_rdma_packet()
4296 if (cmp_psn(psn, full_flow_psn(flow, flow->flow_state.lpsn))) { in hfi1_rc_rcv_tid_rdma_write_data()
4299 if (cmp_psn(psn, flow->flow_state.r_next_psn)) in hfi1_rc_rcv_tid_rdma_write_data()
4302 flow->flow_state.r_next_psn = mask_psn(psn + 1); in hfi1_rc_rcv_tid_rdma_write_data()
4324 full_flow_psn(flow, flow->flow_state.spsn)) * in hfi1_rc_rcv_tid_rdma_write_data()
4346 flow->flow_state.r_next_psn = mask_psn(psn + 1); in hfi1_rc_rcv_tid_rdma_write_data()
4405 priv->r_next_psn_kdeth = flow->flow_state.r_next_psn; in hfi1_rc_rcv_tid_rdma_write_data()
4414 priv->s_nak_psn = flow->flow_state.r_next_psn; in hfi1_rc_rcv_tid_rdma_write_data()
4431 struct tid_flow_state *fs = &qpriv->flow_state; in hfi1_build_tid_rdma_write_ack()
4454 *bth2 = full_flow_psn(flow, flow->flow_state.lpsn); in hfi1_build_tid_rdma_write_ack()
4466 cpu_to_be32(flow->flow_state.resp_ib_psn); in hfi1_build_tid_rdma_write_ack()
4549 if (cmp_psn(psn, full_flow_psn(flow, flow->flow_state.spsn)) < 0 || in hfi1_rc_rcv_tid_rdma_ack()
4550 cmp_psn(req_psn, flow->flow_state.resp_ib_psn) < 0) in hfi1_rc_rcv_tid_rdma_ack()
4554 full_flow_psn(flow, flow->flow_state.lpsn)) >= 0 && in hfi1_rc_rcv_tid_rdma_ack()
4559 req->r_last_acked = flow->flow_state.resp_ib_psn; in hfi1_rc_rcv_tid_rdma_ack()
4647 fpsn = full_flow_psn(flow, flow->flow_state.spsn); in hfi1_rc_rcv_tid_rdma_ack()
4655 if (flow->flow_state.generation != in hfi1_rc_rcv_tid_rdma_ack()
4676 gen = flow->flow_state.generation; in hfi1_rc_rcv_tid_rdma_ack()
4678 flow->flow_state.spsn != in hfi1_rc_rcv_tid_rdma_ack()
4681 lpsn = flow->flow_state.lpsn; in hfi1_rc_rcv_tid_rdma_ack()
4687 flow->flow_state.generation = in hfi1_rc_rcv_tid_rdma_ack()
4689 flow->flow_state.spsn = spsn; in hfi1_rc_rcv_tid_rdma_ack()
4690 flow->flow_state.lpsn = in hfi1_rc_rcv_tid_rdma_ack()
4691 flow->flow_state.spsn + in hfi1_rc_rcv_tid_rdma_ack()
4724 flpsn = full_flow_psn(flow, flow->flow_state.lpsn); in hfi1_rc_rcv_tid_rdma_ack()
4860 generation = kern_flow_generation_next(flow->flow_state.generation); in hfi1_build_tid_rdma_resync()
4879 struct tid_flow_state *fs = &qpriv->flow_state; in hfi1_rc_rcv_tid_rdma_resync()
4949 flow->flow_state.lpsn); in hfi1_rc_rcv_tid_rdma_resync()
4950 next = flow->flow_state.r_next_psn; in hfi1_rc_rcv_tid_rdma_resync()
4952 flow->flow_state.generation = fs->generation; in hfi1_rc_rcv_tid_rdma_resync()
4953 flow->flow_state.spsn = fs->psn; in hfi1_rc_rcv_tid_rdma_resync()
4954 flow->flow_state.lpsn = in hfi1_rc_rcv_tid_rdma_resync()
4955 flow->flow_state.spsn + flow->npkts - 1; in hfi1_rc_rcv_tid_rdma_resync()
4956 flow->flow_state.r_next_psn = in hfi1_rc_rcv_tid_rdma_resync()
4958 flow->flow_state.spsn); in hfi1_rc_rcv_tid_rdma_resync()
5290 req->flows[flow].flow_state.lpsn)) > 0))) { in make_tid_rdma_ack()
5529 flow->flow_state.r_next_psn = in update_r_next_psn_fecn()