Lines Matching refs:tracker

148 	mvdev->tracker.is_err = true;  in set_tracker_error()
741 struct mlx5_vhca_page_tracker *tracker = &mvdev->tracker; in mlx5vf_create_tracker() local
777 ilog2(tracker->host_qp->tracked_page_size)); in mlx5vf_create_tracker()
779 ilog2(tracker->host_qp->max_msg_size)); in mlx5vf_create_tracker()
780 MLX5_SET(page_track, obj_context, reporting_qpn, tracker->fw_qp->qpn); in mlx5vf_create_tracker()
812 tracker->id = MLX5_GET(general_obj_out_cmd_hdr, out, obj_id); in mlx5vf_create_tracker()
901 tracker.cq.mcq)); in mlx5vf_cq_event()
907 struct mlx5_vhca_page_tracker *tracker = in mlx5vf_event_notifier() local
910 tracker, struct mlx5vf_pci_core_device, tracker); in mlx5vf_event_notifier()
924 if (qp_num != tracker->host_qp->qpn && in mlx5vf_event_notifier()
925 qp_num != tracker->fw_qp->qpn) in mlx5vf_event_notifier()
941 tracker.cq.mcq); in mlx5vf_cq_complete()
947 struct mlx5_vhca_page_tracker *tracker, in mlx5vf_create_cq() argument
958 cq = &tracker->cq; in mlx5vf_create_cq()
990 MLX5_SET(cqc, cqc, uar_page, tracker->uar->index); in mlx5vf_create_cq()
1002 mlx5_cq_arm(&cq->mcq, MLX5_CQ_DB_REQ_NOT, tracker->uar->map, in mlx5vf_create_cq()
1018 struct mlx5_vhca_page_tracker *tracker, u32 max_recv_wr) in mlx5vf_create_rc_qp() argument
1062 MLX5_SET(qpc, qpc, pd, tracker->pdn); in mlx5vf_create_rc_qp()
1063 MLX5_SET(qpc, qpc, uar_page, tracker->uar->index); in mlx5vf_create_rc_qp()
1071 MLX5_SET(qpc, qpc, cqn_rcv, tracker->cq.mcq.cqn); in mlx5vf_create_rc_qp()
1323 struct mlx5_vhca_page_tracker *tracker = &mvdev->tracker; in _mlx5vf_free_page_tracker_resources() local
1333 mlx5_eq_notifier_unregister(mdev, &tracker->nb); in _mlx5vf_free_page_tracker_resources()
1334 mlx5vf_cmd_destroy_tracker(mdev, tracker->id); in _mlx5vf_free_page_tracker_resources()
1335 mlx5vf_destroy_qp(mdev, tracker->fw_qp); in _mlx5vf_free_page_tracker_resources()
1336 mlx5vf_free_qp_recv_resources(mdev, tracker->host_qp); in _mlx5vf_free_page_tracker_resources()
1337 mlx5vf_destroy_qp(mdev, tracker->host_qp); in _mlx5vf_free_page_tracker_resources()
1338 mlx5vf_destroy_cq(mdev, &tracker->cq); in _mlx5vf_free_page_tracker_resources()
1339 mlx5_core_dealloc_pd(mdev, tracker->pdn); in _mlx5vf_free_page_tracker_resources()
1340 mlx5_put_uars_page(mdev, tracker->uar); in _mlx5vf_free_page_tracker_resources()
1366 struct mlx5_vhca_page_tracker *tracker = &mvdev->tracker; in mlx5vf_start_page_tracker() local
1388 memset(tracker, 0, sizeof(*tracker)); in mlx5vf_start_page_tracker()
1389 tracker->uar = mlx5_get_uars_page(mdev); in mlx5vf_start_page_tracker()
1390 if (IS_ERR(tracker->uar)) { in mlx5vf_start_page_tracker()
1391 err = PTR_ERR(tracker->uar); in mlx5vf_start_page_tracker()
1395 err = mlx5_core_alloc_pd(mdev, &tracker->pdn); in mlx5vf_start_page_tracker()
1400 err = mlx5vf_create_cq(mdev, tracker, max_recv_wr); in mlx5vf_start_page_tracker()
1404 host_qp = mlx5vf_create_rc_qp(mdev, tracker, max_recv_wr); in mlx5vf_start_page_tracker()
1422 err = mlx5vf_alloc_qp_recv_resources(mdev, host_qp, tracker->pdn, in mlx5vf_start_page_tracker()
1427 fw_qp = mlx5vf_create_rc_qp(mdev, tracker, 0); in mlx5vf_start_page_tracker()
1441 tracker->host_qp = host_qp; in mlx5vf_start_page_tracker()
1442 tracker->fw_qp = fw_qp; in mlx5vf_start_page_tracker()
1447 MLX5_NB_INIT(&tracker->nb, mlx5vf_event_notifier, NOTIFY_ANY); in mlx5vf_start_page_tracker()
1448 mlx5_eq_notifier_register(mdev, &tracker->nb); in mlx5vf_start_page_tracker()
1461 mlx5vf_destroy_cq(mdev, &tracker->cq); in mlx5vf_start_page_tracker()
1463 mlx5_core_dealloc_pd(mdev, tracker->pdn); in mlx5vf_start_page_tracker()
1465 mlx5_put_uars_page(mdev, tracker->uar); in mlx5vf_start_page_tracker()
1572 struct mlx5_vhca_page_tracker *tracker = &mvdev->tracker; in mlx5vf_tracker_read_and_clear() local
1573 struct mlx5_vhca_cq *cq = &tracker->cq; in mlx5vf_tracker_read_and_clear()
1589 err = mlx5vf_cmd_modify_tracker(mdev, tracker->id, iova, length, in mlx5vf_tracker_read_and_clear()
1594 tracker->status = MLX5_PAGE_TRACK_STATE_REPORTING; in mlx5vf_tracker_read_and_clear()
1595 while (tracker->status == MLX5_PAGE_TRACK_STATE_REPORTING && in mlx5vf_tracker_read_and_clear()
1596 !tracker->is_err) { in mlx5vf_tracker_read_and_clear()
1597 poll_err = mlx5vf_cq_poll_one(cq, tracker->host_qp, dirty, in mlx5vf_tracker_read_and_clear()
1598 &tracker->status); in mlx5vf_tracker_read_and_clear()
1600 mlx5_cq_arm(&cq->mcq, MLX5_CQ_DB_REQ_NOT, tracker->uar->map, in mlx5vf_tracker_read_and_clear()
1602 poll_err = mlx5vf_cq_poll_one(cq, tracker->host_qp, in mlx5vf_tracker_read_and_clear()
1603 dirty, &tracker->status); in mlx5vf_tracker_read_and_clear()
1616 if (tracker->status == MLX5_PAGE_TRACK_STATE_ERROR) in mlx5vf_tracker_read_and_clear()
1617 tracker->is_err = true; in mlx5vf_tracker_read_and_clear()
1619 if (tracker->is_err) in mlx5vf_tracker_read_and_clear()