Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.

Commit ace1003

Browse files
saukacodebot
authored andcommitted
ofh: fix rx window metrics
1 parent 78a7a3c commit ace1003

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/ofh/receiver/ofh_rx_window_checker.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ void rx_window_checker::rx_window_checker_statistics::collect_metrics(received_m
121121
earliest_packet_in_symbols.exchange(EARLIEST_INITIAL_VALUE, std::memory_order_relaxed);
122122
metrics.latest_rx_msg_in_symbols = latest_packet_in_symbols.exchange(0, std::memory_order_relaxed);
123123

124+
// Correct the earliest metrics in case no packets were received.
125+
metrics.earliest_rx_msg_in_symbols =
126+
(metrics.earliest_rx_msg_in_symbols == EARLIEST_INITIAL_VALUE) ? 0 : metrics.earliest_rx_msg_in_symbols;
127+
124128
// Update last print.
125129
last_late_value_printed = current_nof_late;
126130
last_early_value_printed = current_nof_early;

0 commit comments

Comments
 (0)