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>
Showing the changes to include/linux (1 of 4 files). Show all
Unified · Split
| @@ -1080,7 +1080,8 @@ int mlx5_lag_query_cong_counters(struct mlx5_core_dev *dev, · 1079 unmodified lines | ||
| 1080 | 1080 | struct mlx5_uars_page *mlx5_get_uars_page(struct mlx5_core_dev *mdev); |
| 1081 | 1081 | void mlx5_put_uars_page(struct mlx5_core_dev *mdev, struct mlx5_uars_page *up); |
| 1082 | 1082 | int 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); | |
| 1084 | 1085 | int mlx5_dm_sw_icm_dealloc(struct mlx5_core_dev *dev, enum mlx5_sw_icm_type type, |
| 1085 | 1086 | u64 length, u16 uid, phys_addr_t addr, u32 obj_id); |
| 1086 | 1087 | |