aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrung Tran <trung.tran@ettus.com>2019-01-16 12:34:58 -0800
committerBrent Stapleton <brent.stapleton@ettus.com>2019-01-21 14:44:02 -0800
commit385e9cf069526a5a571fe0dd5ef9d3749272f04e (patch)
treeeff8cdc5d2ff29a578c929ccb7432adbcd6a37b3
parent66bfc90c275de0e96c0cd51f84a52fb93e2ef201 (diff)
downloaduhd-385e9cf069526a5a571fe0dd5ef9d3749272f04e.tar.gz
uhd-385e9cf069526a5a571fe0dd5ef9d3749272f04e.tar.bz2
uhd-385e9cf069526a5a571fe0dd5ef9d3749272f04e.zip
mpmd_xport: honor users' send(recv)frame_size args
-rw-r--r--host/lib/usrp/mpmd/mpmd_xport_ctrl_liberio.cpp9
-rw-r--r--host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp10
2 files changed, 11 insertions, 8 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_xport_ctrl_liberio.cpp b/host/lib/usrp/mpmd/mpmd_xport_ctrl_liberio.cpp
index 7efe2bb9a..85d83abc1 100644
--- a/host/lib/usrp/mpmd/mpmd_xport_ctrl_liberio.cpp
+++ b/host/lib/usrp/mpmd/mpmd_xport_ctrl_liberio.cpp
@@ -46,14 +46,15 @@ mpmd_xport_ctrl_liberio::mpmd_xport_ctrl_liberio(const uhd::device_addr_t& mb_ar
uhd::both_xports_t mpmd_xport_ctrl_liberio::make_transport(
mpmd_xport_mgr::xport_info_t& xport_info,
const usrp::device3_impl::xport_type_t xport_type,
- const uhd::device_addr_t& /*xport_args_*/
-)
+ const uhd::device_addr_t& xport_args)
{
transport::zero_copy_xport_params default_buff_args;
/* default ones for RX / TX, override below */
- default_buff_args.send_frame_size = get_mtu(uhd::TX_DIRECTION);
- default_buff_args.recv_frame_size = get_mtu(uhd::RX_DIRECTION);
+ default_buff_args.send_frame_size =
+ xport_args.cast<size_t>("send_frame_size", get_mtu(uhd::TX_DIRECTION));
+ default_buff_args.recv_frame_size =
+ xport_args.cast<size_t>("recv_frame_size", get_mtu(uhd::RX_DIRECTION));
default_buff_args.num_recv_frames = LIBERIO_NUM_RECV_FRAMES;
default_buff_args.num_send_frames = LIBERIO_NUM_SEND_FRAMES;
diff --git a/host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp b/host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp
index df02b183f..cc0a610a3 100644
--- a/host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp
+++ b/host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp
@@ -191,13 +191,15 @@ uhd::both_xports_t mpmd_xport_ctrl_udp::make_transport(
}
transport::zero_copy_xport_params default_buff_args;
// Create actual UDP transport
- default_buff_args.recv_frame_size = get_mtu(uhd::RX_DIRECTION);
- default_buff_args.recv_buff_size = link_speed * MPMD_BUFFER_FILL_RATE;
- default_buff_args.send_buff_size = link_speed * MPMD_BUFFER_FILL_RATE;
+ default_buff_args.recv_frame_size =
+ xport_args.cast<size_t>("recv_frame_size", get_mtu(uhd::RX_DIRECTION));
+ default_buff_args.recv_buff_size = link_speed * MPMD_BUFFER_FILL_RATE;
+ default_buff_args.send_buff_size = link_speed * MPMD_BUFFER_FILL_RATE;
if (xport_type == usrp::device3_impl::ASYNC_MSG) {
default_buff_args.send_frame_size = MPMD_10GE_ASYNCMSG_FRAME_MAX_SIZE;
} else {
- default_buff_args.send_frame_size = get_mtu(uhd::TX_DIRECTION);
+ default_buff_args.send_frame_size =
+ xport_args.cast<size_t>("send_frame_size", get_mtu(uhd::TX_DIRECTION));
}
transport::udp_zero_copy::buff_params buff_params;
auto recv = transport::udp_zero_copy::make(xport_info["ipv4"],