sriov: Support of SRIOV and Qemu PCI passthrough
[vswitchperf.git] / docs / userguide / integration.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. (c) OPNFV, Intel Corporation, AT&T and others.
4
5 Integration tests
6 =================
7
8 VSPERF includes a set of integration tests defined in conf/integration.
9 These tests can be run by specifying --integration as a parameter to vsperf.
10 Current tests in conf/integration are Overlay tests.
11
12 VSPERF supports VXLAN, GRE and GENEVE tunneling protocols.
13 Testing of these protocols is limited to unidirectional traffic and
14 P2P (Physical to Physical scenarios).
15
16 NOTE: The configuration for overlay tests provided in this guide is for unidirectional traffic only.
17
18 Executing Tunnel encapsulation tests
19 ------------------------------------
20
21 The VXLAN OVS DPDK encapsulation tests requires IPs, MAC addresses,
22 bridge names and WHITELIST_NICS for DPDK.
23
24 Default values are already provided. To customize for your environment, override
25 the following variables in you user_settings.py file:
26
27   .. code-block:: python
28
29     # Variables defined in conf/integration/02_vswitch.conf
30     # Tunnel endpoint for Overlay P2P deployment scenario
31     # used for br0
32     VTEP_IP1 = '192.168.0.1/24'
33
34     # Used as remote_ip in adding OVS tunnel port and
35     # to set ARP entry in OVS (e.g. tnl/arp/set br-ext 192.168.240.10 02:00:00:00:00:02
36     VTEP_IP2 = '192.168.240.10'
37
38     # Network to use when adding a route for inner frame data
39     VTEP_IP2_SUBNET = '192.168.240.0/24'
40
41     # Bridge names
42     TUNNEL_INTEGRATION_BRIDGE = 'br0'
43     TUNNEL_EXTERNAL_BRIDGE = 'br-ext'
44
45     # IP of br-ext
46     TUNNEL_EXTERNAL_BRIDGE_IP = '192.168.240.1/24'
47
48     # vxlan|gre|geneve
49     TUNNEL_TYPE = 'vxlan'
50
51     # Variables defined conf/integration/03_traffic.conf
52     # For OP2P deployment scenario
53     TRAFFICGEN_PORT1_MAC = '02:00:00:00:00:01'
54     TRAFFICGEN_PORT2_MAC = '02:00:00:00:00:02'
55     TRAFFICGEN_PORT1_IP = '1.1.1.1'
56     TRAFFICGEN_PORT2_IP = '192.168.240.10'
57
58 To run VXLAN encapsulation tests:
59
60   .. code-block:: console
61
62     ./vsperf --conf-file user_settings.py --integration
63              --test-params 'tunnel_type=vxlan' overlay_p2p_tput
64
65 To run GRE encapsulation tests:
66
67   .. code-block:: console
68
69     ./vsperf --conf-file user_settings.py --integration
70              --test-params 'tunnel_type=gre' overlay_p2p_tput
71
72 To run GENEVE encapsulation tests:
73
74   .. code-block:: console
75
76     ./vsperf --conf-file user_settings.py --integration
77              --test-params 'tunnel_type=geneve' overlay_p2p_tput
78
79 To run OVS NATIVE tunnel tests (VXLAN/GRE/GENEVE):
80
81 1. Install the OVS kernel modules
82
83   .. code:: console
84
85     cd src/ovs/ovs
86     sudo -E make modules_install
87
88 2. Set the following variables:
89
90   .. code-block:: python
91
92     VSWITCH = 'OvsVanilla'
93     # Specify vport_* kernel module to test.
94     VSWITCH_VANILLA_KERNEL_MODULES = ['vport_vxlan',
95                                       'vport_gre',
96                                       'vport_geneve',
97                                       os.path.join(OVS_DIR_VANILLA,
98                                       'datapath/linux/openvswitch.ko')]
99
100 3. Run tests:
101
102   .. code-block:: console
103
104     ./vsperf --conf-file user_settings.py --integration
105              --test-params 'tunnel_type=vxlan' overlay_p2p_tput
106
107
108 Executing VXLAN decapsulation tests
109 ------------------------------------
110
111 To run VXLAN decapsulation tests:
112
113 1. Set the variables used in "Executing Tunnel encapsulation tests"
114
115 2. Set dstmac of DUT_NIC2_MAC to the MAC adddress of the 2nd NIC of your DUT
116
117   .. code-block:: python
118
119     DUT_NIC2_MAC = '<DUT NIC2 MAC>'
120
121 3. Run test:
122
123   .. code-block:: console
124
125     ./vsperf --conf-file user_settings.py --integration overlay_p2p_decap_cont
126
127 If you want to use different values for your VXLAN frame, you may set:
128
129   .. code-block:: python
130
131     VXLAN_FRAME_L3 = {'proto': 'udp',
132                       'packetsize': 64,
133                       'srcip': TRAFFICGEN_PORT1_IP,
134                       'dstip': '192.168.240.1',
135                      }
136     VXLAN_FRAME_L4 = {'srcport': 4789,
137                       'dstport': 4789,
138                       'vni': VXLAN_VNI,
139                       'inner_srcmac': '01:02:03:04:05:06',
140                       'inner_dstmac': '06:05:04:03:02:01',
141                       'inner_srcip': '192.168.0.10',
142                       'inner_dstip': '192.168.240.9',
143                       'inner_proto': 'udp',
144                       'inner_srcport': 3000,
145                       'inner_dstport': 3001,
146                      }
147
148
149 Executing GRE decapsulation tests
150 ---------------------------------
151
152 To run GRE decapsulation tests:
153
154 1. Set the variables used in "Executing Tunnel encapsulation tests"
155
156 2. Set dstmac of DUT_NIC2_MAC to the MAC adddress of the 2nd NIC of your DUT
157
158   .. code-block:: python
159
160     DUT_NIC2_MAC = '<DUT NIC2 MAC>'
161
162 3. Run test:
163
164   .. code-block:: console
165
166     ./vsperf --conf-file user_settings.py --test-params 'tunnel_type=gre'
167              --integration overlay_p2p_decap_cont
168
169
170 If you want to use different values for your GRE frame, you may set:
171
172   .. code-block:: python
173
174     GRE_FRAME_L3 = {'proto': 'gre',
175                     'packetsize': 64,
176                     'srcip': TRAFFICGEN_PORT1_IP,
177                     'dstip': '192.168.240.1',
178                    }
179
180     GRE_FRAME_L4 = {'srcport': 0,
181                     'dstport': 0
182                     'inner_srcmac': '01:02:03:04:05:06',
183                     'inner_dstmac': '06:05:04:03:02:01',
184                     'inner_srcip': '192.168.0.10',
185                     'inner_dstip': '192.168.240.9',
186                     'inner_proto': 'udp',
187                     'inner_srcport': 3000,
188                     'inner_dstport': 3001,
189                    }
190
191
192 Executing GENEVE decapsulation tests
193 ------------------------------------
194
195 IxNet 7.3X does not have native support of GENEVE protocol. The
196 template, GeneveIxNetTemplate.xml_ClearText.xml, should be imported
197 into IxNET for this testcase to work.
198
199 To import the template do:
200
201 1. Run the IxNetwork TCL Server
202 2. Click on the Traffic menu
203 3. Click on the Traffic actions and click Edit Packet Templates
204 4. On the Template editor window, click Import. Select the template
205    tools/pkt_gen/ixnet/GeneveIxNetTemplate.xml_ClearText.xml
206    and click import.
207 5. Restart the TCL Server.
208
209 To run GENEVE decapsulation tests:
210
211 1. Set the variables used in "Executing Tunnel encapsulation tests"
212
213 2. Set dstmac of DUT_NIC2_MAC to the MAC adddress of the 2nd NIC of your DUT
214
215   .. code-block:: python
216
217     DUT_NIC2_MAC = '<DUT NIC2 MAC>'
218
219 3. Run test:
220
221   .. code-block:: console
222
223     ./vsperf --conf-file user_settings.py --test-params 'tunnel_type=geneve'
224              --integration overlay_p2p_decap_cont
225
226
227 If you want to use different values for your GENEVE frame, you may set:
228
229   .. code-block:: python
230
231     GENEVE_FRAME_L3 = {'proto': 'udp',
232                        'packetsize': 64,
233                        'srcip': TRAFFICGEN_PORT1_IP,
234                        'dstip': '192.168.240.1',
235                       }
236
237     GENEVE_FRAME_L4 = {'srcport': 6081,
238                        'dstport': 6081,
239                        'geneve_vni': 0,
240                        'inner_srcmac': '01:02:03:04:05:06',
241                        'inner_dstmac': '06:05:04:03:02:01',
242                        'inner_srcip': '192.168.0.10',
243                        'inner_dstip': '192.168.240.9',
244                        'inner_proto': 'udp',
245                        'inner_srcport': 3000,
246                        'inner_dstport': 3001,
247                       }
248
249
250 Executing Native/Vanilla OVS VXLAN decapsulation tests
251 ------------------------------------------------------
252
253 To run VXLAN decapsulation tests:
254
255 1. Set the following variables in your user_settings.py file:
256
257   .. code-block:: python
258
259     VSWITCH_VANILLA_KERNEL_MODULES = ['vport_vxlan',
260                                       os.path.join(OVS_DIR_VANILLA,
261                                       'datapath/linux/openvswitch.ko')]
262
263     DUT_NIC1_MAC = '<DUT NIC1 MAC ADDRESS>'
264
265     TRAFFICGEN_PORT1_IP = '172.16.1.2'
266     TRAFFICGEN_PORT2_IP = '192.168.1.11'
267
268     VTEP_IP1 = '172.16.1.2/24'
269     VTEP_IP2 = '192.168.1.1'
270     VTEP_IP2_SUBNET = '192.168.1.0/24'
271     TUNNEL_EXTERNAL_BRIDGE_IP = '172.16.1.1/24'
272     TUNNEL_INT_BRIDGE_IP = '192.168.1.1'
273
274     VXLAN_FRAME_L2 = {'srcmac':
275                       '01:02:03:04:05:06',
276                       'dstmac': DUT_NIC1_MAC
277                      }
278
279     VXLAN_FRAME_L3 = {'proto': 'udp',
280                       'packetsize': 64,
281                       'srcip': TRAFFICGEN_PORT1_IP,
282                       'dstip': '172.16.1.1',
283                      }
284
285     VXLAN_FRAME_L4 = {
286                       'srcport': 4789,
287                       'dstport': 4789,
288                       'protocolpad': 'true',
289                       'vni': 99,
290                       'inner_srcmac': '01:02:03:04:05:06',
291                       'inner_dstmac': '06:05:04:03:02:01',
292                       'inner_srcip': '192.168.1.2',
293                       'inner_dstip': TRAFFICGEN_PORT2_IP,
294                       'inner_proto': 'udp',
295                       'inner_srcport': 3000,
296                       'inner_dstport': 3001,
297                      }
298
299 2. Run test:
300
301   .. code-block:: console
302
303     ./vsperf --conf-file user_settings.py --integration
304              --test-params 'tunnel_type=vxlan' overlay_p2p_decap_cont
305
306 Executing Native/Vanilla OVS GRE decapsulation tests
307 ----------------------------------------------------
308
309 To run GRE decapsulation tests:
310
311 1. Set the following variables in your user_settings.py file:
312
313   .. code-block:: python
314
315     VSWITCH_VANILLA_KERNEL_MODULES = ['vport_gre',
316                                       os.path.join(OVS_DIR_VANILLA,
317                                       'datapath/linux/openvswitch.ko')]
318
319     DUT_NIC1_MAC = '<DUT NIC1 MAC ADDRESS>'
320
321     TRAFFICGEN_PORT1_IP = '172.16.1.2'
322     TRAFFICGEN_PORT2_IP = '192.168.1.11'
323
324     VTEP_IP1 = '172.16.1.2/24'
325     VTEP_IP2 = '192.168.1.1'
326     VTEP_IP2_SUBNET = '192.168.1.0/24'
327     TUNNEL_EXTERNAL_BRIDGE_IP = '172.16.1.1/24'
328     TUNNEL_INT_BRIDGE_IP = '192.168.1.1'
329
330     GRE_FRAME_L2 = {'srcmac':
331                     '01:02:03:04:05:06',
332                     'dstmac': DUT_NIC1_MAC
333                    }
334
335     GRE_FRAME_L3 = {'proto': 'udp',
336                     'packetsize': 64,
337                     'srcip': TRAFFICGEN_PORT1_IP,
338                     'dstip': '172.16.1.1',
339                    }
340
341     GRE_FRAME_L4 = {
342                     'srcport': 4789,
343                     'dstport': 4789,
344                     'protocolpad': 'true',
345                     'inner_srcmac': '01:02:03:04:05:06',
346                     'inner_dstmac': '06:05:04:03:02:01',
347                     'inner_srcip': '192.168.1.2',
348                     'inner_dstip': TRAFFICGEN_PORT2_IP,
349                     'inner_proto': 'udp',
350                     'inner_srcport': 3000,
351                     'inner_dstport': 3001,
352                    }
353
354 2. Run test:
355
356   .. code-block:: console
357
358     ./vsperf --conf-file user_settings.py --integration
359              --test-params 'tunnel_type=gre' overlay_p2p_decap_cont
360
361 Executing Native/Vanilla OVS GENEVE decapsulation tests
362 -------------------------------------------------------
363
364 To run GENEVE decapsulation tests:
365
366 1. Set the following variables in your user_settings.py file:
367
368   .. code-block:: python
369
370     VSWITCH_VANILLA_KERNEL_MODULES = ['vport_geneve',
371                                       os.path.join(OVS_DIR_VANILLA,
372                                       'datapath/linux/openvswitch.ko')]
373
374     DUT_NIC1_MAC = '<DUT NIC1 MAC ADDRESS>'
375
376     TRAFFICGEN_PORT1_IP = '172.16.1.2'
377     TRAFFICGEN_PORT2_IP = '192.168.1.11'
378
379     VTEP_IP1 = '172.16.1.2/24'
380     VTEP_IP2 = '192.168.1.1'
381     VTEP_IP2_SUBNET = '192.168.1.0/24'
382     TUNNEL_EXTERNAL_BRIDGE_IP = '172.16.1.1/24'
383     TUNNEL_INT_BRIDGE_IP = '192.168.1.1'
384
385     GENEVE_FRAME_L2 = {'srcmac':
386                        '01:02:03:04:05:06',
387                        'dstmac': DUT_NIC1_MAC
388                       }
389
390     GENEVE_FRAME_L3 = {'proto': 'udp',
391                        'packetsize': 64,
392                        'srcip': TRAFFICGEN_PORT1_IP,
393                        'dstip': '172.16.1.1',
394                       }
395
396     GENEVE_FRAME_L4 = {'srcport': 6081,
397                        'dstport': 6081,
398                        'protocolpad': 'true',
399                        'geneve_vni': 0,
400                        'inner_srcmac': '01:02:03:04:05:06',
401                        'inner_dstmac': '06:05:04:03:02:01',
402                        'inner_srcip': '192.168.1.2',
403                        'inner_dstip': TRAFFICGEN_PORT2_IP,
404                        'inner_proto': 'udp',
405                        'inner_srcport': 3000,
406                        'inner_dstport': 3001,
407                       }
408
409 2. Run test:
410
411   .. code-block:: console
412
413     ./vsperf --conf-file user_settings.py --integration
414              --test-params 'tunnel_type=geneve' overlay_p2p_decap_cont
415