From 385e9cf069526a5a571fe0dd5ef9d3749272f04e Mon Sep 17 00:00:00 2001 From: Trung Tran Date: Wed, 16 Jan 2019 12:34:58 -0800 Subject: mpmd_xport: honor users' send(recv)frame_size args --- host/lib/usrp/mpmd/mpmd_xport_ctrl_liberio.cpp | 9 +++++---- host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp | 10 ++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'host/lib') 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("send_frame_size", get_mtu(uhd::TX_DIRECTION)); + default_buff_args.recv_frame_size = + xport_args.cast("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("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("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"], -- cgit v1.2.3