From 21bf14cb99ccadffa0b7b91dad5fbec4b9fb89e5 Mon Sep 17 00:00:00 2001 From: Steven Koo Date: Thu, 3 Sep 2020 10:00:54 -0500 Subject: rfnoc: replay: Update packet size on mtu update Replay block would previously fail output on low mtu links because it was creating packets based on the default contruction mtu of 8192. This change will update the packet size when mtu gets updated. This also removes a warning for large packet sizes because the replay block uses a maximum packet size property. The block should be free to coerce down based on mtu limitations. Signed-off-by: Steven Koo --- host/lib/rfnoc/replay_block_control.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'host/lib') diff --git a/host/lib/rfnoc/replay_block_control.cpp b/host/lib/rfnoc/replay_block_control.cpp index a2b45f575..289e24e97 100644 --- a/host/lib/rfnoc/replay_block_control.cpp +++ b/host/lib/rfnoc/replay_block_control.cpp @@ -392,9 +392,10 @@ private: add_property_resolver({&_play_size.at(port)}, {&_play_size.at(port)}, [this, port]() { _set_play_size(_play_size.at(port).get(), port); }); - add_property_resolver({&_packet_size.at(port)}, {}, [this, port]() { - _set_packet_size(_packet_size.at(port).get(), port); - }); + add_property_resolver({&_packet_size.at(port), + get_mtu_prop_ref({res_source_info::OUTPUT_EDGE, port})}, + {}, + [this, port]() { _set_packet_size(_packet_size.at(port).get(), port); }); } void _set_play_type(const io_type_t type, const size_t port) @@ -459,8 +460,6 @@ private: const uint32_t payload_size = packet_size - CHDR_MAX_LEN_HDR; uint32_t ipp = payload_size / item_size; if (ipp > max_ipp_per_mtu) { - RFNOC_LOG_WARNING("ipp value " << ipp << " exceeds MTU of " << mtu - << "! Coercing to " << max_ipp_per_mtu); ipp = max_ipp_per_mtu; } if ((ipp % ipc) != 0) { -- cgit v1.2.3