aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/x300/x300_impl.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_impl.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_impl.hpp')
-rw-r--r--host/lib/usrp/x300/x300_impl.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp
index c58440d54..c101b3032 100644
--- a/host/lib/usrp/x300/x300_impl.hpp
+++ b/host/lib/usrp/x300/x300_impl.hpp
@@ -33,6 +33,7 @@
#include <boost/dynamic_bitset.hpp>
#include <boost/weak_ptr.hpp>
#include <atomic>
+#include <functional>
// Ethernet ports
enum x300_eth_iface_t {
@@ -48,7 +49,6 @@ struct x300_eth_conn_t
size_t link_rate;
};
-
uhd::uart_iface::sptr x300_make_uart_iface(uhd::wb_iface::sptr iface);
uhd::wb_iface::sptr x300_make_ctrl_iface_enet(
@@ -61,6 +61,10 @@ uhd::device_addrs_t x300_find(const uhd::device_addr_t& hint_);
class x300_impl : public uhd::usrp::device3_impl
{
public:
+ //! Function to create a udp_simple::sptr (kernel-based or DPDK-based)
+ using udp_simple_factory_t =
+ std::function<uhd::transport::udp_simple::sptr(const std::string&, const std::string&)>;
+
x300_impl(const uhd::device_addr_t&);
void setup_mb(const size_t which, const uhd::device_addr_t&);
~x300_impl(void);
@@ -231,6 +235,8 @@ private:
uhd::device_addr_t get_rx_hints(size_t mb_index);
void post_streamer_hooks(uhd::direction_t dir);
+
+ udp_simple_factory_t _x300_make_udp_connected;
};
#endif /* INCLUDED_X300_IMPL_HPP */