aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/tx_streamer_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/tests/tx_streamer_test.cpp')
-rw-r--r--host/tests/tx_streamer_test.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/host/tests/tx_streamer_test.cpp b/host/tests/tx_streamer_test.cpp
index 75511c329..11e33d413 100644
--- a/host/tests/tx_streamer_test.cpp
+++ b/host/tests/tx_streamer_test.cpp
@@ -53,10 +53,19 @@ public:
_send_link->release_send_buff(std::move(buff));
}
+ size_t get_mtu() const
+ {
+ return _send_link->get_send_frame_size();
+ }
+
+ size_t get_chdr_hdr_len() const
+ {
+ return sizeof(packet_info_t);
+ }
+
size_t get_max_payload_size() const
{
- return _send_link->get_send_frame_size() - sizeof(packet_info_t);
- ;
+ return get_mtu() - get_chdr_hdr_len();
}
private: