Lines Matching refs:qpn

225 	int			qpn;  member
751 u8 slave, u32 qpn) in update_vport_qp_param() argument
772 if (mlx4_is_qp_reserved(dev, qpn)) in update_vport_qp_param()
786 err = mlx4_update_qp(dev, qpn, MLX4_UPDATE_QP_VSD, &params); in update_vport_qp_param()
1172 static struct res_common *alloc_fs_rule_tr(u64 id, int qpn) in alloc_fs_rule_tr() argument
1182 ret->qpn = qpn; in alloc_fs_rule_tr()
1504 static int qp_res_start_move_to(struct mlx4_dev *dev, int slave, int qpn, in qp_res_start_move_to() argument
1514 r = res_tracker_lookup(&tracker->res_tree[RES_QP], qpn); in qp_res_start_move_to()
1775 static int valid_reserved(struct mlx4_dev *dev, int slave, int qpn) in valid_reserved() argument
1777 return mlx4_is_qp_reserved(dev, qpn) && in valid_reserved()
1778 (mlx4_is_master(dev) || mlx4_is_guest_proxy(dev, slave, qpn)); in valid_reserved()
1781 static int fw_reserved(struct mlx4_dev *dev, int qpn) in fw_reserved() argument
1783 return qpn < dev->caps.reserved_qps_cnt[MLX4_QP_REGION_FW]; in fw_reserved()
1793 int qpn; in qp_alloc_res() local
1823 qpn = get_param_l(&in_param) & 0x7fffff; in qp_alloc_res()
1824 if (valid_reserved(dev, slave, qpn)) { in qp_alloc_res()
1825 err = add_res_range(dev, slave, qpn, 1, RES_QP, 0); in qp_alloc_res()
1830 err = qp_res_start_move_to(dev, slave, qpn, RES_QP_MAPPED, in qp_alloc_res()
1835 if (!fw_reserved(dev, qpn)) { in qp_alloc_res()
1836 err = __mlx4_qp_alloc_icm(dev, qpn); in qp_alloc_res()
1838 res_abort_move(dev, slave, RES_QP, qpn); in qp_alloc_res()
1843 res_end_move(dev, slave, RES_QP, qpn); in qp_alloc_res()
2365 int qpn; in qp_free_res() local
2378 qpn = get_param_l(&in_param) & 0x7fffff; in qp_free_res()
2379 err = qp_res_start_move_to(dev, slave, qpn, RES_QP_RESERVED, in qp_free_res()
2384 if (!fw_reserved(dev, qpn)) in qp_free_res()
2385 __mlx4_qp_free_icm(dev, qpn); in qp_free_res()
2387 res_end_move(dev, slave, RES_QP, qpn); in qp_free_res()
2389 if (valid_reserved(dev, slave, qpn)) in qp_free_res()
2390 err = rem_res_range(dev, slave, qpn, 1, RES_QP, 0); in qp_free_res()
2938 u32 qpn = vhcr->in_modifier & 0xffffff; in adjust_proxy_tun_qkey() local
2941 if (mlx4_get_parav_qkey(dev, qpn, &qkey)) in adjust_proxy_tun_qkey()
2959 int qpn = vhcr->in_modifier & 0x7fffff; in mlx4_RST2INIT_QP_wrapper() local
2978 err = qp_res_start_move_to(dev, slave, qpn, RES_QP_HW, &qp, 0); in mlx4_RST2INIT_QP_wrapper()
3041 res_end_move(dev, slave, RES_QP, qpn); in mlx4_RST2INIT_QP_wrapper()
3056 res_abort_move(dev, slave, RES_QP, qpn); in mlx4_RST2INIT_QP_wrapper()
3189 u32 qpn; in verify_qp_parameters() local
3243 qpn = vhcr->in_modifier & 0x7fffff; in verify_qp_parameters()
3247 mlx4_is_qp_reserved(dev, qpn) && in verify_qp_parameters()
3739 int qpn = vhcr->in_modifier & 0x7fffff; in mlx4_GEN_QP_wrapper() local
3742 err = get_res(dev, slave, qpn, RES_QP, &qp); in mlx4_GEN_QP_wrapper()
3752 put_res(dev, slave, qpn, RES_QP); in mlx4_GEN_QP_wrapper()
3828 int qpn = vhcr->in_modifier & 0x7fffff; in mlx4_INIT2RTR_QP_wrapper() local
3852 err = get_res(dev, slave, qpn, RES_QP, &qp); in mlx4_INIT2RTR_QP_wrapper()
3860 err = update_vport_qp_param(dev, inbox, slave, qpn); in mlx4_INIT2RTR_QP_wrapper()
3878 put_res(dev, slave, qpn, RES_QP); in mlx4_INIT2RTR_QP_wrapper()
3992 int qpn = vhcr->in_modifier & 0x7fffff; in mlx4_2RST_QP_wrapper() local
3995 err = qp_res_start_move_to(dev, slave, qpn, RES_QP_MAPPED, &qp, 0); in mlx4_2RST_QP_wrapper()
4007 res_end_move(dev, slave, RES_QP, qpn); in mlx4_2RST_QP_wrapper()
4011 res_abort_move(dev, slave, RES_QP, qpn); in mlx4_2RST_QP_wrapper()
4148 int qpn; in mlx4_QP_ATTACH_wrapper() local
4156 qpn = vhcr->in_modifier & 0xffffff; in mlx4_QP_ATTACH_wrapper()
4157 err = get_res(dev, slave, qpn, RES_QP, &rqp); in mlx4_QP_ATTACH_wrapper()
4161 qp.qpn = qpn; in mlx4_QP_ATTACH_wrapper()
4166 pr_err("Fail to attach rule to qp 0x%x\n", qpn); in mlx4_QP_ATTACH_wrapper()
4184 qpn, reg_id); in mlx4_QP_ATTACH_wrapper()
4186 put_res(dev, slave, qpn, RES_QP); in mlx4_QP_ATTACH_wrapper()
4192 put_res(dev, slave, qpn, RES_QP); in mlx4_QP_ATTACH_wrapper()
4291 u32 qpn = vhcr->in_modifier & 0xffffff; in mlx4_UPDATE_QP_wrapper() local
4316 err = get_res(dev, slave, qpn, RES_QP, &rqp); in mlx4_UPDATE_QP_wrapper()
4318 mlx4_err(dev, "Updating qpn 0x%x for slave %d rejected\n", qpn, slave); in mlx4_UPDATE_QP_wrapper()
4331 qpn, smac_index); in mlx4_UPDATE_QP_wrapper()
4341 mlx4_err(dev, "Failed to update qpn on qpn 0x%x, command failed\n", qpn); in mlx4_UPDATE_QP_wrapper()
4346 put_res(dev, slave, qpn, RES_QP); in mlx4_UPDATE_QP_wrapper()
4377 int qpn; in mlx4_QP_FLOW_STEERING_ATTACH_wrapper() local
4394 qpn = be32_to_cpu(ctrl->qpn) & 0xffffff; in mlx4_QP_FLOW_STEERING_ATTACH_wrapper()
4395 err = get_res(dev, slave, qpn, RES_QP, &rqp); in mlx4_QP_FLOW_STEERING_ATTACH_wrapper()
4397 pr_err("Steering rule with qpn 0x%x rejected\n", qpn); in mlx4_QP_FLOW_STEERING_ATTACH_wrapper()
4440 err = add_res_range(dev, slave, vhcr->out_param, 1, RES_FS_RULE, qpn); in mlx4_QP_FLOW_STEERING_ATTACH_wrapper()
4481 put_res(dev, slave, qpn, RES_QP); in mlx4_QP_FLOW_STEERING_ATTACH_wrapper()
4510 int qpn; in mlx4_QP_FLOW_STEERING_DETACH_wrapper() local
4527 qpn = rrule->qpn; in mlx4_QP_FLOW_STEERING_DETACH_wrapper()
4531 err = get_res(dev, slave, qpn, RES_QP, &rqp); in mlx4_QP_FLOW_STEERING_DETACH_wrapper()
4556 put_res(dev, slave, qpn, RES_QP); in mlx4_QP_FLOW_STEERING_DETACH_wrapper()
4594 qp.qpn = rqp->local_qpn; in detach_qp()
4670 int qpn; in rem_slave_qps() local
4682 qpn = qp->com.res_id; in rem_slave_qps()
4693 if (!valid_reserved(dev, slave, qpn)) { in rem_slave_qps()
4694 __mlx4_qp_release_range(dev, qpn, 1); in rem_slave_qps()
4702 if (!valid_reserved(dev, slave, qpn)) in rem_slave_qps()
4703 __mlx4_qp_free_icm(dev, qpn); in rem_slave_qps()
5002 err = add_res_range(dev, fs_rule->com.owner, reg_id, 1, RES_FS_RULE, fs_rule->qpn); in mlx4_do_mirror_rule()