pkt_gen: Add IxNet support for GRE frames
[vswitchperf.git] / docs / userguide / integration.rst
1 Integration tests
2 =================
3
4 VSPERF includes a set of integration tests defined in conf/integration.
5 These tests can be run by specifying --run-integration as a parameter to vsperf.
6 Current tests in conf/integration are Overlay tests.
7
8
9 Executing Tunnel encapsulation tests
10 ------------------------------------
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 The VXLAN OVS DPDK encapsulation tests requires IPs, MAC addresses,
17 bridge names and WHITELIST_NICS for DPDK.
18
19 Default values are already provided. To customize for your environment, override
20 the following variables in you user_settings.py file:
21
22 # Variables defined in conf/integration/02_vswitch.conf
23 # Tunnel endpoint for Overlay P2P deployment scenario
24 # used for br0
25 VTEP_IP1 = '192.168.0.1/24'
26
27 # Used as remote_ip in adding OVS tunnel port and
28 # to set ARP entry in OVS (e.g. tnl/arp/set br-ext 192.168.240.10 02:00:00:00:00:02
29 VTEP_IP2 = '192.168.240.10'
30
31 # Network to use when adding a route for inner frame data
32 VTEP_IP2_SUBNET = '192.168.240.0/24'
33
34 # Bridge names
35 TUNNEL_INTEGRATION_BRIDGE = 'br0'
36 TUNNEL_EXTERNAL_BRIDGE = 'br-ext'
37
38 # IP of br-ext
39 TUNNEL_EXTERNAL_BRIDGE_IP = '192.168.240.1/24'
40
41 # vxlan|gre|geneve
42 TUNNEL_TYPE = 'vxlan'
43
44 # Variables defined conf/integration/03_traffic.conf
45 # For OP2P deployment scenario
46 TRAFFICGEN_PORT1_MAC = '02:00:00:00:00:01'
47 TRAFFICGEN_PORT2_MAC = '02:00:00:00:00:02'
48 TRAFFICGEN_PORT1_IP = '1.1.1.1'
49 TRAFFICGEN_PORT2_IP = '192.168.240.10'
50
51
52 To run VXLAN encapsulation tests:
53
54   .. code-block:: console
55
56      ./vsperf --conf-file user_settings.py --run-integration --test-param 'tunnel_type=vxlan' overlay_p2p_tput
57
58 To run GRE encapsulation tests:
59
60   .. code-block:: console
61
62      ./vsperf --conf-file user_settings.py --run-integration --test-param 'tunnel_type=gre' overlay_p2p_tput
63
64 To run GENEVE encapsulation tests:
65
66   .. code-block:: console
67
68      ./vsperf --conf-file user_settings.py --run-integration --test-param 'tunnel_type=geneve' overlay_p2p_tput
69
70 To run OVS NATIVE tunnel tests (VXLAN/GRE/GENEVE):
71
72 1. Install the OVS kernel modules
73
74   .. code:: console
75
76      cd src/ovs/ovs
77      sudo -E make modules_install
78
79 2. Set the following variables:
80
81   .. code-block:: console
82
83    VSWITCH = 'OvsVanilla'
84    VSWITCH_VANILLA_PHY_PORT_NAMES = ['nic1name', 'nic2name']
85    # Specify vport_* kernel module to test.
86    VSWITCH_VANILLA_KERNEL_MODULES = ['vport_vxlan',
87                                      'vport_gre',
88                                      'vport_geneve',
89                                      os.path.join(OVS_DIR_VANILLA, 'datapath/linux/openvswitch.ko')]
90
91 3. Run tests:
92
93   .. code-block:: console
94
95      ./vsperf --conf-file user_settings.py --run-integration --test-param 'tunnel_type=vxlan' overlay_p2p_tput
96
97
98 Executing VXLAN decapsulation tests
99 ------------------------------------
100
101 To run VXLAN decapsulation tests:
102
103 1. Set the variables used in "Executing Tunnel encapsulation tests"
104
105 2. Set IXNET_TCL_SCRIPT, VXLAN_FRAME_L2, VLXAN_FRAME_L3 and DUT_NIC1_MAC of your settings file to:
106
107   .. code-block:: console
108
109    IXNET_TCL_SCRIPT='ixnetrfc2544v2.tcl'
110
111    VXLAN_FRAME_L2 = {'srcmac':
112                      '01:02:03:04:05:06',
113                      'dstmac':
114                      '<DUT's NIC1 MAC>',
115                     }
116
117    VXLAN_FRAME_L3 = {'proto': 'udp',
118                      'packetsize': 64,
119                      'srcip': '1.1.1.1',
120                      'dstip': '192.168.240.1',
121                     }
122
123    VXLAN_FRAME_L4 = {'srcport': 4789,
124                      'dstport': 4789,
125                      'vni': VXLAN_VNI,
126                      'inner_srcmac': '01:02:03:04:05:06',
127                      'inner_dstmac': '06:05:04:03:02:01',
128                      'inner_srcip': '192.168.0.10',
129                      'inner_dstip': '192.168.240.9',
130                      'inner_proto': 'udp',
131                      'inner_srcport': 3000,
132                      'inner_dstport': 3001,
133                     }
134
135     # The receiving NIC of VXLAN traffic
136     DUT_NIC1_MAC = '<mac address>'
137
138 3. Run test:
139
140   .. code-block:: console
141
142      ./vsperf --conf-file user_settings.py --run-integration overlay_p2p_decap_cont
143
144 Executing GRE decapsulation tests
145 ---------------------------------
146
147 To run GRE decapsulation tests:
148
149 1. Set the variables used in "Executing Tunnel encapsulation tests"
150
151 2. Set IXNET_TCL_SCRIPT, GRE_FRAME_L2, GRE_FRAME_L3 and DUT_NIC1_MAC of your settings file to:
152
153   .. code-block:: console
154
155    IXNET_TCL_SCRIPT='ixnetrfc2544v2.tcl'
156
157    GRE_FRAME_L2 = {'srcmac':
158                    '01:02:03:04:05:06',
159                    'dstmac':
160                    '<DUT's NIC2 MAC>',
161                   }
162
163    GRE_FRAME_L3 = {'proto': 'gre',
164                    'packetsize': 64,
165                    'srcip': '1.1.1.1',
166                    'dstip': '192.168.240.1',
167                   }
168
169    GRE_FRAME_L4 = {'srcport': 0,
170                    'dstport': 0
171                    'inner_srcmac': '01:02:03:04:05:06',
172                    'inner_dstmac': '06:05:04:03:02:01',
173                    'inner_srcip': '192.168.0.10',
174                    'inner_dstip': '192.168.240.9',
175                    'inner_proto': 'udp',
176                    'inner_srcport': 3000,
177                    'inner_dstport': 3001,
178                   }
179
180     # The receiving NIC of GRE traffic
181     DUT_NIC1_MAC = '<mac address>'
182
183 3. Run test:
184
185   .. code-block:: console
186
187      ./vsperf --conf-file user_settings.py --test-param 'tunnel_type=gre' --run-integration overlay_p2p_decap_cont