| 726 | } |
| 727 | |
| 728 | static void |
| 729 | mlx5_common_dev_release(struct mlx5_common_device *cdev) |
| 730 | { |
| 731 | pthread_mutex_lock(&devices_list_lock); |
| 732 | TAILQ_REMOVE(&devices_list, cdev, next); |
| 733 | pthread_mutex_unlock(&devices_list_lock); |
| 734 | if (rte_eal_process_type() == RTE_PROC_PRIMARY) { |
| 735 | if (TAILQ_EMPTY(&devices_list)) |
| 736 | rte_mem_event_callback_unregister("MLX5_MEM_EVENT_CB", |
| 737 | NULL); |
| 738 | mlx5_dev_mempool_unsubscribe(cdev); |
| 739 | mlx5_mr_release_cache(&cdev->mr_scache); |
| 740 | mlx5_dev_hw_global_release(cdev); |
| 741 | } |
| 742 | rte_free(cdev); |
| 743 | } |
| 744 | |
| 745 | static struct mlx5_common_device * |
| 746 | mlx5_common_dev_create(struct rte_device *eal_dev, uint32_t classes, |
no test coverage detected