aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mpmd_xport: liberio: using 4096 bytes frame sizeTrung Tran2019-01-231-2/+6
| | | | | | | | Using a send_frame_size of 8192 locks up some devices while transmitting. The root cause of this is unknown, but the new value (4096) prevents this issue in most cases. Some device are still affected by the lock-up even after this change.
* mpm: Fix up Rhodium EEPROM handling for BfrfsEEPROMAlex Williams2019-01-231-24/+3
| | | | | | Fixes Rhodium for changes introduced in b7bab6a. The constructor call for BfrfsEEPROM didn't match the signature, and Rhodium's EEPROM map referred to the wrong revision.
* devtest: add universal_newlines to subprocess callTrung Tran2019-01-233-2/+4
| | | | | | | | | subprocess call in python3+ return stderr and stdout object is byte object instead of text. This caused many issue with parsing the ouput in devtest. These are not an issue in python2. This change will make devtest more python3 compatible. Signed-off-by: Trung.Tran<trung.tran@ettus.com>
* tests: replace has_key by using 'in'Trung Tran2019-01-235-8/+8
| | | | | | | python3+ dropped has_key function on dictionary. In order to make it compatible, we need to use 'in' keyword. Signed-off-by: Trung.Tran<trung.tran@ettus.com>
* lib: rfnoc: Add some missing virtual destructorsMartin Braun2019-01-223-2/+8
|
* formatting: Apply clang-format to nocscript filesMartin Braun2019-01-228-557/+499
|
* device3: Replace NULL with 0 for empty function pointersMartin Braun2019-01-221-2/+2
| | | | | Technically, nullptr should be the correct replacement, but some compilers have issues with that. This is a continuation of e1c754f20.
* cmake: Extend list of additional Boost versionsMartin Braun2019-01-221-0/+1
|
* examples: Fix boundary condition in ascii_art_dft plottingMartin Braun2019-01-211-1/+1
| | | | | | There was a corner case where the data could be such that the FFT plot symbol selection would cause an out-of-bounds access on the symbols table, and abort the example with an uncaught exception.
* transport: muxed_zero_copy_if fixesmichael-west2019-01-215-29/+22
| | | | | | | | | | Changed muxed_zero_copy_if to make each stream buffer the same number of frames as the underlying transport and changed the size of the underlying control transport for X300 and MPMD devices to match the size of the command FIFO in order to prevent starvation of any single control transport. Added some constants to remove hard coded values. Signed-off-by: michael-west <michael.west@ettus.com>
* docs: Add manual page for the N320/N321Martin Braun2019-01-217-10/+187
| | | | | | | Since the N32* is part of the N3XX family, it shares a page with N300/N310. Co-authored-by: Mark Meserve <mark.meserve@ni.com>
* mpmd_xport: honor users' send(recv)frame_size argsTrung Tran2019-01-212-8/+11
|
* mpmd: implement get_*x_hintsTrung Tran2019-01-212-6/+11
| | | | Fix transport related arguments passed down the stack.
* endianness: Replace Boost macros with custom onesMartin Braun2019-01-216-10/+41
| | | | | | | | Boost changed the macros for endianness identification in 1.69, and the deprecation warning is a pretty noisy one during compilation. This abstracts away the Boost macro, so we have two UHD macros, UHD_BIG_ENDIAN and UHD_LITTLE_ENDIAN. They indicate big and little endian byte order.
* lib: transport: convert: apply clang-formatBrent Stapleton2019-01-212-193/+261
| | | | | | | | | | | | | This is a continuation of 967be2a4. Applying clang-format to files needed for endianness changes. $ clang-format -i --style=file \ host/include/uhd/types/endianness.hpp \ host/include/uhd/utils/byteswap.hpp \ host/include/uhd/utils/byteswap.ipp $ clang-format -i --style=file \ host/lib/convert/convert_with_tables.cpp \ host/lib/transport/chdr.cpp
* rhodium: Fix some Pylint warningsMartin Braun2019-01-211-6/+4
| | | | Remove some semicolons and superfluous imports.
* cmake: Register N320 componentMartin Braun2019-01-211-1/+1
| | | | | | This will default to building the N320 driver. It replaces having to manually specify -DENABLE_N320=ON when depdendencies are met. This also means that N320 will be built by default.
* rh: increase timeout of set_rate's rpc callMark Meserve2019-01-211-1/+4
|
* lib: transport: Revert to boost instead of std sleepSugandha Gupta2019-01-181-3/+1
| | | | | | std::sleep_for causes issues with priority threading when running examples in embedded mode on some devices (E310). boost::sleep_for does not have this problem.
* lib: transport: apply clang-formatBrent Stapleton2019-01-1825-2326/+2745
| | | | | | | | | | This is a continuation of 967be2a4. $ find host/lib/transport -iname *.hpp -o -iname *.cpp |\ xargs clang-format -i -style=file Skipping host/lib/transport/nirio/ because of build errors. $ git checkout host/lib/transport/nirio
* multi_usrp: fix get_{tx/rx}_dc_offset_range default argumentChristian Hahn2019-01-181-2/+2
| | | | | | | The use of the wildcard channel index, ALL_CHANS, as the default value for the argument chan in the methods get_{tx/rx}_dc_offset_range seems inappropriate. A default value of 0 is consistent with other getters.
* math: Replace boost::*::{lcm,gcd}() with portable versionsMartin Braun2019-01-186-14/+40
| | | | | | Boost changed the lcm() and gcd() functions in Boost 1.67. This creates portable UHD versions to be used instead. They use various Boost versions under the hood conditionally.
* math: Remove uhd::math::log2, replace with std::log2Martin Braun2019-01-184-19/+5
| | | | | Now that we're C++11, we can assume the existence of said symbol and need no more portability hacks.
* formatting: preparing for uhd::math cleanupBrent Stapleton2019-01-185-971/+1129
| | | | Formatting files that will be touched in upcoming changes to uhd::math
* rfnoc: Fix detection of outstanding acks by ctrl_ifaceMartin Braun2019-01-172-5/+4
| | | | | | | There was a bug where the number of outstanding ACKS in RFNoC's ctrl_iface was derived from the number of recv frames, which was wrong. A number that was too low would effectively break timed commands on tune, which would, e.g., affect phase alignment.
* lib: rfnoc: apply clang-formatMartin Braun2019-01-1729-1905/+1859
| | | | | | This is a continuation of 967be2a4. $ clang-format -i -style=file host/lib/rfnoc/*.cpp
* mpm: n3xx: e320: Add bridge mode supportRyan Marlow2019-01-172-2/+9
|
* mpm: xportmgr_udp: Add bridge mode supportSugandha Gupta2019-01-171-18/+50
|
* mpm: ethtable: Add support for bridge mode to Ethernet dispatcherSugandha Gupta2019-01-171-21/+79
| | | | | | In bridge mode, packets may be arriving at the Ethernet device which aren't meant for this device, and thus need different routing instructions.
* mpm: net: Add bridge utilitiesSugandha Gupta2019-01-171-10/+36
|
* formatting: Add modified clang-format for headersMartin Braun2019-01-171-0/+94
| | | | | | | Because our headers do not require C++11, they need a different syntax (e.g., vector<vector<int> >, note the space between the >). Since some editors automatically pick up a .clang-format from a parent dir, this helps when editing headers.
* Debian: Rename file for libuhd installmichael-west2019-01-161-0/+0
|
* uhd: mpm: apply clang-format to all filesBrent Stapleton2019-01-16332-22736/+22735
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applying formatting changes to all .cpp and .hpp files in the following directories: ``` find host/examples/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/tests/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/dboard/neon/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/dboard/magnesium/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/device3/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/mpmd/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/x300/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/utils/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find mpm/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file ``` Also formatted host/include/, except Cpp03 was used as a the language standard instead of Cpp11. ``` sed -i 's/ Cpp11/ Cpp03/g' .clang-format find host/include/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file ``` Formatting style was designated by the .clang-format file.
* ascii_art_dft: move example within include guardBrent Stapleton2019-01-161-2/+1
| | | | | Moving the example `main` within the include guards for the file. This is mostly to help clang-format's include guard detection.
* formatting: remove vim hints in headersBrent Stapleton2019-01-1643-43/+0
| | | | | Remove trailing vim hints in header files. This functionality will be replaced by clang-format.
* clang-format: fixing include categoriesBrent Stapleton2019-01-161-4/+6
| | | | Increasing priority of `#include "header.hpp"` statements.
* examples: utils: skip formatting program optionsBrent Stapleton2019-01-1642-0/+84
| | | | | | Turning off clang formatting around the program option declarations. clang-format makes them looks bad an unreadable because it thinks the options are function calls or something.
* uhd: skip formatting misc arrays, maps, etc.Brent Stapleton2019-01-168-1/+20
| | | | | | Various data structures are nicely formatted to be human-readable. clang-format makes these structures harder to read, so we can skip formatting these sections.
* transport: Move uhd-dpdk header to uhdlibAlex Williams2019-01-154-3/+3
|
* tests: Add arguments to dpdk_test to control core mappingAlex Williams2019-01-151-40/+100
|
* tests: Add unit test for DPDK transportAlex Williams2019-01-152-0/+353
| | | | | | | | | This commit adds a loopback benchmark for a PC with 2 DPDK-compatible NIC ports that are connected together via a cable. It sends messages with embedded sequence numbers (outgoing and last-seen) for maintaining a flow control window of packets in flight. It tracks the number of bytes sent/received and reports the time the test took and average throughput.
* transport: Add dpdk_zero_copy transportAlex Williams2019-01-153-0/+527
| | | | | This transport is based on uhd-dpdk, and it includes a global context that must be initialized prior to creating any dpdk_zero_copy objects.
* transport: Add blocking recv calls to uhd-dpdkAlex Williams2019-01-1511-220/+704
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an internal wait queue API to uhd-dpdk. Socket configuration requests had their blocking calls re-implemented on top of this API, and it is also used to service requests to wait on RX packets (w/ timeout). The wait API involves a multi-producer, single-consumer queue per I/O thread (waiter_ring), with a condition variable used for sleeping. The data structure is shared between user thread and I/O thread, and because timeouts make resource release time non-deterministic, we use reference counting on the shared resource. One reference is generated by the user thread and passed to the I/O thread to consume. A user thread that still needs the data after waking must get() another reference, to postpone the destruction of the resource until it is done. Timeouts are based on CLOCK_MONOTONIC. For recv, a timeout of 0 indicates blocking indefinitely, and a negative timeout indicates no timeout is desired. Also drop timeout for closing sockets in uhd-dpdk. The timeout would allow a user thread to pre-empt the I/O thread's cleanup process. The user thread would free data structures the I/O thread still needed to function. Since this timeout is superfluous anyway, let's just get rid of it. Also add some more input checking and error reporting.
* uhd-dpdk: Add ARP responder, set MTU, and clean up APIAlex Williams2019-01-155-7/+75
| | | | | | | | | | | | Set MTU of Ethernet ports: Some NICs (like the Mellanox ones) require this to work. Add ARP responder to uhd-dpdk. Clean up pending ARP request list when done: Threads waiting for an ARP request to complete would be woken up when the request completed, but they wouldn't get removed from the list of pending requests. This fixes the issue.
* docs: Add comments for TwinRX and MCRMartin Braun2019-01-152-0/+25
| | | | | | The TwinRX dboards only support a master clock rate of 200 MHz, which is now emphasized in the manual. In addition, the meaning of tick rate, sampling rate, and master clock rate in the TwinRX context is explained.
* includes: Make sure BOOST_VERSION is always availableMartin Braun2019-01-151-0/+1
| | | | | Boost changed the includes, and boost/version.hpp was being implicitly imported. This makes the include explicit.
* examples: Improved error message in tx_waveformsDerek Kozel2019-01-141-2/+6
| | | | Non-CONST type waveforms require a non-zero wave freq
* mpmd: increase claim_rpc call timeout.Trung Tran2019-01-142-3/+6
| | | | | | | | | | | During certain RPC calls (e.g. update_component), the MPM RPC server is slow to respond to reclaim requests, which can causes RPC timeouts. These changes fix those timeouts. By setting the reclaiming timeout to twice the timeout of an RPC call, we have some margin for error on the host side, while not affecting the underlying claiming logic in MPM. The loop should still operate on a 5 second period, but now has more leeway during stressful conditions.
* rpc,mpmd: replace all set_timeout() to new apiTrung Tran2019-01-144-58/+11
| | | | | Using new rpc client new API that ensure atomic setting of timeout on each rpc call.
* mpmd_impl: move timeout constants to headerTrung Tran2019-01-142-9/+13
|