MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mlx5_common_dev_release

Function mlx5_common_dev_release

dpdk/drivers/common/mlx5/mlx5_common.c:728–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

726}
727
728static void
729mlx5_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
745static struct mlx5_common_device *
746mlx5_common_dev_create(struct rte_device *eal_dev, uint32_t classes,

Callers 2

mlx5_common_dev_probeFunction · 0.85
mlx5_common_dev_removeFunction · 0.85

Calls 8

pthread_mutex_lockFunction · 0.85
pthread_mutex_unlockFunction · 0.85
rte_eal_process_typeFunction · 0.85
mlx5_mr_release_cacheFunction · 0.85
rte_freeFunction · 0.85

Tested by

no test coverage detected