mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
net/mlx5: Inline db alloc API function
Take the wrapper version which picks default node into a header file. This reduces the number of exported functions. Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Moshe Shemesh <moshe@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
1d2c717bc7
commit
9b45bde82c
2 changed files with 6 additions and 7 deletions
|
@ -213,12 +213,6 @@ int mlx5_db_alloc_node(struct mlx5_core_dev *dev, struct mlx5_db *db, int node)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(mlx5_db_alloc_node);
|
||||
|
||||
int mlx5_db_alloc(struct mlx5_core_dev *dev, struct mlx5_db *db)
|
||||
{
|
||||
return mlx5_db_alloc_node(dev, db, dev->priv.numa_node);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mlx5_db_alloc);
|
||||
|
||||
void mlx5_db_free(struct mlx5_core_dev *dev, struct mlx5_db *db)
|
||||
{
|
||||
u32 db_per_page = PAGE_SIZE / cache_line_size();
|
||||
|
|
|
@ -1053,9 +1053,14 @@ int mlx5_core_access_reg(struct mlx5_core_dev *dev, void *data_in,
|
|||
int size_in, void *data_out, int size_out,
|
||||
u16 reg_num, int arg, int write);
|
||||
|
||||
int mlx5_db_alloc(struct mlx5_core_dev *dev, struct mlx5_db *db);
|
||||
int mlx5_db_alloc_node(struct mlx5_core_dev *dev, struct mlx5_db *db,
|
||||
int node);
|
||||
|
||||
static inline int mlx5_db_alloc(struct mlx5_core_dev *dev, struct mlx5_db *db)
|
||||
{
|
||||
return mlx5_db_alloc_node(dev, db, dev->priv.numa_node);
|
||||
}
|
||||
|
||||
void mlx5_db_free(struct mlx5_core_dev *dev, struct mlx5_db *db);
|
||||
|
||||
const char *mlx5_command_str(int command);
|
||||
|
|
Loading…
Reference in a new issue