Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
0002 /* Copyright (c) 2020 Mellanox Technologies Ltd */
0003 
0004 #ifndef __MLX5_SF_PRIV_H__
0005 #define __MLX5_SF_PRIV_H__
0006 
0007 #include <linux/mlx5/driver.h>
0008 
0009 int mlx5_cmd_alloc_sf(struct mlx5_core_dev *dev, u16 function_id);
0010 int mlx5_cmd_dealloc_sf(struct mlx5_core_dev *dev, u16 function_id);
0011 
0012 int mlx5_cmd_sf_enable_hca(struct mlx5_core_dev *dev, u16 func_id);
0013 int mlx5_cmd_sf_disable_hca(struct mlx5_core_dev *dev, u16 func_id);
0014 
0015 u16 mlx5_sf_sw_to_hw_id(struct mlx5_core_dev *dev, u32 controller, u16 sw_id);
0016 
0017 int mlx5_sf_hw_table_sf_alloc(struct mlx5_core_dev *dev, u32 controller, u32 usr_sfnum);
0018 void mlx5_sf_hw_table_sf_free(struct mlx5_core_dev *dev, u32 controller, u16 id);
0019 void mlx5_sf_hw_table_sf_deferred_free(struct mlx5_core_dev *dev, u32 controller, u16 id);
0020 bool mlx5_sf_hw_table_supported(const struct mlx5_core_dev *dev);
0021 
0022 #endif