From 028a052dec8733f552fbfe0792126f5e9f8ca526 Mon Sep 17 00:00:00 2001 From: Michael West Date: Wed, 19 Jun 2019 13:25:32 -0700 Subject: 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 --- host/lib/transport/udp_zero_copy.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'host/lib/transport/udp_zero_copy.cpp') 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, -- cgit v1.2.3