From 4842d45fec1e62f9687ccf5c000f29cd34425964 Mon Sep 17 00:00:00 2001 From: Alex Williams Date: Fri, 15 Mar 2019 15:06:55 -0700 Subject: x300: Add support for DPDK transports Use dpdk_simple together with a control transport factory. Where udp_zero_copy is used, use dpdk_zero_copy if use_dpdk=1. --- host/lib/usrp/x300/x300_device_args.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'host/lib/usrp/x300/x300_device_args.hpp') diff --git a/host/lib/usrp/x300/x300_device_args.hpp b/host/lib/usrp/x300/x300_device_args.hpp index 05238a7d1..1b153184c 100644 --- a/host/lib/usrp/x300/x300_device_args.hpp +++ b/host/lib/usrp/x300/x300_device_args.hpp @@ -36,6 +36,7 @@ public: , _fw_file("fw", "") , _blank_eeprom("blank_eeprom", false) , _enable_tx_dual_eth("enable_tx_dual_eth", false) + , _use_dpdk("use_dpdk", false) { // nop } @@ -116,6 +117,10 @@ public: { return _enable_tx_dual_eth.get(); } + bool get_use_dpdk() const + { + return _use_dpdk.get(); + } inline virtual std::string to_string() const { @@ -220,6 +225,14 @@ private: if (dev_args.has_key("enable_tx_dual_eth")) { _enable_tx_dual_eth.set(true); } + if (dev_args.has_key("use_dpdk")) { +#ifdef HAVE_DPDK + _use_dpdk.set(true); +#else + UHD_LOG_WARNING("DPDK", + "Detected use_dpdk argument, but DPDK support not built in."); +#endif + } // Sanity check params _enforce_range(_master_clock_rate, MIN_TICK_RATE, MAX_TICK_RATE); @@ -247,6 +260,7 @@ private: constrained_device_args_t::str_arg _fw_file; constrained_device_args_t::bool_arg _blank_eeprom; constrained_device_args_t::bool_arg _enable_tx_dual_eth; + constrained_device_args_t::bool_arg _use_dpdk; }; }}} // namespace uhd::usrp::x300 -- cgit v1.2.3