Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue: 3465282 Fix IB clock converter inaccuracy #1030

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/vma/dev/time_converter_ib_ctx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@

#define IB_CTX_TC_DEVIATION_THRESHOLD 10

time_converter_ib_ctx::time_converter_ib_ctx(struct ibv_context* ctx, ts_conversion_mode_t ctx_time_converter_mode, uint64_t hca_core_clock) :
time_converter_ib_ctx::time_converter_ib_ctx(struct ibv_context* ctx, ts_conversion_mode_t ctx_time_converter_mode, uint64_t hca_core_clock_khz) :
m_p_ibv_context(ctx), m_ctx_parmeters_id(0)
{
#ifdef DEFINED_IBV_CQ_TIMESTAMP
if (ctx_time_converter_mode != TS_CONVERSION_MODE_DISABLE) {
ctx_timestamping_params_t* current_parameters_set = &m_ctx_convert_parmeters[m_ctx_parmeters_id];

m_converter_status = TS_CONVERSION_MODE_RAW;
current_parameters_set->hca_core_clock = hca_core_clock * USEC_PER_SEC;
current_parameters_set->hca_core_clock = hca_core_clock_khz * MSEC_PER_SEC;

if (ctx_time_converter_mode != TS_CONVERSION_MODE_RAW) {
if (sync_clocks(&current_parameters_set->sync_systime, &current_parameters_set->sync_hw_clock)) {
Expand All @@ -73,7 +73,7 @@ time_converter_ib_ctx::time_converter_ib_ctx(struct ibv_context* ctx, ts_convers
}
}
#else
NOT_IN_USE(hca_core_clock);
NOT_IN_USE(hca_core_clock_khz);
#endif
if (ctx_time_converter_mode != m_converter_status) {
ibchtc_logwarn("converter status different then expected (ibv context %p, value = %d , expected = %d)"
Expand Down
2 changes: 1 addition & 1 deletion src/vma/dev/time_converter_ib_ctx.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
class time_converter_ib_ctx : public time_converter
{
public:
time_converter_ib_ctx(struct ibv_context* ctx, ts_conversion_mode_t ctx_time_converter_mode, uint64_t hca_core_clock);
time_converter_ib_ctx(struct ibv_context* ctx, ts_conversion_mode_t ctx_time_converter_mode, uint64_t hca_core_clock_khz);

virtual ~time_converter_ib_ctx() {};

Expand Down