Skip to content

Commit

Permalink
UCT/MD: Fix build + rename fill_empty() to reset() + fix typo + add p…
Browse files Browse the repository at this point in the history
…arentheses
  • Loading branch information
ivankochin committed Dec 26, 2023
1 parent c4259ab commit 09d9928
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/uct/ib/mlx5/dv/ib_mlx5dv_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
3 changes: 2 additions & 1 deletion test/gtest/uct/ib/test_ib_md.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
4 changes: 2 additions & 2 deletions test/gtest/uct/ib/test_ib_xfer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/gtest/uct/test_p2p_mix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
6 changes: 3 additions & 3 deletions test/gtest/uct/uct_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand All @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion test/gtest/uct/uct_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class uct_test : public testing::TestWithParam<const resource*>,
static size_t pack(void *dest, void *arg);

private:
void fill_empty();
void reset();

const uct_test::entity& m_entity;

Expand Down

0 comments on commit 09d9928

Please sign in to comment.