Skip to content

Commit c92698e

Browse files
authored
UCT/IB: disable indirect atomic registration for direct nic (#11111)
Signed-off-by: Roie Danino <rdanino@nvidia.com>
1 parent bf1294e commit c92698e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/uct/ib/base/ib_md.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ enum {
6565
threads */
6666
UCT_IB_MEM_IMPORTED = UCS_BIT(3), /**< The memory handle was
6767
created by mem_attach */
68+
UCT_IB_MEM_DIRECT_NIC = UCS_BIT(6), /**< The memory handle was
69+
registered using Direct NIC */
6870
#if ENABLE_PARAMS_CHECK
6971
UCT_IB_MEM_ACCESS_REMOTE_RMA = UCS_BIT(4), /**< RMA access was requested
7072
for the memory region */

src/uct/ib/mlx5/dv/ib_mlx5dv_md.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,7 @@ uct_ib_mlx5_devx_reg_mr(uct_ib_mlx5_md_t *md, uct_ib_mlx5_devx_mem_t *memh,
855855
length, params,
856856
access_flags);
857857
if (memh->mrs[mr_type].super.ib != NULL) {
858+
memh->super.flags |= UCT_IB_MEM_DIRECT_NIC;
858859
goto out;
859860
}
860861

@@ -2960,6 +2961,7 @@ uct_ib_mlx5_devx_mkey_pack(uct_md_h uct_md, uct_mem_h uct_memh,
29602961
((memh->super.flags & UCT_IB_MEM_ACCESS_REMOTE_ATOMIC) ||
29612962
uct_ib_mlx5_devx_memh_has_ro(md, memh)) &&
29622963
!(memh->super.flags & UCT_IB_MEM_IMPORTED) &&
2964+
!(memh->super.flags & UCT_IB_MEM_DIRECT_NIC) &&
29632965
md->super.config.enable_indirect_atomic &&
29642966
ucs_test_all_flags(md->flags,
29652967
UCT_IB_MLX5_MD_FLAG_KSM |

0 commit comments

Comments
 (0)