From c406c1dc9d10aa04e8d6a97919488b31f2b68424 Mon Sep 17 00:00:00 2001 From: Michael West Date: Tue, 16 Oct 2018 14:17:42 -0700 Subject: UHD: Fix RX streamer SOB and EOB handling --- host/lib/transport/super_recv_packet_handler.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'host') diff --git a/host/lib/transport/super_recv_packet_handler.hpp b/host/lib/transport/super_recv_packet_handler.hpp index ea02f367d..894287d6b 100644 --- a/host/lib/transport/super_recv_packet_handler.hpp +++ b/host/lib/transport/super_recv_packet_handler.hpp @@ -519,12 +519,21 @@ private: } } info.data_bytes_to_copy = info[index].ifpi.num_payload_bytes; + // reset start_of_burst and end_of_burst states + info.metadata.start_of_burst = info[index].ifpi.sob; + info.metadata.end_of_burst = info[index].ifpi.eob; } //if the sequence id matches: // remove this index from the list and continue else if (info[index].time == info.alignment_time){ info.indexes_todo.reset(index); + // All channels should have sob set at the same time, so only + // set start_of burst if all channels have sob set. + info.metadata.start_of_burst &= info[index].ifpi.sob; + // If any channel indicates eob, no more data will be received for + // that channel so set end_of_burst for any eob. + info.metadata.end_of_burst |= info[index].ifpi.eob; } else { // Not going to use this buffer, so release it info[index].reset(); @@ -660,8 +669,6 @@ private: curr_info.metadata.time_spec = time_spec_t::from_ticks(curr_info[0].time, _tick_rate); curr_info.metadata.more_fragments = false; curr_info.metadata.fragment_offset = 0; - curr_info.metadata.start_of_burst = curr_info[0].ifpi.sob; - curr_info.metadata.end_of_burst = curr_info[0].ifpi.eob; curr_info.metadata.error_code = rx_metadata_t::ERROR_CODE_NONE; } -- cgit v1.2.3