1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2021 Mellanox Technologies, Ltd
5 #ifndef MLX5_COMMON_PRIVATE_H
6 #define MLX5_COMMON_PRIVATE_H
9 #include <rte_bus_auxiliary.h>
11 #include "mlx5_common.h"
15 #endif /* __cplusplus */
17 /* Common bus driver: */
19 struct mlx5_common_device {
20 struct rte_device *dev;
21 TAILQ_ENTRY(mlx5_common_device) next;
22 uint32_t classes_loaded;
25 int mlx5_common_dev_probe(struct rte_device *eal_dev);
26 int mlx5_common_dev_remove(struct rte_device *eal_dev);
27 int mlx5_common_dev_dma_map(struct rte_device *dev, void *addr, uint64_t iova,
29 int mlx5_common_dev_dma_unmap(struct rte_device *dev, void *addr, uint64_t iova,
32 /* Common PCI bus driver: */
34 void mlx5_common_driver_on_register_pci(struct mlx5_class_driver *driver);
35 bool mlx5_dev_pci_match(const struct mlx5_class_driver *drv,
36 const struct rte_device *dev);
38 /* Common auxiliary bus driver: */
39 void mlx5_common_auxiliary_init(void);
40 struct ibv_device *mlx5_get_aux_ibv_device(
41 const struct rte_auxiliary_device *dev);
45 #endif /* __cplusplus */
47 #endif /* MLX5_COMMON_PRIVATE_H */