1 # Copyright 2015 Intel Corporation.
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 # ############################
17 # ############################
19 VNF = 'QemuDpdkVhostUser'
21 # ############################
23 # ############################
25 # directory which is shared to QEMU guests. Useful for exchanging files
26 # between host and guest, VNF specific share will be created
27 # For 2 VNFs you may use ['/tmp/qemu0_share', '/tmp/qemu1_share']
28 GUEST_SHARE_DIR = ['/tmp/qemu0_share', '/tmp/qemu1_share', \
29 '/tmp/qemu2_share', '/tmp/qemu3_share', \
30 '/tmp/qemu4_share', '/tmp/qemu5_share']
32 # location of guest disk image
33 # For 2 VNFs you may use ['guest1.img', 'guest2.img']
34 GUEST_IMAGE = ['', '', '', '', '', '']
36 # guarding timer for VM start up
37 # For 2 VNFs you may use [180, 180]
38 GUEST_TIMEOUT = [180, 180, 180, 180, 180, 180]
40 # Guest images may require different drive types such as ide to mount shared
41 # locations and/or boot correctly. You can modify the types here.
42 GUEST_BOOT_DRIVE_TYPE = 'scsi'
43 GUEST_SHARED_DRIVE_TYPE = 'scsi'
45 # packet forwarding mode supported by testpmd; Please see DPDK documentation
46 # for comprehensive list of modes supported by your version.
47 # e.g. io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho|...
48 # Note: Option "mac_retry" has been changed to "mac retry" since DPDK v16.07
49 GUEST_TESTPMD_FWD_MODE = 'csum'
51 # guest loopback application method; supported options are:
52 # 'testpmd' - testpmd from dpdk will be built and used
53 # 'l2fwd' - l2fwd module provided by Huawei will be built and used
54 # 'linux_bridge' - linux bridge will be configured
55 # 'buildin' - nothing will be configured by vsperf; VM image must
56 # ensure traffic forwarding between its interfaces
57 # This configuration option can be overridden by CLI SCALAR option
58 # guest_loopback, e.g. --test-params "guest_loopback=l2fwd"
59 # For 2 VNFs you may use ['testpmd', 'l2fwd']
60 GUEST_LOOPBACK = ['testpmd', 'testpmd', \
61 'testpmd', 'testpmd', \
64 # username for guest image
65 GUEST_USERNAME = 'root'
67 # password for guest image
68 GUEST_PASSWORD = 'root'
70 # login username prompt for guest image
71 GUEST_PROMPT_LOGIN = '.* login:'
73 # login password prompt for guest image
74 GUEST_PROMPT_PASSWORD = 'Password: '
76 # standard prompt for guest image
77 GUEST_PROMPT = 'root.*#'
80 LOG_FILE_QEMU = 'qemu.log'
82 # log file for all commands executed on guest(s)
83 # multiple guests will result in log files with the guest number appended
84 LOG_FILE_GUEST_CMDS = 'guest-cmds.log'
86 # ############################
88 # ############################
90 QEMU_BIN = os.path.join(QEMU_DIR, 'x86_64-softmmu/qemu-system-x86_64')
92 # For 2 VNFs you may use ['eth0', 'eth2']
93 GUEST_NIC1_NAME = ['eth0', 'eth0', 'eth0', 'eth0', 'eth0', 'eth0']
94 GUEST_NIC2_NAME = ['eth1', 'eth1', 'eth1', 'eth1', 'eth1', 'eth1']
96 # For 2 VNFs you may use ['00:00:00:00:00:01', '00:00:00:00:00:03']
97 GUEST_NET1_MAC = ['00:00:00:00:00:01', '00:00:00:00:00:03', \
98 '00:00:00:00:00:05', '00:00:00:00:00:07', \
99 '00:00:00:00:00:09', '00:00:00:00:00:0b']
100 GUEST_NET2_MAC = ['00:00:00:00:00:02', '00:00:00:00:00:04', \
101 '00:00:00:00:00:06', '00:00:00:00:00:08', \
102 '00:00:00:00:00:0a', '00:00:00:00:00:0c']
104 # For 2 VNFs you may use ['00:04.0', '00:04.0']
105 GUEST_NET1_PCI_ADDRESS = ['00:04.0', '00:04.0', \
106 '00:04.0', '00:04.0', \
107 '00:04.0', '00:04.0']
108 GUEST_NET2_PCI_ADDRESS = ['00:05.0', '00:05.0', \
109 '00:05.0', '00:05.0', \
110 '00:05.0', '00:05.0']
112 GUEST_MEMORY = ['4096', '4096', '2048', '2048', '2048', '2048']
114 # test-pmd requires 2 VM cores
115 GUEST_SMP = ['2', '2', '2', '2', '2', '2']
117 # Host cores to use to affinitize the SMP cores of a QEMU instance
118 # For 2 VNFs you may use [(4,5), (6, 7)]
119 GUEST_CORE_BINDING = [(6, 7), (9, 10), (11, 12), (13, 14), (15, 16), (17, 18)]
121 # Queues per NIC inside guest for multi-queue configuration, requires switch
122 # multi-queue to be enabled. Set to 0 for disabled.
125 GUEST_START_TIMEOUT = 120
126 GUEST_OVS_DPDK_DIR = '/root/ovs_dpdk'
127 OVS_DPDK_SHARE = '/mnt/ovs_dpdk_share'
129 # Set the CPU mask for testpmd loopback. To bind to specific guest CPUs use -l
130 # GUEST_TESTPMD_CPU_MASK = '-l 0,1'
131 GUEST_TESTPMD_CPU_MASK = '-c 0x3'
133 # Testpmd multi-core config. Leave at 0's for disabled. Will not enable unless
134 # GUEST_NIC_QUEUES are > 0. For bi directional traffic NB_CORES must be equal
136 GUEST_TESTPMD_NB_CORES = 0
137 GUEST_TESTPMD_TXQ = 0
138 GUEST_TESTPMD_RXQ = 0
140 # IP addresses to use for Vanilla OVS PVP testing
141 # Consider using RFC 2544/3330 recommended IP addresses for benchmark testing.
142 # Network: 198.18.0.0/15
143 # Netmask: 255.254.0.0
144 # Broadcast: 198.19.255.255
145 # First IP: 198.18.0.1
146 # Last IP: 198.19.255.254
150 # ARP entries for the IXIA ports and the bridge you are using:
151 VANILLA_TGEN_PORT1_IP = '1.1.1.10'
152 VANILLA_TGEN_PORT1_MAC = 'AA:BB:CC:DD:EE:FF'
154 VANILLA_TGEN_PORT2_IP = '1.1.2.10'
155 VANILLA_TGEN_PORT2_MAC = 'AA:BB:CC:DD:EE:F0'
157 VANILLA_BRIDGE_IP = ['1.1.1.5/16', '1.1.1.6/16', \
158 '1.1.1.7/16', '1.1.1.8/16', \
159 '1.1.1.9/16', '1.1.1.10/16']
161 VANILLA_NIC1_IP_CIDR = ['192.168.1.2/24', '192.168.1.4/24', \
162 '192.168.1.6/24', '192.168.1.8/24', \
163 '192.168.1.10/24', '192.168.1.12/24']
164 VANILLA_NIC2_IP_CIDR = ['192.168.1.3/24', '192.168.1.5/24', \
165 '192.168.1.7/24', '192.168.1.9/24', \
166 '192.168.1.11/24', '192.168.1.13/24']
168 VNF_AFFINITIZATION_ON = True