From 049db630bba0d133abb54b166541c815f9b972b2 Mon Sep 17 00:00:00 2001 From: Andrew Lynch Date: Fri, 29 Oct 2021 14:50:03 -0500 Subject: uhd: update num_recv_frames calculation for ctrl links --- host/lib/include/uhdlib/transport/udp_common.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'host/lib') diff --git a/host/lib/include/uhdlib/transport/udp_common.hpp b/host/lib/include/uhdlib/transport/udp_common.hpp index cb11ce173..96146a701 100644 --- a/host/lib/include/uhdlib/transport/udp_common.hpp +++ b/host/lib/include/uhdlib/transport/udp_common.hpp @@ -248,8 +248,11 @@ inline link_params_t calculate_udp_link_params( if (link_type == link_type_t::CTRL) { // Control links typically do not allow the number of frames to be // configured. + // Keep the default_link_params value if it is higher to handle + // high speed DPDK links link_params.num_recv_frames = - uhd::rfnoc::CMD_FIFO_SIZE / uhd::rfnoc::MAX_CMD_PKT_SIZE; + std::max(uhd::rfnoc::CMD_FIFO_SIZE / uhd::rfnoc::MAX_CMD_PKT_SIZE, + link_params.num_recv_frames); } else if (link_type == link_type_t::TX_DATA) { // Note that the send frame size will be capped to the Tx MTU. link_params.send_frame_size = link_args.cast("send_frame_size", -- cgit v1.2.3