Merge "xena_cont_accuracy_fix: Xena continuous traffic accuracy fixes"
[vswitchperf.git] / conf / 04_vnf.conf
1 # Copyright 2015-2016 Intel Corporation.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #   http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 # ############################
16 # VNF configuration
17 # ############################
18 VNF_DIR = os.path.join(ROOT_DIR, 'vnfs/')
19 VNF = 'QemuDpdkVhostUser'
20 VNF_AFFINITIZATION_ON = True
21
22 # ############################
23 # Directories, executables and log files
24 # ############################
25
26 # please see conf/00_common.conf for description of PATHS dictionary
27 PATHS['qemu'] = {
28     'type' : 'src',
29     'src': {
30         'path': os.path.join(ROOT_DIR, 'src/qemu/qemu/'),
31         'qemu-system': 'x86_64-softmmu/qemu-system-x86_64'
32     },
33     'bin': {
34         'qemu-system': 'qemu-system-x86_64'
35     }
36 }
37
38 # log file for qemu
39 LOG_FILE_QEMU = 'qemu.log'
40
41 # log file for all commands executed on guest(s)
42 # multiple guests will result in log files with the guest number appended
43 LOG_FILE_GUEST_CMDS = 'guest-cmds.log'
44
45 # ############################
46 # Guest configuration
47 # ############################
48 # All configuration options related to a particular VM instance are defined as
49 # lists and prefixed with `GUEST_` label. It is essential, that there is enough
50 # items in all `GUEST_` options to cover all VM instances involved in the test.
51 # In case there is not enough items, then VSPERF will use the first item of
52 # particular `GUEST_` option to expand the list to required length. First option
53 # can contain macros starting with `#` to generate VM specific values. These
54 # macros can be used only for options of `list` or `str` types with `GUEST_`
55 # prefix.
56 # Following macros are supported:
57 #
58 # * #VMINDEX - it is replaced by index of VM being executed; This macro is
59 #   expanded first, so it can be used inside other macros.
60 #
61 # * #MAC(mac_address[, step]) - it will iterate given `mac_address` with
62 #   optional `step`. In case that step is not defined, then it is set to 1.
63 #   It means, that first VM will use the value of `mac_address`, second VM
64 #   value of `mac_address` increased by `step`, etc.
65 #
66 # * #IP(ip_address[, step]) - it will iterate given `ip_address` with optional
67 #   step. In case that step is not defined, then it is set to 1.
68 #   It means, that first VM will use the value of `ip_address`, second VM
69 #   value of `ip_address` increased by `step`, etc.
70 #
71 # * #EVAL(expression) - it will evaluate given `expression` as python code;
72 #   Only simple expressions should be used. Call of the functions is not
73 #   supported.
74
75 # directory which is shared to QEMU guests. Useful for exchanging files
76 # between host and guest, VNF specific share will be created
77 # For 2 VNFs you may use ['/tmp/qemu0_share', '/tmp/qemu1_share']
78 GUEST_SHARE_DIR = ['/tmp/qemu0_share']
79
80 # location of guest disk image
81 # For 2 VNFs you may use ['guest1.img', 'guest2.img']
82 GUEST_IMAGE = ['']
83
84 # guarding timer for VM start up
85 # For 2 VNFs you may use [180, 180]
86 GUEST_TIMEOUT = [180]
87
88 # Guest images may require different drive types such as ide to mount shared
89 # locations and/or boot correctly. You can modify the types here.
90 GUEST_BOOT_DRIVE_TYPE = ['scsi']
91 GUEST_SHARED_DRIVE_TYPE = ['scsi']
92
93 # guest loopback application method; supported options are:
94 #       'testpmd'       - testpmd from dpdk will be built and used
95 #       'l2fwd'         - l2fwd module provided by Huawei will be built and used
96 #       'linux_bridge'  - linux bridge will be configured
97 #       'buildin'       - nothing will be configured by vsperf; VM image must
98 #                         ensure traffic forwarding between its interfaces
99 # For 2 VNFs you may use ['testpmd', 'l2fwd']
100 GUEST_LOOPBACK = ['testpmd']
101
102 # guest driver binding option; support options are:
103 #       'igb_uio_from_src'  - build igb_uio driver from downloaded source files
104 #       'uio_pci_generic'   - use uio_pci_generic driver
105 #       'vfio_no_iommu'     - use unsafe vfio driver without iommu (requires
106 #                             image with supported kernel 4.5 or greater and
107 #                             dpdk 16.04 or greater. VSPerf vloop image does not
108 #                             support this mode.
109 GUEST_DPDK_BIND_DRIVER = ['igb_uio_from_src']
110
111 # username for guest image
112 GUEST_USERNAME = ['root']
113
114 # password for guest image
115 GUEST_PASSWORD = ['root']
116
117 # login username prompt for guest image
118 GUEST_PROMPT_LOGIN = ['.* login:']
119
120 # login password prompt for guest image
121 GUEST_PROMPT_PASSWORD = ['Password: ']
122
123 # standard prompt for guest image
124 GUEST_PROMPT = ['root.*#']
125
126 # defines the number of NICs configured for each guest, it must be less or equal to
127 # the number of NICs configured in GUEST_NICS
128 GUEST_NICS_NR = [2]
129
130 # template for guests with 4 NICS, but only GUEST_NICS_NR NICS will be configured at runtime
131 GUEST_NICS = [[{'device' : 'eth0', 'mac' : '#MAC(00:00:00:00:00:01,2)', 'pci' : '00:04.0', 'ip' : '#IP(192.168.1.2,4)/24'},
132                {'device' : 'eth1', 'mac' : '#MAC(00:00:00:00:00:02,2)', 'pci' : '00:05.0', 'ip' : '#IP(192.168.1.3,4)/24'},
133                {'device' : 'eth2', 'mac' : '#MAC(cc:00:00:00:00:01,2)', 'pci' : '00:06.0', 'ip' : '#IP(192.168.1.4,4)/24'},
134                {'device' : 'eth3', 'mac' : '#MAC(cc:00:00:00:00:02,2)', 'pci' : '00:07.0', 'ip' : '#IP(192.168.1.5,4)/24'},
135              ]]
136
137 # amount of host memory allocated for each guest
138 GUEST_MEMORY = ['2048']
139 # number of hugepages configured inside each guest
140 GUEST_HUGEPAGES_NR = ['1024']
141
142 # test-pmd requires 2 VM cores
143 GUEST_SMP = ['2']
144
145 # Host cores to use to affinitize the SMP cores of a QEMU instance
146 # For 2 VNFs you may use [(4,5), (6, 7)]
147 GUEST_CORE_BINDING = [('#EVAL(6+2*#VMINDEX)', '#EVAL(7+2*#VMINDEX)')]
148
149 # Queues per NIC inside guest for multi-queue configuration, requires switch
150 # multi-queue to be enabled for dpdk. Set to 0 for disabled. Can be enabled if
151 # using Vanilla OVS without enabling switch multi-queue.
152 GUEST_NIC_QUEUES = [0]
153
154 # Disable VHost user guest NIC merge buffers by enabling the below setting. This
155 # can improve performance when not using Jumbo Frames.
156 GUEST_NIC_MERGE_BUFFERS_DISABLE = [True]
157
158 # Virtio-Net vhost thread CPU mapping. If using  vanilla OVS with virtio-net,
159 # you can affinitize the vhost-net threads by enabling the below setting. There
160 # is one vhost-net thread per port per queue so one guest with 2 queues will
161 # have 4 vhost-net threads. If more threads are present than CPUs given, the
162 # affinitize will overlap CPUs in a round robin fashion.
163 VSWITCH_VHOST_NET_AFFINITIZATION = False
164 VSWITCH_VHOST_CPU_MAP = [4,5,8,11]
165
166 GUEST_START_TIMEOUT = [120]
167 GUEST_OVS_DPDK_DIR = ['/root/ovs_dpdk']
168 GUEST_OVS_DPDK_SHARE = ['/mnt/ovs_dpdk_share']
169
170 # IP addresses to use for Vanilla OVS PXP testing
171 # Consider using RFC 2544/3330 recommended IP addresses for benchmark testing.
172 # Network: 198.18.0.0/15
173 # Netmask: 255.254.0.0
174 # Broadcast: 198.19.255.255
175 # First IP: 198.18.0.1
176 # Last IP: 198.19.255.254
177 # Hosts: 131070
178 #
179
180 # ARP entries for the IXIA ports and the bridge you are using:
181 VANILLA_TGEN_PORT1_IP = '1.1.1.10'
182 VANILLA_TGEN_PORT1_MAC = 'AA:BB:CC:DD:EE:FF'
183
184 VANILLA_TGEN_PORT2_IP = '1.1.2.10'
185 VANILLA_TGEN_PORT2_MAC = 'AA:BB:CC:DD:EE:F0'
186
187 GUEST_BRIDGE_IP = ['#IP(1.1.1.5)/16']
188
189 # ############################
190 # Guest TESTPMD configuration
191 # ############################
192
193 # set of configuration parameters, which will be passed to the testpmd
194 # executed inside the guest
195 # Note: Testpmd must be executed in interactive mode. It means, that
196 # VSPERF won't work correctly if '-i' will be removed.
197 GUEST_TESTPMD_PARAMS = ['-c 0x3 -n 4 --socket-mem 512 -- '
198                         '--burst=64 -i --txqflags=0xf00 '
199                         '--disable-hw-vlan']
200
201 # packet forwarding mode supported by testpmd; Please see DPDK documentation
202 # for comprehensive list of modes supported by your version.
203 # e.g. io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho|...
204 # Note: Option "mac_retry" has been changed to "mac retry" since DPDK v16.07
205 GUEST_TESTPMD_FWD_MODE = ['csum']