1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright 2021 Mellanox Technologies, Ltd 3 */ 4 5 #ifndef MLX5_COMMON_PRIVATE_H 6 #define MLX5_COMMON_PRIVATE_H 7 8 #include <rte_pci.h> 9 #include <bus_auxiliary_driver.h> 10 11 #include "mlx5_common.h" 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif /* __cplusplus */ 16 17 /* Common bus driver: */ 18 19 int mlx5_common_dev_probe(struct rte_device *eal_dev); 20 int mlx5_common_dev_remove(struct rte_device *eal_dev); 21 int mlx5_common_dev_dma_map(struct rte_device *dev, void *addr, uint64_t iova, 22 size_t len); 23 int mlx5_common_dev_dma_unmap(struct rte_device *dev, void *addr, uint64_t iova, 24 size_t len); 25 26 /* Common PCI bus driver: */ 27 28 void mlx5_common_pci_init(void); 29 void mlx5_common_driver_on_register_pci(struct mlx5_class_driver *driver); 30 bool mlx5_dev_pci_match(const struct mlx5_class_driver *drv, 31 const struct rte_device *dev); 32 33 /* Common auxiliary bus driver: */ 34 void mlx5_common_auxiliary_init(void); 35 struct ibv_device *mlx5_get_aux_ibv_device( 36 const struct rte_auxiliary_device *dev); 37 int mlx5_auxiliary_get_pci_str(const struct rte_auxiliary_device *dev, 38 char *addr, size_t size); 39 40 #ifdef __cplusplus 41 } 42 #endif /* __cplusplus */ 43 44 #endif /* MLX5_COMMON_PRIVATE_H */ 45