aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Koo <steven.koo@ni.com>2020-09-03 10:00:54 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2020-09-03 16:25:24 -0500
commit21bf14cb99ccadffa0b7b91dad5fbec4b9fb89e5 (patch)
treeb9909f28d4b3255c54552af471fd0a676b608c49
parent7e2fa6feb642b0970eafc68a0451ec4cde782106 (diff)
downloaduhd-21bf14cb99ccadffa0b7b91dad5fbec4b9fb89e5.tar.gz
uhd-21bf14cb99ccadffa0b7b91dad5fbec4b9fb89e5.tar.bz2
uhd-21bf14cb99ccadffa0b7b91dad5fbec4b9fb89e5.zip
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 <steven.koo@ni.com>
-rw-r--r--host/lib/rfnoc/replay_block_control.cpp9
1 files changed, 4 insertions, 5 deletions
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) {