Docs: Review and update the docs for E-release
[samplevnf.git] / docs / testing / user / userguide / 07-Config_files.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International
2 .. License.
3 .. http://creativecommons.org/licenses/by/4.0
4 .. (c) OPNFV, Intel Corporation and others.
5
6 SampleVNF - Config files
7 ========================
8
9 The configuration files are created based on the DUT test scenarios.
10 The example reference files are provided as part of the VNFs in the 
11 config folder.
12
13 Following parameters will define the config files.
14
15 1. Loadbalancing: Hardware or Software
16 2. Traffic type: IPv4 or IPv6
17 3. Number of Ports: pairs: Single port or Multi-Port 
18
19 Following are the example configuration files for sampleVNFs.
20
21 vCGNAPT Config files
22 --------------------
23
24
25
26
27 vFW Config files
28 ----------------
29
30 The reference configuration files explained here are for Software and Hardware
31 loadbalancing with IPv4 traffic type and single port pair.
32 For other configurations liek IPv6 and Multi-port, refer to example config
33 files provided as part of the source code in config(VNFs/vFW/config) folder
34 of the VNFs. 
35
36 1. SWLB, IPv4, Single Port Pair, 4WT:
37
38   ::
39
40     [PIPELINE0]
41     type = MASTER
42     core = 0
43     
44     [PIPELINE1]
45     type =  ARPICMP
46     core = 0
47     
48     pktq_in  = SWQ2
49     pktq_out = TXQ0.0 TXQ1.0
50     
51     ; IPv4 ARP route table entries (dst_ip, mask, if_port, nh) hex values with no 0x
52     ; arp_route_tbl = (ac102814,ff000000,1,ac102814) (ca106414,ff000000,0,ca106414)
53     
54     ; IPv6 ARP route table entries (dst_ip, mask, if_port, nh) hex values with no 0x
55     ;nd_route_tbl =  (fec0::6a05:caff:fe30:21b0,64,0,fec0::6a05:caff:fe30:21b0)
56     ;nd_route_tbl =  (2012::6a05:caff:fe30:2081,64,1,2012::6a05:caff:fe30:2081)
57     
58     ; egress (private interface) info
59     pktq_in_prv =  RXQ0.0
60     
61     ;for pub port <-> prv port mapping (prv, pub)
62     prv_to_pub_map = (0,1)
63     prv_que_handler = (0)
64     
65     [PIPELINE2]
66     type = TXRX
67     core = 1
68     pktq_in  = RXQ0.0 RXQ1.0
69     pktq_out = SWQ0 SWQ1 SWQ2
70     pipeline_txrx_type = RXRX
71     
72     [PIPELINE3]
73     type = LOADB
74     core = 2
75     pktq_in  = SWQ0 SWQ1
76     pktq_out = SWQ3 SWQ4 SWQ5 SWQ6 SWQ7 SWQ8 SWQ9 SWQ10
77     outport_offset = 136
78     n_vnf_threads = 4 ; Number of worker threads
79     prv_que_handler = (0)
80     n_lb_tuples = 5 ; tuple(src_ip,dst_ip, src_port, dst_port, protocol)
81     ;loadb_debug = 0
82     
83     [PIPELINE4]
84     type = VFW
85     core = 3
86     pktq_in  = SWQ3 SWQ4
87     pktq_out = SWQ11 SWQ12;TXQ0.0 TXQ1.0
88     
89     n_rules = 4096 ; Max number of ACL rules
90     ;n_flows gets round up to power of 2
91     n_flows = 1048576 ; Max number of connections/flows per vFW WT
92     traffic_type = 4 ; IPv4 Traffic
93     ;traffic_type = 6 ; IPv6 Traffic
94     ; tcp_time_wait controls timeout for closed connection, normally 120
95     tcp_time_wait = 10  ; TCP Connection WAIT timeout
96     tcp_be_liberal = 0
97     ;udp_unreplied and udp_replied controls udp "connection" timeouts, normally 30/180
98     udp_unreplied = 180 ; UDP timeouts for unreplied traffic
99     udp_replied = 180 ; UDP timeout for replied traffic
100     
101     [PIPELINE5]
102     type = VFW
103     core = 4
104     pktq_in  = SWQ5 SWQ6
105     pktq_out = SWQ13 SWQ14;TXQ0.0 TXQ1.0
106     
107     n_rules = 4096
108     ;n_flows gets round up to power of 2
109     n_flows = 1048576
110     traffic_type = 4 ; IPv4 Traffic
111     ;traffic_type = 6 ; IPv6 Traffic
112     ; tcp_time_wait controls timeout for closed connection, normally 120
113     tcp_time_wait = 10
114     tcp_be_liberal = 0
115     ;udp_unreplied and udp_replied controls udp "connection" timeouts, normally 30/180
116     udp_unreplied = 180
117     udp_replied = 180
118     
119     [PIPELINE6]
120     type = VFW
121     core = 5
122     pktq_in  = SWQ7 SWQ8
123     pktq_out = SWQ15 SWQ16
124     
125     n_rules = 4096
126     ;n_flows gets round up to power of 2
127     n_flows = 1048576
128     traffic_type = 4 ; IPv4 Traffic
129     ;traffic_type = 6 ; IPv6 Traffic
130     ; tcp_time_wait controls timeout for closed connection, normally 120
131     tcp_time_wait = 10
132     tcp_be_liberal = 0
133     ;udp_unreplied and udp_replied controls udp "connection" timeouts, normally 30/180
134     udp_unreplied = 180
135     udp_replied = 180
136     
137     [PIPELINE7]
138     type = VFW
139     core = 6
140     pktq_in  = SWQ9 SWQ10
141     pktq_out = SWQ17 SWQ18
142     
143     n_rules = 4096
144     ;n_flows gets round up to power of 2
145     n_flows = 1048576
146     traffic_type = 4 ; IPv4 Traffic 
147     ;traffic_type = 6 ; IPv6 Traffic
148     ; tcp_time_wait controls timeout for closed connection, normally 120
149     tcp_time_wait = 10
150     tcp_be_liberal = 0
151     udp_unreplied = 180
152     udp_replied = 180
153     
154     [PIPELINE8]
155     type = TXRX
156     core = 1h
157     pktq_in  = SWQ11 SWQ12 SWQ13 SWQ14 SWQ15 SWQ16 SWQ17 SWQ18
158     pktq_out = TXQ0.1 TXQ1.1 TXQ0.2 TXQ1.2 TXQ0.3 TXQ1.3 TXQ0.4 TXQ1.4
159     pipeline_txrx_type = TXTX
160
161
162 2. HWLB, IPv4, Single Port Pair, 4 WT:
163
164 This configuration doesn't require LOADB and TXRX pipelines
165
166   ::
167
168     [PIPELINE0]
169     type = MASTER
170     core = 0
171     
172     [PIPELINE1]
173     type =  ARPICMP
174     core = 0
175     pktq_in  = SWQ0 SWQ1 SWQ2 SWQ3
176     pktq_out = TXQ0.0 TXQ1.0
177     
178     ; egress (private interface) info
179     pktq_in_prv =  RXQ0.0
180     
181     ;for pub port <-> prv port mapping (prv, pub)
182     prv_to_pub_map = (0,1)
183     prv_que_handler = (0)
184     
185     [PIPELINE2]
186     type = VFW
187     core = 1
188     pktq_in  = RXQ0.0 RXQ1.0
189     pktq_out = TXQ0.1 TXQ1.1 SWQ0
190     
191     n_rules = 4096
192     ;n_flows gets round up to power of 2
193     n_flows = 1048576
194     
195     traffic_type = 4 ; IPv4 Traffic
196     ;traffic_type = 6 ; IPv6 Traffic
197     ; tcp_time_wait controls timeout for closed connection, normally 120
198     tcp_time_wait = 10
199     tcp_be_liberal = 0
200     ;udp_unreplied and udp_replied controls udp "connection" timeouts, normally 30/180
201     udp_unreplied = 180
202     udp_replied = 180
203     
204     [PIPELINE3]
205     type = VFW
206     core = 2
207     pktq_in  = RXQ0.1 RXQ1.1
208     pktq_out = TXQ0.2 TXQ1.2 SWQ1
209     
210     n_rules = 4096
211     ;n_flows gets round up to power of 2
212     n_flows = 1048576
213     
214     traffic_type = 4 ; IPv4 Traffic
215     ;traffic_type = 6 ; IPv6 Traffic
216     ; tcp_time_wait controls timeout for closed connection, normally 120
217     tcp_time_wait = 10
218     tcp_be_liberal = 0
219     ;udp_unreplied and udp_replied controls udp "connection" timeouts, normally 30/180
220     udp_unreplied = 180
221     udp_replied = 180
222     
223     [PIPELINE4]
224     type = VFW
225     core = 3
226     pktq_in  = RXQ0.2 RXQ1.2
227     pktq_out = TXQ0.3 TXQ1.3 SWQ2
228     
229     n_rules = 4096
230     ;n_flows gets round up to power of 2
231     n_flows = 1048576
232     
233     traffic_type = 4 ; IPv4 Traffic
234     ;traffic_type = 6 ; IPv6 Traffic
235     ; tcp_time_wait controls timeout for closed connection, normally 120
236     tcp_time_wait = 10
237     tcp_be_liberal = 0
238     ;udp_unreplied and udp_replied controls udp "connection" timeouts, normally 30/180
239     udp_unreplied = 180
240     udp_replied = 180
241     
242     [PIPELINE5]
243     type = VFW
244     core = 4
245     pktq_in  = RXQ0.3 RXQ1.3
246     pktq_out = TXQ0.4 TXQ1.4 SWQ3
247     
248     n_rules = 4096
249     ;n_flows gets round up to power of 2
250     n_flows = 1048576
251     
252     traffic_type = 4 ; IPv4 Traffic
253     ;traffic_type = 6 ; IPv6 Traffic
254     ; tcp_time_wait controls timeout for closed connection, normally 120
255     tcp_time_wait = 10
256     tcp_be_liberal = 0
257     ;udp_unreplied and udp_replied controls udp "connection" timeouts, normally 30/180
258     udp_unreplied = 180
259     udp_replied = 180
260
261
262 vACL Config files
263 ----------------
264
265 The reference configuration files explained here are for Software and Hardware
266 loadbalancing with IPv4 traffic type and single port pair.
267 For other configurations liek IPv6 and Multi-port, refer to example config
268 files provided as part of the source code in config(VNFs/vACL/config) folder
269 of the VNFs. 
270
271 1. SWLB, IPv4, Single Port Pair, 1 WT:
272
273  ::
274
275     [EAL]
276     # add pci whitelist eg below
277     w = 05:00.0  ; Network Ports binded to dpdk
278     w = 05:00.1  ; Network Ports binded to dpdk
279     
280     [PIPELINE0]
281     type = MASTER
282     core = 0
283
284     [PIPELINE1]
285     type = ARPICMP
286     core = 0
287     pktq_in  = SWQ2
288     pktq_out = SWQ7
289     pktq_in_prv =  RXQ0.0
290     prv_to_pub_map = (0,1)
291     prv_que_handler = (0)
292     
293     [PIPELINE2]
294     type = TXRX
295     core = 1
296     pktq_in  = RXQ0.0 RXQ1.0
297     pktq_out = SWQ0 SWQ1 SWQ2
298     pipeline_txrx_type = RXRX
299     dest_if_offset = 176
300
301     [PIPELINE3]
302     type = LOADB
303     core = 2
304     pktq_in  = SWQ0 SWQ1
305     pktq_out = SWQ3 SWQ4
306     outport_offset = 136
307     phyport_offset = 204
308     n_vnf_threads = 1
309     prv_que_handler = (0)
310
311     [PIPELINE4]
312     type = ACL
313     core = 3
314     pktq_in  = SWQ3 SWQ4
315     pktq_out = SWQ5 SWQ6
316     n_flows = 1000000
317     pkt_type = ipv4
318     traffic_type = 4
319
320     [PIPELINE5]
321     type = TXRX
322     core = 1h
323     pktq_in  = SWQ5 SWQ6 SWQ7
324     pktq_out = TXQ0.0 TXQ1.0
325     pipeline_txrx_type = TXTX
326
327
328 2. SWLB, IPv4, Single Port Pair, 1 WT:
329
330  ::    
331
332     [EAL]
333     # add pci whitelist eg below
334     w = 05:00.0
335     w = 05:00.1
336     
337     [PIPELINE0]
338     type = MASTER
339     core = 0
340
341     [PIPELINE1]
342     type = ARPICMP
343     core = 0
344     pktq_in  = SWQ0
345     pktq_out = TXQ0.0 TXQ1.0
346     pktq_in_prv =  RXQ0.0
347     prv_to_pub_map = (0,1)
348     prv_que_handler = (0)
349
350     [PIPELINE2]
351     type = ACL
352     core = 1
353     pktq_in  = RXQ0.0 RXQ1.0
354     pktq_out = TXQ0.1 TXQ1.1 SWQ0
355     n_flows = 1000000
356     pkt_type = ipv4
357     traffic_type = 4
358
359
360