From 4547f2de85f0d8b258a89cea71af774fce8616b7 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 2 Dec 2019 23:06:39 -0800 Subject: x300,mpmd: Enable DPDK x300: - Remove obsolete variables from x300_eth_mgr and X300 motherboard components - Added some documentation / comments - Use constrained device args in more places - Enables the use of use_dpdk=1 - Switches between regular (kernel-based) and DPDK UDP mpmd: - Merge link_if_ctrl for udp and dpdk_udp - Update cmake options --- host/lib/usrp/x300/x300_eth_mgr.hpp | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'host/lib/usrp/x300/x300_eth_mgr.hpp') diff --git a/host/lib/usrp/x300/x300_eth_mgr.hpp b/host/lib/usrp/x300/x300_eth_mgr.hpp index 1f4013e17..19b6064dd 100644 --- a/host/lib/usrp/x300/x300_eth_mgr.hpp +++ b/host/lib/usrp/x300/x300_eth_mgr.hpp @@ -99,7 +99,13 @@ private: return eth_conns.at(_local_device_ids.at(0)); } - static udp_simple_factory_t x300_get_udp_factory(const device_addr_t& args); + //! Create a factory function for UDP traffic + // + // \note This is static rather than local to x300_eth_mgr.cpp to get access + // to udp_simple_factory_t + // \param use_dpdk If true, use a DPDK transport instead of a regular UDP + // transport + static udp_simple_factory_t x300_get_udp_factory(const bool use_dpdk); /*! * Automatically determine the maximum frame size available by sending a UDP packet @@ -109,15 +115,22 @@ private: frame_size_t determine_max_frame_size( const std::string& addr, const frame_size_t& user_mtu); - // Discover the ethernet connections per motherboard + //! Discover the ethernet connections per motherboard + // + // - Gets called during init_link() + // - Populates eth_conn + // - Populates _local_device_ids + // + // \throws uhd::runtime_error if no Ethernet connections can be found void discover_eth( const uhd::usrp::mboard_eeprom_t mb_eeprom, const std::string& loaded_fpga_image); - + /************************************************************************** + * Attributes + *************************************************************************/ + // Cache the initial device args that brought up this motherboard const x300_device_args_t _args; - uhd::property_tree::sptr _tree; - udp_simple_factory_t _x300_make_udp_connected; std::map eth_conns; -- cgit v1.2.3