[tldk][dpdk][dev] TLDK--基于dpdk的用户态协议栈传输层组件简单调研
如题,以下是一份简单的快速调研。
TLDK: Transport Layer Development Kit
一 什么是TLDK
transport layer development kit
处理tcp/udp的库
- 不提供socket api
- 构建在dpdk的上层。
- 专注在tcp, udp不做完整的协议栈。
- 没有arp, ip, eth, 路由表等。
VPP的一个节点
VPP协议栈的组成部分。
非VPP框架也能用
专门补充了一下功能,用来支持非VPP环境。netlink agents, packaging等。
二 TLDK的背景
tldk是VPP的一个graph node,VPP是fd.io项目的核心技术,由思科提交。fd.io是托管在linux基金会的项目。
tldk应该与vpp有相同的license。
什么是fd.io
FD.io (Fast data – Input/Output) is a collection of several projects and libraries to amplify the transformation that began with Data Plane Development Kit (DPDK) to support flexible, programmable and composable services on a generic hardware platform. FD.io offers the Software Defined Infrastructure developer community a landing site with multiple projects fostering innovations in software-based packet processing towards the creation of high-throughput, low-latency and resource-efficient IO services suitable to many architectures (x86, ARM, and PowerPC) and deployment environments (bare metal, VM, container).
什么是vpp
A key component is the Vector Packet Processing (VPP) library donated by Cisco. This code is already running in products on the market today. The VPP library is highly modular, allowing for new graph nodes to be easily “plugged in” without changes to the underlying code base. This gives developers the potential to easily build any number of packet processing solutions with varying forwarding graphs.
In development since 2002, VPP is production code currently running in shipping products. It runs in user space on multiple architectures including x86, ARM, and Power architectures on both x86 servers and embedded devices. The design of VPP is hardware, kernel, and deployment (bare metal, VM, container) agnostic. It runs completely in userspace.
资料
扫盲概述:https://fd.io/about/
什么是VPP: https://wiki.fd.io/view/VPP/What_is_VPP%3F
VPP的基本架构:https://fd.io/technology/
tldk主页:https://wiki.fd.io/view/TLDK
tldk代码页:https://github.com/FDio/tldk
IRC Channel: #fdio, #fdio-tldk
三 编译
kernel
version: 3.10.0-327.36.3.el7.x86_64
dpdk
version:tag v18.02-rc4
tldk
version: tag v18.02
代码结构
$(TLDK_ROOT)
|
+----app
| |
| +-- nginx - a clone of nginx integrated with TLDK
| (refer to app/nginx/README.TLDK for more information)
|
+----lib
| |
| +--libtle_dring - dring library
| |
| +--libtle_l4p - implementation of the TCP/UDP packet processing
| |
| +--libtle_timer - implementation of the timer library
|
+----examples
| |
| +--l4fwd - sample app to demonstrate and test libtle_l4p TCP/UDP
| usage (refer to examples/l4fwd/README for more information)
|
+----test - unit-tests
| |
| +--dring - UT for libtle_dring (standalone app)
| |
| +--gtest - UT for libtle_dring, libtle_l4p and libtle_timer
| | (googletest)
| |
| +--timer - UT for libtle_timer (standalone app)
步骤
export RTE_SDK=/root/Src/thirdparty/dpdk.git
export RTE_TARGET=x86_64-native-linuxapp-gcc