aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport
Commit message (Collapse)AuthorAgeFilesLines
* transport: Move uhd-dpdk header to uhdlibAlex Williams2019-01-153-3/+3
|
* 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-1510-218/+690
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-154-5/+73
| | | | | | | | | | | | 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.
* udp_wsa_zero_copy: add default xport paramsThomas Vogel2019-01-091-1/+25
|
* transport: Fix MSVC warning by replacing size_t with uint32_tMartin Braun2019-01-031-1/+1
| | | | This fixes a C4267 which pops up a lot when compiling UHD with MSVC.
* cmake: Update coding style to use lowercase commandsMartin Braun2018-11-143-67/+67
| | | | | | | | | | | | | | | | | Also updates our coding style file. Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code (with GNU compliant sed): cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done > convert.sed \ && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' \ '*CMakeLists.txt' | xargs -0 gsed -i -f convert.sed && rm convert.sed (Make sure the backslashes don't get mangled!)
* UHD: Fix RX streamer SOB and EOB handlingMichael West2018-10-241-2/+9
|
* usb: fix dummy compilation in msvcMark Meserve2018-09-141-0/+8
|
* udp_zero_copy: add default xport params.Trung Tran2018-09-131-14/+58
|
* uhd-dpdk: Add DPDK-based sockets-like libraryAlex Williams2018-08-2912-2/+2252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This library makes available a userspace network stack with a socket-like interface for applications (except the sockets pass around pointers to buffers and use the buffers directly--It's sockets + a put/get for buffer management). Supported services are ARP and UDP. Destinations can be unicast or broadcast. Multicast is not currently supported. The implementation has two driver layers. The upper layer runs within the caller's context. The caller will make requests through lockless ring buffers (including socket creation and packet transmission), and the lower layer will implement the requests and provide a response. Currently, the lower layer runs in a separate I/O thread, and the caller will block until it receives a response. The I/O thread's main body is in src/uhd_dpdk_driver.c. You'll find that all I/O thread functions are prefixed by an underscore, and user thread functions do not. src/uhd_dpdk.c is used to initialize uhd-dpdk and bring up the network interfaces. src/uhd_dpdk_fops.c and src/uhd_dpdk_udp.c are for network services. The test is a benchmark of a flow control loop using a certain made-up protocol with credits and sequence number tracking.
* uhd: udp: 'all_matching' endpoint resolutionBrent Stapleton2018-08-291-1/+2
| | | | | | | | By default, Boost.ASIO uses 'address_configured' mode for UDP endpoint resolution, which "only return[s] IPv4 addresses if a non-loopback IPv4 address is configured for the system". This changes the resolver to use 'all_matching', which instead returns "all matching IPv6 and IPv4 addresses".
* nirio: Demote RPC client cancel/abort to TRACEMartin Braun2018-08-211-1/+1
| | | | | | This is a common message that will always occur during device init when there is no RIO device available. Because it looks like an error, it confuses people and was thus reduced to TRACE.
* X300: Change Ethernet bufferingMichael West2018-07-254-29/+44
| | | | | | | Ethernet buffering is now done so that most of the buffering is done in the socket buffers and multiple frames are only used to support the receive side offload of the socket I/O. Eliminates dropped packets at high full duplex rates.
* rx_streamer: Release buffers no longer neededMichael West2018-07-251-9/+26
| | | | | This is to allow for num_recv_frames=1 and reduce conversions from ticks to time_spec_t to improve critical path performance.
* Device3: Change packet-based flow control to byte-based flow controlMartin Braun2018-07-255-105/+92
|
* liberio_zero_copy: add tx and rx mutexesTrung Tran2018-06-181-1/+6
|
* lib: Purge all references to boost::this_thread::sleep()Martin Braun2018-04-307-15/+21
| | | | Replace with std::this_thread::sleep_for().
* Correctly set end of burst flag in metadata.Vidush2018-04-301-0/+2
|
* lib: Unbreak build against Boost 1.67Jan Beich2018-04-181-1/+1
| | | | | Some uses of boost::posix_time were incorrect and would cause compiler errors on Boost 1.67.
* niusrprio: Move a const from header to implMartin Braun2018-04-181-0/+5
| | | | This avoids having to redeclare the static const to avoid linker errors.
* x300: Replace all references to boost::this_thread::sleep()Martin Braun2018-04-171-1/+4
| | | | Use std::this_thread::sleep_for() instead.
* niusrprio: Refactor niusrprio_session, move out static constsMartin Braun2018-04-171-3/+7
| | | | | | Static const attributes were causing linker issues the way there were being used, but they were only used in niusrprio_session.cpp and thus could be factored out.
* lib: move atomic.hpp and system_time.hpp to uhdlibMartin Braun2018-04-063-3/+3
|
* transport: Demote UDP socket buffer size log message to TRACEMartin Braun2018-03-301-1/+1
| | | | | Note: When socket buffers are incorrectly size, a WARNING is still printed.
* uhd: Move internal headers to uhdlib/Martin Braun2018-03-142-2/+2
| | | | | | | | | | | | | | | | To avoid the proliferation of additional include directories and multiple ways of including project-local headers, we now default to moving all headers that are used across UHD into the uhdlib/ subdirectory. Some #include statements were also reordered as they were modified for closer compliance with the coding guidelines. Internal cpp source files should now include files like this: #include <uhdlib/rfnoc/ctrl_iface.hpp> Reviewed-by: Ashish Chaudhari <ashish.chaudhari@ettus.com>
* x300: improve lvbitx bitstream md5 read timeMark Meserve2018-03-131-10/+20
| | | | | - Reading line by line avoids loading the entire 25 MB bitstream into memory since the MD5 hash usually occurs within the first 1% of the file stream
* uhd: Update license headersMartin Braun2018-02-1941-37/+78
| | | | | | | All copyright is now attributed to "Ettus Research, a National Instruments company". SPDX headers were also updated to latest version 3.0.
* Move all license headers to SPDX format.Martin Braun2017-12-2239-682/+253
|
* Fix build with Boost 1.66ilovezfs2017-12-193-3/+3
| | | | Thanks to FX Coudert for suggesting this fix.
* transport: nirio_zero_copy: Remove redundant buffer poolsMoritz Fischer2017-10-111-5/+0
| | | | | | | Remove the redundant send/recv buffer_pools from nirio_zero_copy_impl class as no one is using them. Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
* transport: liberio: Check return values for liberio_chan_set_fixed_size()Moritz Fischer2017-10-101-4/+10
| | | | | | | Check return value of liberio_chan_set_fixed_size() since it can fail, and bad things happen if one just proceeds. Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
* transport: liberio: Fix bug with recv timeout conversionMoritz Fischer2017-10-051-3/+3
| | | | | | | | | | | | | The timeout value passed in by UHD would get multiplied by USEC, to convert from the UHD value in seconds to the liberio value in microseconds. The bug manifested itself by calling liberio_dequeue_buf() with a timeout equivalent to 100s. Fixes ed1c64c81 ('transport: Added liberio_zero_copy transport ...') Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Cc: Alex Williams <alex.williams@ni.com>
* transport: liberio: Fix indentsMoritz Fischer2017-10-051-4/+4
| | | | | | | Remove stray tabs from liberio_zero_copy transport and clarify actual code flow by fixing indent. Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
* udp: Modify log messages of UDP transportMartin Braun2017-10-042-10/+27
| | | | | - Remove multi-line log message for socket creation - Include local addr and port in trace messages
* udp: Added option to query local address of socketMartin Braun2017-10-042-1/+25
|
* transport: Added liberio_zero_copy transport implementationMoritz Fischer2017-08-073-0/+304
| | | | | | | | | | | | This adds a zero copy transport using the liberio library. Currently supported API version for liberio is 0.3, this might still very much break, since the library is still in development. So far nobody uses it UHD so we might as well merge it. Signed-off-by: Alex Williams <alex.williams@ni.com> Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
* utils: add set_thread_name API call, move thread_priority to threadAndrej Rode2017-06-292-0/+3
|
* uhd: Replaced many lexical_cast with appropriate C++11 equivalentsMartin Braun2017-06-292-4/+3
|
* x300: Added location info to FW ctrl error messagesAshish Chaudhari2017-06-151-0/+4
|
* Merge branch 'maint'Martin Braun2017-05-032-171/+79
|\
| * PCIe: Fix runtime page size acquisition and page size alignment checks for ↵Michael West2017-04-201-1/+38
| | | | | | | | nirio_zero_copy transport.
| * Revert commit e348353c4f5acef6a5ece11e9c336df4c15d65e1.Michael West2017-04-201-170/+41
| | | | | | | | | | Worker threads significantly increased CPU load and did not increase performance as expected.
* | add windows get_local_port()Andrej Rode2017-04-141-0/+10
| |
* | transports: Added get_local_port() method to UDP transportsAndrej Rode2017-04-141-0/+1
| |
* | logging: remove unecessery newlines in log messagesAndrej Rode2017-04-071-1/+1
| |
* | transport: Fix some nullptr vs NULL vs 0Martin Braun2017-04-061-2/+2
| | | | | | | | This affects some versions of Clang when using C++11 features.
* | transport: Fixed UHD logging post-mergeMartin Braun2017-04-061-2/+1
| |
* | Merge branch 'maint'Martin Braun2017-04-064-41/+421
|\|
| * Implement worker threads to offload conversion of data and transport I/OMichael West2017-04-051-41/+170
| | | | | | | | | | for send() calls. - One worker thread per channel provides for improved scalability