1aa97dd1cSKonstantin Ananyev1. OVERVIEW
23395610eSKonstantin Ananyev
3aa97dd1cSKonstantin Ananyev   TLDK project scope is as follows:
4aa97dd1cSKonstantin Ananyev
5aa97dd1cSKonstantin Ananyev   1) To implement a set of libraries for L4 protocol processing (UDP, TCP etc.)
63395610eSKonstantin Ananyev   for both IPv4 and IPv6.
73395610eSKonstantin Ananyev
83395610eSKonstantin Ananyev   The goal is to provide lightweight, high performance and highly adaptable
93395610eSKonstantin Ananyev   implementation for L4(UDP, TCP etc.) protocol processing. The provided API
103395610eSKonstantin Ananyev   are not planned to be compatible with BSD socket API. These libraries are
11aa97dd1cSKonstantin Ananyev   supposed to be built on top of DPDK.
123395610eSKonstantin Ananyev
13aa97dd1cSKonstantin Ananyev   Note: these libraries are not supposed to be a 'complete' network stack.
143395610eSKonstantin Ananyev
15aa97dd1cSKonstantin Ananyev   Implementation of ARP, IP, ETHER, etc. layers and related routing tables,
163395610eSKonstantin Ananyev   code for setup, manage and perform actual IO over underlying devices are
173395610eSKonstantin Ananyev   all out of scope of these libraries.
183395610eSKonstantin Ananyev
19aa97dd1cSKonstantin Ananyev   The only information these libraries need to know about the 
20aa97dd1cSKonstantin Ananyev   underlying devices:
21aa97dd1cSKonstantin Ananyev   - supported HW offloads
22aa97dd1cSKonstantin Ananyev   - MTU and L3/L2 addresses
23aa97dd1cSKonstantin Ananyev   That allows the libraries to fill L2/L3 headers and mbuf metadata
24aa97dd1cSKonstantin Ananyev   for the outgoing packets.
253395610eSKonstantin Ananyev
26aa97dd1cSKonstantin Ananyev   These libraries should be developed in such manner, that they could be used
273395610eSKonstantin Ananyev   independently from implementations of 2) and 3).
283395610eSKonstantin Ananyev
29aa97dd1cSKonstantin Ananyev   2) To create VPP graph nodes, plugins etc using those libraries to implement
303395610eSKonstantin Ananyev   a host stack.
313395610eSKonstantin Ananyev
32aa97dd1cSKonstantin Ananyev   3) To create such mechanisms (netlink agents, packaging, etc) necessary
33aa97dd1cSKonstantin Ananyev   to make the resulting host stack easily usable by existing non-vpp aware
34aa97dd1cSKonstantin Ananyev   software.
353395610eSKonstantin Ananyev
369fa82a63SReshma Pattan   The library uses siphash logic from the below source
379fa82a63SReshma Pattan   https://github.com/veorq/SipHash
389fa82a63SReshma Pattan
399fa82a63SReshma Pattan
40aa97dd1cSKonstantin Ananyev2. INSTALLATION GUIDE
413395610eSKonstantin Ananyev
42946322cfSKonstantin Ananyev   1) Obtain latest supported DPDK version and build it.
433395610eSKonstantin Ananyev   (refer to http://dpdk.org for information how to download and build it).
44cecfc87fSJianfeng Tan   Currently supported(tested) DPDK versions: 18.11 LTS.
45aa97dd1cSKonstantin Ananyev   2) Make sure that RTE_SDK and RTE_TARGET DPDK related environment variables
463395610eSKonstantin Ananyev   are setup correctly.
47aa97dd1cSKonstantin Ananyev   3) Go to the TLDK root directory and type: 'make all'.
48aa97dd1cSKonstantin Ananyev   4) Run sample applications.
49aa97dd1cSKonstantin Ananyev
50aa97dd1cSKonstantin Ananyev   For enabling unit tests application using GoogleTest please see:
51aa97dd1cSKonstantin Ananyev   ./test/gtest/README
52aa97dd1cSKonstantin Ananyev
53aa97dd1cSKonstantin Ananyev   As an example:
54aa97dd1cSKonstantin Ananyev   export RTE_SDK=/opt/DPDK
55aa97dd1cSKonstantin Ananyev   export RTE_TARGET=x86_64-native-linuxapp-gcc
56aa97dd1cSKonstantin Ananyev
57aa97dd1cSKonstantin Ananyev   cd tldk
58aa97dd1cSKonstantin Ananyev   make all
59aa97dd1cSKonstantin Ananyev   ./x86_64-native-linuxapp-gcc/app/l4fwd ...
60aa97dd1cSKonstantin Ananyev
61aa97dd1cSKonstantin Ananyev3. CONTENTS
62aa97dd1cSKonstantin Ananyev
63aa97dd1cSKonstantin Ananyev   $(TLDK_ROOT)
64aa97dd1cSKonstantin Ananyev   |
65e18a033bSKonstantin Ananyev   +----app
66e18a033bSKonstantin Ananyev   |      |
67e18a033bSKonstantin Ananyev   |      +-- nginx - a clone of nginx integrated with TLDK
68e18a033bSKonstantin Ananyev   |          (refer to app/nginx/README.TLDK for more information)
69e18a033bSKonstantin Ananyev   |
70aa97dd1cSKonstantin Ananyev   +----lib
71aa97dd1cSKonstantin Ananyev   |      |
72aa97dd1cSKonstantin Ananyev   |      +--libtle_dring - dring library
73aa97dd1cSKonstantin Ananyev   |      |
74aa97dd1cSKonstantin Ananyev   |      +--libtle_l4p - implementation of the TCP/UDP packet processing
75aa97dd1cSKonstantin Ananyev   |      |
76aa97dd1cSKonstantin Ananyev   |      +--libtle_timer - implementation of the timer library
77aa97dd1cSKonstantin Ananyev   |
78aa97dd1cSKonstantin Ananyev   +----examples
79aa97dd1cSKonstantin Ananyev   |      |
80aa97dd1cSKonstantin Ananyev   |      +--l4fwd - sample app to demonstrate and test libtle_l4p TCP/UDP
8121121578SMariusz Drost   |           | usage (refer to examples/l4fwd/README for more information)
8221121578SMariusz Drost   |           |
8321121578SMariusz Drost   |           +--test - function test scripts for l4lib using l4fwd
84aa97dd1cSKonstantin Ananyev   |
85aa97dd1cSKonstantin Ananyev   +----test - unit-tests
86aa97dd1cSKonstantin Ananyev   |      |
87aa97dd1cSKonstantin Ananyev   |      +--dring - UT for libtle_dring (standalone app)
88aa97dd1cSKonstantin Ananyev   |      |
89aa97dd1cSKonstantin Ananyev   |      +--gtest - UT for libtle_dring, libtle_l4p and libtle_timer
90aa97dd1cSKonstantin Ananyev   |      |     (googletest)
91aa97dd1cSKonstantin Ananyev   |      |
92aa97dd1cSKonstantin Ananyev   |      +--timer - UT for libtle_timer (standalone app)