aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include/uhdlib/utils
diff options
context:
space:
mode:
authorAlex Williams <alex.williams@ni.com>2018-09-25 14:49:45 -0700
committerAshish Chaudhari <ashish.chaudhari@ettus.com>2019-01-25 13:30:22 -0800
commitad2720d7188aece35e8aa4c65118a33b8b9ae690 (patch)
tree2d834deb728e0d59a60b8c23fa85da9db59df8af /host/lib/include/uhdlib/utils
parent3c821adfedf859ffb689136eea2ac6fa6b48916a (diff)
downloaduhd-ad2720d7188aece35e8aa4c65118a33b8b9ae690.tar.gz
uhd-ad2720d7188aece35e8aa4c65118a33b8b9ae690.tar.bz2
uhd-ad2720d7188aece35e8aa4c65118a33b8b9ae690.zip
mpmd,transport,prefs: Add xport_mgr for dpdk_zero_copy
Add configuration sections to the UHD config file for NIC entries. Keys are based on MAC addresses, and the entries beneath the section describe which CPU and I/O thread to use for the NIC and its IPv4 address. Make ring sizes configurable for uhd-dpdk. Ring size is now an argument for packet buffers. Note that the maximum number of available buffers is still determined at init! Add ability to receive broadcasts to uhd-dpdk. This is controllable by a boolean in the sockarg during socket creation. dpdk_zero_copy will filter broadcast packets out. Add dpdk_simple transport (to mirror udp_simple). This transport allows receiving from broadcast addresses, but it only permits one outstanding buffer at a time. Fix IP checksum handling in UHD-DPDK. TX checksums were not being calculated in the NIC, and in RX, the check for IP checksums allowed values of zero (reported as none). Now packets with bad IP checksums will be dropped.
Diffstat (limited to 'host/lib/include/uhdlib/utils')
-rw-r--r--host/lib/include/uhdlib/utils/prefs.hpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/host/lib/include/uhdlib/utils/prefs.hpp b/host/lib/include/uhdlib/utils/prefs.hpp
index 62831a875..e528450cd 100644
--- a/host/lib/include/uhdlib/utils/prefs.hpp
+++ b/host/lib/include/uhdlib/utils/prefs.hpp
@@ -48,6 +48,40 @@ namespace uhd { namespace prefs {
*/
uhd::device_addr_t get_usrp_args(const uhd::device_addr_t &user_args);
+ /*! Convenience function to update global DPDK args with settings from
+ * config files.
+ *
+ * Searches for a profile attached to the dpdk-conf key, like this:
+ * [dpdk-conf=myconfig]
+ * num_mbufs=4095
+ * mbuf_cache_size=315
+ * mtu=8000
+ *
+ * \param user_args After getting the device args from the config
+ * files, all of these key/value pairs will be applied
+ * and will overwrite the settings from config files
+ * if they exist.
+ */
+ uhd::device_addr_t get_dpdk_args(const uhd::device_addr_t &user_args);
+
+ /*! Convenience function to update per-NIC DPDK args with settings from
+ * config files.
+ *
+ * Grabs settings based on provided MAC address. Sections created like so:
+ * [dpdk-mac=00:01:02:03:04:05]
+ * dpdk-ipv4 = 192.168.20.1/24
+ * dpdk-io-cpu = 1
+ *
+ * [dpdk-mac=00:01:02:03:04:06]
+ * dpdk-ipv4 = 192.168.40.1/24
+ * dpdk-io-cpu = 1
+ *
+ * \param user_args After getting the device args from the config
+ * files, all of these key/value pairs will be applied
+ * and will overwrite the settings from config files
+ * if they exist.
+ */
+ uhd::device_addr_t get_dpdk_nic_args(const uhd::device_addr_t &user_args);
}} /* namespace uhd::prefs */
#endif /* INCLUDED_LIBUHD_UTILS_PREFS_HPP */