From 09d992860b57a04e3a2bc696b7fa6f277217da89 Mon Sep 17 00:00:00 2001 From: Ivan Kochin Date: Tue, 26 Dec 2023 18:03:23 +0200 Subject: [PATCH] UCT/MD: Fix build + rename fill_empty() to reset() + fix typo + add parentheses --- src/uct/ib/mlx5/dv/ib_mlx5dv_md.c | 3 +-- test/gtest/uct/ib/test_ib_md.cc | 3 ++- test/gtest/uct/ib/test_ib_xfer.cc | 4 ++-- test/gtest/uct/test_p2p_mix.cc | 2 +- test/gtest/uct/uct_test.cc | 6 +++--- test/gtest/uct/uct_test.h | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/uct/ib/mlx5/dv/ib_mlx5dv_md.c b/src/uct/ib/mlx5/dv/ib_mlx5dv_md.c index 6bf4434bcb8c..2281eeec185d 100644 --- a/src/uct/ib/mlx5/dv/ib_mlx5dv_md.c +++ b/src/uct/ib/mlx5/dv/ib_mlx5dv_md.c @@ -243,8 +243,7 @@ static ucs_status_t uct_ib_mlx5_devx_reg_ksm_data_contig( list_size, mkey_index, reason, mr_p, mkey); - uct_ib_mlx5_devx_ksm_log(md, atomic, address, mr_length, ksm_iova, status, - 0); + uct_ib_mlx5_devx_ksm_log(md, atomic, address, mr_length, ksm_iova, status, 0); return status; } diff --git a/test/gtest/uct/ib/test_ib_md.cc b/test/gtest/uct/ib/test_ib_md.cc index a96d54fc3c9b..464c4762b998 100644 --- a/test/gtest/uct/ib/test_ib_md.cc +++ b/test/gtest/uct/ib/test_ib_md.cc @@ -262,7 +262,8 @@ void test_ib_md::test_mkey_pack_mt_internal(unsigned access_mask, uct_md_mkey_pack_params_t pack_params; pack_params.field_mask = UCT_MD_MKEY_PACK_FIELD_FLAGS; pack_params.flags = pack_flags; - ASSERT_UCS_OK(uct_md_mkey_pack_v2(md(), memh, &pack_params, rkey.data())); + ASSERT_UCS_OK(uct_md_mkey_pack_v2(md(), memh, buffer, size, + &pack_params, rkey.data())); uct_md_mem_dereg_params_t params; params.field_mask = UCT_MD_MEM_DEREG_FIELD_MEMH | diff --git a/test/gtest/uct/ib/test_ib_xfer.cc b/test/gtest/uct/ib/test_ib_xfer.cc index 5be875cbea86..2e753f5d47a8 100644 --- a/test/gtest/uct/ib/test_ib_xfer.cc +++ b/test/gtest/uct/ib/test_ib_xfer.cc @@ -214,8 +214,8 @@ UCS_TEST_P(uct_p2p_mix_test_mt, mix1000) UCS_TEST_P(uct_p2p_mix_test_mt, mix1000_last_byte_offset) { - /* Alloc 2 chunks buffer, but perform all the operation on the last 8 bytes */ - run(1000, reg_mt_chunk * 2 - 8, 8); + /* Alloc 2 chunks buffer, but perform the operations on the last 8 bytes */ + run(1000, (reg_mt_chunk * 2) - 8, 8); } UCT_INSTANTIATE_IB_TEST_CASE(uct_p2p_mix_test_mt) diff --git a/test/gtest/uct/test_p2p_mix.cc b/test/gtest/uct/test_p2p_mix.cc index bafe41b594c2..0383f70d3d45 100644 --- a/test/gtest/uct/test_p2p_mix.cc +++ b/test/gtest/uct/test_p2p_mix.cc @@ -301,7 +301,7 @@ UCS_TEST_P(uct_p2p_mix_test, mix_10000) { UCS_TEST_P(uct_p2p_mix_test, mix1000_last_byte_offset) { - /* Alloc page size buffer, but perform all the operation on the last 8 bytes */ + /* Alloc page size buffer, but perform the operations on the last 8 bytes */ run(1000, ucs_get_page_size() - 8, 8); } diff --git a/test/gtest/uct/uct_test.cc b/test/gtest/uct/uct_test.cc index 15fb74bb4e4a..b963b7200b09 100644 --- a/test/gtest/uct/uct_test.cc +++ b/test/gtest/uct/uct_test.cc @@ -1367,7 +1367,7 @@ std::ostream& operator<<(std::ostream& os, const uct_tl_resource_desc_t& resourc return os << resource.tl_name << "/" << resource.dev_name; } -void uct_test::mapped_buffer::fill_empty() +void uct_test::mapped_buffer::reset() { m_mem.method = UCT_ALLOC_METHOD_LAST; m_mem.address = NULL; @@ -1404,7 +1404,7 @@ uct_test::mapped_buffer::mapped_buffer(size_t size, uint64_t seed, m_end = (char*)m_buf + size; pattern_fill(seed); } else { - fill_empty(); + reset(); } m_iov.buffer = ptr(); m_iov.length = length(); @@ -1430,7 +1430,7 @@ uct_test::mapped_buffer::mapped_buffer(mapped_buffer &&other) : m_rkey.rkey = other.m_rkey.rkey; m_rkey.handle = other.m_rkey.handle; - other.fill_empty(); + other.reset(); } uct_test::mapped_buffer::~mapped_buffer() { diff --git a/test/gtest/uct/uct_test.h b/test/gtest/uct/uct_test.h index 6ca2d2a48044..b5584d5ca996 100644 --- a/test/gtest/uct/uct_test.h +++ b/test/gtest/uct/uct_test.h @@ -264,7 +264,7 @@ class uct_test : public testing::TestWithParam, static size_t pack(void *dest, void *arg); private: - void fill_empty(); + void reset(); const uct_test::entity& m_entity;