#283 - Gate ibverbs real-time RX timestamps - #284
Conversation
Request real-time CQ timestamps only when mlx5dv advertises support. Fall back to the existing device-clock conversion path otherwise, allowing DevX RQ creation on affected ConnectX-7 firmware. Signed-off-by: Denis Leshchev <dleshchev@nvidia.com>
|
| Filename | Overview |
|---|---|
| src/engines/ibverbs/daqiri_ibverbs_engine.cpp | Gates the real-time RQ timestamp format on the advertised mlx5 capability and converts default-format timestamps through the existing device-clock path. |
| src/engines/ibverbs/daqiri_ibverbs_engine.h | Records the selected timestamp format in per-queue state for matching decode behavior. |
| include/daqiri/common.h | Clarifies that the public timestamp accessor returns epoch nanoseconds after any required engine-side conversion. |
| docs/api-reference/configuration.md | Documents the capability-gated raw-ibverbs timestamp behavior. |
| docs/api-reference/cpp.md | Documents device-clock conversion for C++ API consumers. |
| docs/api-reference/python.md | Documents device-clock conversion for Python API consumers. |
| docs/concepts.md | Explains the two mlx5 RX timestamp representations and their application-transparent handling. |
Reviews (3): Last reviewed commit: "#283 - Raise ibverbs timestamp fallback ..." | Re-trigger Greptile
Signed-off-by: Denis Leshchev <dleshchev@nvidia.com>
| // the public PTP epoch-nanosecond timestamp contract. | ||
| DEVX_SET(rqc, rqc, ts_format, MLX5_RQC_TIMESTAMP_FORMAT_REAL_TIME); | ||
| } else { | ||
| DAQIRI_LOG_WARN( |
There was a problem hiding this comment.
I would make this critical since we don't want to support it. We should find out why this is failing on Spark, though.
There was a problem hiding this comment.
Done in 959ec9e (#283 - Raise ibverbs timestamp fallback log level). I changed the unsupported real-time CQ timestamp fallback from DAQIRI_LOG_WARN to DAQIRI_LOG_CRITICAL and re-ran the IGX hardware-loopback validation; it now emits the critical log, creates the DevX striding RQ, transfers traffic, and exits with cqe_errors=0 / app_ring_full_drops=0.
Signed-off-by: Denis Leshchev <dleshchev@nvidia.com>
Fixes #283.
Summary
mlx5dv_query_device()advertisesMLX5DV_CONTEXT_FLAGS_REAL_TIME_TS.mlx5dv_ts_to_ns()path.Failure and expected behavior
After #281, raw ibverbs RX fails inside
daqiri_init()before any traffic measurement:The identical configuration initializes with a pre-#281 image. Raw RX should also initialize on devices whose firmware does not support real-time CQ timestamps; those devices should use the free-running device clock and DAQIRI's existing clock conversion.
Root cause and isolation
#281 unconditionally set
MLX5_RQC_TIMESTAMP_FORMAT_REAL_TIMEin the DevX RQ context. The affected device does not advertise the corresponding mlx5dv capability, and firmware rejects the unsupported RQ context duringCREATE_RQ.The RX-side changes were restored independently in diagnostic container builds:
mainCREATE_RQfails, syndrome0x43d98fIncreasing the RX buffer count to restore the old effective queue depth likewise does not change the failure.
The old setup succeeds because it leaves the RQ in the default free-running timestamp format. The corrected setup makes the same choice only when required by device capability; capable devices retain the real-time format and its direct UTC decode.
log_wq_pg_szremains encoded relative to the mlx5 adapter's fixed 4-KiB page, rather than the operating-system page used to align and register the UMEM. This is why the adapter-relative value remains valid on ARM64 kernels using larger pages. The currently reachable validation systems report 4-KiB kernel pages, so a live 64-KiB-kernel confirmation remains explicitly outstanding while this PR is a draft.Validation
Build
The final commit was built and installed successfully with the project container:
IMAGE_TAG=daqiri:ibverbs-rx-init-fix-final \ BASE_TARGET=dpdk \ DAQIRI_ENGINE="dpdk ibverbs" \ scripts/build-container.shgit-clang-format --diff origin/mainreports no changes, andgit diff --checkpasses.Initialization correctness proof
An RX-only raw ibverbs run on the affected hardware created the CQ and 64-stride DevX RQ, installed the flow, started the worker, and exited cleanly after five seconds:
The zero-packet RX-only run proves initialization only; it is not a throughput result.
Physical cross-host completion and throughput proof
A subsequent physical cross-host raw ibverbs TX/RX run used the final fixed image on RX and an unchanged existing ibverbs image on TX. No benchmark configuration or harness semantics were changed.
out_of_bufferremained flat; CQ errors and application-ring-full drops were zero.This physical run proves that the corrected RX path receives and completes cross-host traffic at line-rate-class load. It is separate from the initialization proof and does not update or replace the published performance tables.
Environment
6.17.0-1014-nvidia15b3:1021)28.45.40282407mlnx52-1.2407061Regression coverage
The failure occurs in device firmware during DevX object creation and there is no hardware-backed unit-test framework in the repository. The initialization and physical cross-host procedures above provide the regression check for this draft. A live run on a 64-KiB ARM64 kernel remains the only outstanding validation item.
Scope
This PR changes only the ibverbs raw-RX timestamp-format selection and matching decode path. It does not alter TCP/socket behavior, benchmark documentation, published performance tables, or cross-host harness semantics.