From 2084a5a72df45fbcda82839ea35486f8583227bc Mon Sep 17 00:00:00 2001 From: Alex Williams Date: Wed, 7 Mar 2018 15:24:04 -0800 Subject: uhd-dpdk: Add DPDK-based sockets-like library 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. --- host/cmake/Modules/FindDPDK.cmake | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 host/cmake/Modules/FindDPDK.cmake (limited to 'host/cmake/Modules') diff --git a/host/cmake/Modules/FindDPDK.cmake b/host/cmake/Modules/FindDPDK.cmake new file mode 100644 index 000000000..4382a8cce --- /dev/null +++ b/host/cmake/Modules/FindDPDK.cmake @@ -0,0 +1,32 @@ +# +# Copyright 2018 Ettus Research, a National Instruments Company +# +# SPDX-License-Identifier: GPL-3.0-or-later +# +# - Find DPDK +# Find the DPDK includes and client library +# This module defines +# DPDK_INCLUDE_DIR, where to find rte_config.h +# DPDK_LIBRARIES, the libraries needed by a DPDK user +# DPDK_FOUND, If false, do not try to use DPDK. +# also defined, but not for general use are +# DPDK_LIBRARY, where to find the DPDK library. + +include(FindPackageHandleStandardArgs) + +find_path ( DPDK_INCLUDE_DIR rte_config.h + PATHS ENV RTE_INCLUDE + PATH_SUFFIXES dpdk +) + +find_library(DPDK_LIBRARY + PATHS $ENV{RTE_SDK_DIR}/$ENV{RTE_TARGET}/lib +) + +list(APPEND DPDK_LIBRARIES dpdk) + +find_package_handle_standard_args(dpdk + DEFAULT_MSG + DPDK_INCLUDE_DIR + DPDK_LIBRARIES +) -- cgit v1.2.3