Skip to content

Commit 2f4053d

Browse files
committed
Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux
Tariq Toukan says: ==================== mlx5-next updates 2025-07-14 * 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux: net/mlx5: IFC updates for disabled host PF net/mlx5: Expose disciplined_fr_counter through HCA capabilities in mlx5_ifc RDMA/mlx5: Fix UMR modifying of mkey page size net/mlx5: Expose HCA capability bits for mkey max page size ==================== Link: https://patch.msgid.link/1752481357-34780-1-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 5b41a68 + cd1746c commit 2f4053d

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

drivers/infiniband/hw/mlx5/umr.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ static __be64 get_umr_disable_mr_mask(void)
3232
return cpu_to_be64(result);
3333
}
3434

35-
static __be64 get_umr_update_translation_mask(void)
35+
static __be64 get_umr_update_translation_mask(struct mlx5_ib_dev *dev)
3636
{
3737
u64 result;
3838

3939
result = MLX5_MKEY_MASK_LEN |
4040
MLX5_MKEY_MASK_PAGE_SIZE |
4141
MLX5_MKEY_MASK_START_ADDR;
42+
if (MLX5_CAP_GEN_2(dev->mdev, umr_log_entity_size_5))
43+
result |= MLX5_MKEY_MASK_PAGE_SIZE_5;
4244

4345
return cpu_to_be64(result);
4446
}
@@ -654,7 +656,7 @@ static void mlx5r_umr_final_update_xlt(struct mlx5_ib_dev *dev,
654656
flags & MLX5_IB_UPD_XLT_ENABLE || flags & MLX5_IB_UPD_XLT_ADDR;
655657

656658
if (update_translation) {
657-
wqe->ctrl_seg.mkey_mask |= get_umr_update_translation_mask();
659+
wqe->ctrl_seg.mkey_mask |= get_umr_update_translation_mask(dev);
658660
if (!mr->ibmr.length)
659661
MLX5_SET(mkc, &wqe->mkey_seg, length64, 1);
660662
}

include/linux/mlx5/device.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ enum {
280280
MLX5_MKEY_MASK_SMALL_FENCE = 1ull << 23,
281281
MLX5_MKEY_MASK_RELAXED_ORDERING_WRITE = 1ull << 25,
282282
MLX5_MKEY_MASK_FREE = 1ull << 29,
283+
MLX5_MKEY_MASK_PAGE_SIZE_5 = 1ull << 42,
283284
MLX5_MKEY_MASK_RELAXED_ORDERING_READ = 1ull << 47,
284285
};
285286

include/linux/mlx5/mlx5_ifc.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,7 +1846,8 @@ struct mlx5_ifc_cmd_hca_cap_bits {
18461846

18471847
u8 log_bf_reg_size[0x5];
18481848

1849-
u8 reserved_at_270[0x3];
1849+
u8 disciplined_fr_counter[0x1];
1850+
u8 reserved_at_271[0x2];
18501851
u8 qp_error_syndrome[0x1];
18511852
u8 reserved_at_274[0x2];
18521853
u8 lag_dct[0x2];
@@ -2171,7 +2172,9 @@ struct mlx5_ifc_cmd_hca_cap_2_bits {
21712172
u8 min_mkey_log_entity_size_fixed_buffer[0x5];
21722173
u8 ec_vf_vport_base[0x10];
21732174

2174-
u8 reserved_at_3a0[0xa];
2175+
u8 reserved_at_3a0[0x2];
2176+
u8 max_mkey_log_entity_size_fixed_buffer[0x6];
2177+
u8 reserved_at_3a8[0x2];
21752178
u8 max_mkey_log_entity_size_mtt[0x6];
21762179
u8 max_rqt_vhca_id[0x10];
21772180

@@ -12380,7 +12383,9 @@ struct mlx5_ifc_mtrc_ctrl_bits {
1238012383

1238112384
struct mlx5_ifc_host_params_context_bits {
1238212385
u8 host_number[0x8];
12383-
u8 reserved_at_8[0x7];
12386+
u8 reserved_at_8[0x5];
12387+
u8 host_pf_not_exist[0x1];
12388+
u8 reserved_at_14[0x1];
1238412389
u8 host_pf_disabled[0x1];
1238512390
u8 host_num_of_vfs[0x10];
1238612391

0 commit comments

Comments
 (0)