aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/x300/x300_device_args.hpp
diff options
context:
space:
mode:
authorAlex Williams <alex.williams@ni.com>2019-03-15 15:06:55 -0700
committerMartin Braun <martin.braun@ettus.com>2019-04-10 16:50:43 -0700
commit4842d45fec1e62f9687ccf5c000f29cd34425964 (patch)
tree8d915b5222490f1391ab7a89e81d9f741ace2055 /host/lib/usrp/x300/x300_device_args.hpp
parent1b35a9b3b2c81db1d4cda040d91432618410f980 (diff)
downloaduhd-4842d45fec1e62f9687ccf5c000f29cd34425964.tar.gz
uhd-4842d45fec1e62f9687ccf5c000f29cd34425964.tar.bz2
uhd-4842d45fec1e62f9687ccf5c000f29cd34425964.zip
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.
Diffstat (limited to 'host/lib/usrp/x300/x300_device_args.hpp')
-rw-r--r--host/lib/usrp/x300/x300_device_args.hpp14
1 files changed, 14 insertions, 0 deletions
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<true> _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