History

net/mlx5: Use aligned variable while allocating ICM memory

The alignment value is part of the input structure, so use it and spare extra memory allocation when is not needed. Now, using the new ability when allocating icm for Direct-Rule insertion. Signed-off-by: Ariel Levkovich <lariel@mellanox.com> Signed-off-by: Erez Shitrit <erezsh@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>

Erez Shitrit committed 6 years ago

Commit dff8e2d1 parent 2b58f6d4 files · +38 −35Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/mlx5/driver.h+2−1
@@ -1080,7 +1080,8 @@ int mlx5_lag_query_cong_counters(struct mlx5_core_dev *dev, · 1079 unmodified lines
1080struct mlx5_uars_page *mlx5_get_uars_page(struct mlx5_core_dev *mdev);1080struct mlx5_uars_page *mlx5_get_uars_page(struct mlx5_core_dev *mdev);
1081void mlx5_put_uars_page(struct mlx5_core_dev *mdev, struct mlx5_uars_page *up);1081void mlx5_put_uars_page(struct mlx5_core_dev *mdev, struct mlx5_uars_page *up);
1082int mlx5_dm_sw_icm_alloc(struct mlx5_core_dev *dev, enum mlx5_sw_icm_type type,1082int mlx5_dm_sw_icm_alloc(struct mlx5_core_dev *dev, enum mlx5_sw_icm_type type,
1083 u64 length, u16 uid, phys_addr_t *addr, u32 *obj_id);1083 u64 length, u32 log_alignment, u16 uid,
1084 phys_addr_t *addr, u32 *obj_id);
1084int mlx5_dm_sw_icm_dealloc(struct mlx5_core_dev *dev, enum mlx5_sw_icm_type type,1085int mlx5_dm_sw_icm_dealloc(struct mlx5_core_dev *dev, enum mlx5_sw_icm_type type,
1085 u64 length, u16 uid, phys_addr_t addr, u32 obj_id);1086 u64 length, u16 uid, phys_addr_t addr, u32 obj_id);
1086 1087