aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorAndrew Lynch <andrew.lynch@ni.com>2021-10-29 14:50:03 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2021-11-02 07:55:54 -0700
commit049db630bba0d133abb54b166541c815f9b972b2 (patch)
tree78ec9b4fe76c18c6b1e96da998db97cbaae38052 /host
parent4c75e48d248e0e4f143a66da5d1598e546eaf53a (diff)
downloaduhd-049db630bba0d133abb54b166541c815f9b972b2.tar.gz
uhd-049db630bba0d133abb54b166541c815f9b972b2.tar.bz2
uhd-049db630bba0d133abb54b166541c815f9b972b2.zip
uhd: update num_recv_frames calculation for ctrl links
Diffstat (limited to 'host')
-rw-r--r--host/lib/include/uhdlib/transport/udp_common.hpp5
1 files changed, 4 insertions, 1 deletions
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<size_t>("send_frame_size",