1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ 2 /* Copyright (c) 2020 Mellanox Technologies Ltd */ 3 4 #ifndef __MLX5_SF_PRIV_H__ 5 #define __MLX5_SF_PRIV_H__ 6 7 #include <linux/mlx5/driver.h> 8 9 int mlx5_cmd_alloc_sf(struct mlx5_core_dev *dev, u16 function_id); 10 int mlx5_cmd_dealloc_sf(struct mlx5_core_dev *dev, u16 function_id); 11 12 u16 mlx5_sf_sw_to_hw_id(const struct mlx5_core_dev *dev, u16 sw_id); 13 14 int mlx5_sf_hw_table_sf_alloc(struct mlx5_core_dev *dev, u32 usr_sfnum); 15 void mlx5_sf_hw_table_sf_free(struct mlx5_core_dev *dev, u16 id); 16 17 #endif 18