aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport/udp_zero_copy.cpp
diff options
context:
space:
mode:
authorMichael West <michael.west@ettus.com>2019-06-19 13:25:32 -0700
committerMartin Braun <martin.braun@ettus.com>2019-07-18 08:46:16 -0700
commit028a052dec8733f552fbfe0792126f5e9f8ca526 (patch)
tree67d42f21e4a2d20eadad036b655c2a0a40f71605 /host/lib/transport/udp_zero_copy.cpp
parentab6893ab32f001d9aab1606bad34fafc4ab76933 (diff)
downloaduhd-028a052dec8733f552fbfe0792126f5e9f8ca526.tar.gz
uhd-028a052dec8733f552fbfe0792126f5e9f8ca526.tar.bz2
uhd-028a052dec8733f552fbfe0792126f5e9f8ca526.zip
Device3: Fix MTU and default frame sizes
The latest changes to the get_*x_stream() functions to calculate the MTU for the channel caused default frame size values to be ignored. This change fixes that by changing the key from "send/recv_frame_size" to "mtu" and then changing the implementations of make_transport() constrain the frame size values based on the "mtu" value as well as any device and/or transport-specific limits. Signed-off-by: Michael West <michael.west@ettus.com>
Diffstat (limited to 'host/lib/transport/udp_zero_copy.cpp')
-rw-r--r--host/lib/transport/udp_zero_copy.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/host/lib/transport/udp_zero_copy.cpp b/host/lib/transport/udp_zero_copy.cpp
index 6d615570f..e3df80da6 100644
--- a/host/lib/transport/udp_zero_copy.cpp
+++ b/host/lib/transport/udp_zero_copy.cpp
@@ -384,6 +384,11 @@ udp_zero_copy::sptr udp_zero_copy::make(const std::string& addr,
xport_params.send_frame_size = UDP_ZERO_COPY_DEFAULT_FRAME_SIZE;
}
+ UHD_LOG_TRACE("UDP",
+ "send_frame_size: " << xport_params.send_frame_size);
+ UHD_LOG_TRACE("UDP",
+ "recv_frame_size: " << xport_params.recv_frame_size);
+
if (xport_params.recv_buff_size == 0) {
UHD_LOG_TRACE("UDP", "Using default value for recv_buff_size");
xport_params.recv_buff_size = std::max(UDP_ZERO_COPY_DEFAULT_BUFF_SIZE,