NameDateSize

..13-Mar-201819

auto/H31-Dec-20194 KiB

conf/H13-Mar-2018191

contrib/H13-Mar-201872

docs/H13-Mar-2018106

LICENSEH A D13-Mar-20181.4 KiB

misc/H13-Mar-201839

README.TLDKH A D13-Mar-20185 KiB

src/H13-Mar-2018103

README.TLDK

11. INTRODUCTION
2
3This is a clone of nginx (from https://github.com/nginx/nginx)
4to demonstrate and benchmark TLDK library integration with real
5world application.
6A new nginx module is created and and BSD socket-like API is implemented
7on top of native TLDK API.
8Note, that right now only minimalistic subset of socket-like API is provided:
9- accept
10- close
11- readv
12- recv
13- writev
14so only limited nginx functionality is available for a moment.
15
162. HOW TO BUILD/RUN
17
18  cd to your TLDK root directory
19  Build TLDK as usual (and explained in README), then:
20  export TLDK_ROOT=${PWD}
21  cd app/nginx/
22  auto/configure --prefix=${TLDK_ROOT}/${RTE_TARGET} --with-tldk \
23  --with-cc-opt="-march=native -D_GNU_SOURCE"
24  make install
25
26  create a copy of app/nginx/conf/nginx-tldk.conf and modify it accrodingly
27  to your system setup.
28  ${TLDK_ROOT}/${RTE_TARGET}/sbin/nginx -c <path_to_your_config_file>
29
30  On your peer system:
31  make sure your net interface connected to the TLDK system is up and running
32  add TLDK assigned ip address into ip neighbor table
33  run your favorite web client
34  as an example:
35  ifconfig eth1 192.168.1.90/24 up
36  ip neigh add 192.168.1.60 lladdr 3c:fd:fe:9f:ce:e9 nud permanent dev eth1
37  wget --no-proxy 192.168.1.60:6000
38
393. NGINX.CONF TLDK RELATED PARAMETERS 
40
41  Syntax:	tldk_main { ... }
42  Default:	-
43  Context:	main
44  Provides the configuration file context in which the directives that affect
45  global DPDK/TLDK startup parameters are specified. 
46
47  Syntax:	eal_main <DPDK cmdline startup parameters>;
48  Default:	""
49  Context:	tldk_main
50  Example:	eal_cmd --lcores=8-10 -n 4 -w 03:00.1; 
51  Provides command-line arguments list for rte_eal_init().
52
53  Syntax:	port <uint> mtu <uint> rx_offload <uint> tx_offload <uint> ipv4 <ipv4> ipv6 <ipv6>; 
54  Default:	-
55  Context:	tldk_main
56  Example:	port 0 rx_offload 0xf tx_offload 0xf ipv4 192.168.1.60;
57  Provides configuration information for particular DPDK ethdev port.
58  port -	DPDK port id to be used to receive/send packets.
59		It is an mandatory option.
60  mtu - 	MTU to be used on that port (= application data size + L2/L3/L4
61		headers sizes, default=1514). It is an optional option.
62  rx_offload -	RX HW offload capabilities to enable/use on this port.
63		(bitmask of DPDK DEV_RX_OFFLOAD_* values).
64		It is an optional option.
65  tx_offload -	TX HW offload capabilities to enable/use on this port.
66		(bitmask of DPDK DEV_TX_OFFLOAD_* values).
67		It is an optional option.
68  ipv4 -	IPv4 network address that will be assigned to that port.
69		At least one of ipv4/ipv6 has to be specified.
70  ipv6 -	IPv6 network address that will be assigned to that port.
71		At least one of ipv4/ipv6 has to be specified.
72
73  For more details regarding TLDK related parameters in nginx config file,
74  please refer to app/nginx/conf/nginx-tldk.conf. 
75
76  Syntax:	tldk_ctx { ... }
77  Default:	-
78  Context:	main
79  Provides the configuration for particular TLDK context.
80  In current implementation there is one to one mapping between NGINX workers
81  and TLDK contents:
82  - each NGINX worker has to be assigned to work with only one TLDK context.
83  - each TLDK context services only one NGINX worker.
84  
85  Syntax:	worker <uint>;
86  Default:	-
87  Context:	tldk_ctx
88  Example:	worker 0;
89  Associates given TLDK context with NGINX worker # 0.
90  
91  Syntax:	lcore <uint>;
92  Default:	-
93  Context:	tldk_ctx
94  Example:	lcore 9;
95  Specifies on which lcore given TLDK context will run on.
96  
97  Syntax:	be_in_worker;
98  Default:	off
99  Context:	tldk_ctx
100  Example:	be_in_worker;
101  Specifies should TLDK context processing (Back-End) run inside NGINX worker
102  process, or as a separate thread (DPDK lcore) inside NGINX master process.
103  
104  Syntax:	tcp_timewait <uint>;
105  Default:	120s
106  Context:	tldk_ctx
107  Example:	tcp_timewait 0;
108  Specifies TCP TIME_WAIT state timeout duration in milliseconds for given
109  TLDK context.
110  
111  Syntax:	mbufs <uint>;
112  Default:	0x20000
113  Context:	tldk_ctx
114  Example:	mbufs 0x20000;
115  Specifies maximum number of DPDK mbufs to be created for given TLDK context.
116  
117  Syntax:	sbufs <uint>;
118  Default:	1
119  Context:	tldk_ctx
120  Example:	sbufs 0x100;
121  Specifies maximum number of send mbufs per stream (connection)
122  for given TLDK context.
123  
124  Syntax:	rbufs <uint>;
125  Default:	1
126  Context:	tldk_ctx
127  Example:	rbufs 0x100;
128  Specifies maximum number of recv mbufs per stream (connection)
129  for given TLDK context.
130  
131  Syntax:	dev <uint> port <uint> queue <uint>;
132  Default:	-
133  Context:	tldk_ctx
134  Example:	dev 0 port 0 queue 0;
135  Assigns DPDK ethdev devices to the given TLDK context.
136  dev -		dev id inside given TLDK context.
137  port -	DPDK port id to be used to receive/send packets.
138  queue -	DPDK queue id to be used to receive/send packets.
139  
140  Syntax:	dest dev <uint> addr <ipv4/ipv6> masklen <uint> mac <ether>
141  Default:	-
142  Context:	tldk_ctx
143  Example:	dest dev 0 addr 192.168.1.0 masklen 24 mac 3C:FD:FE:9F:D1:E1;
144  Specifies routing information for given TLDK context.
145  dev -		dev id inside given TLDK context.
146  addr -	ipv4/ipv6 destination address.
147  masklen - 	destination network prefix length.
148  mac - 	destination ethernet address.
149