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 # packet forwarding mode supported by testpmd; Please see DPDK documentation
41 # for comprehensive list of modes supported by your version.
42 # e.g. io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho|...
43 # Note: Option "mac_retry" has been changed to "mac retry" since DPDK v16.07
44 GUEST_TESTPMD_FWD_MODE = 'csum'
46 # guest loopback application method; supported options are:
47 # 'testpmd' - testpmd from dpdk will be built and used
48 # 'l2fwd' - l2fwd module provided by Huawei will be built and used
49 # 'linux_bridge' - linux bridge will be configured
50 # 'buildin' - nothing will be configured by vsperf; VM image must
51 # ensure traffic forwarding between its interfaces
52 # This configuration option can be overridden by CLI SCALAR option
53 # guest_loopback, e.g. --test-params "guest_loopback=l2fwd"
54 # For 2 VNFs you may use ['testpmd', 'l2fwd']
55 GUEST_LOOPBACK = ['testpmd', 'testpmd', \
56 'testpmd', 'testpmd', \
59 # username for guest image
60 GUEST_USERNAME = 'root'
62 # password for guest image
63 GUEST_PASSWORD = 'root'
65 # login username prompt for guest image
66 GUEST_PROMPT_LOGIN = '.* login:'
68 # login password prompt for guest image
69 GUEST_PROMPT_PASSWORD = 'Password: '
71 # standard prompt for guest image
72 GUEST_PROMPT = 'root.*#'
75 LOG_FILE_QEMU = 'qemu.log'
77 # log file for all commands executed on guest(s)
78 # multiple guests will result in log files with the guest number appended
79 LOG_FILE_GUEST_CMDS = 'guest-cmds.log'
81 # ############################
83 # ############################
85 QEMU_BIN = os.path.join(QEMU_DIR, 'x86_64-softmmu/qemu-system-x86_64')
87 # For 2 VNFs you may use ['eth0', 'eth2']
88 GUEST_NIC1_NAME = ['eth0', 'eth0', 'eth0', 'eth0', 'eth0', 'eth0']
89 GUEST_NIC2_NAME = ['eth1', 'eth1', 'eth1', 'eth1', 'eth1', 'eth1']
91 # For 2 VNFs you may use ['00:00:00:00:00:01', '00:00:00:00:00:03']
92 GUEST_NET1_MAC = ['00:00:00:00:00:01', '00:00:00:00:00:03', \
93 '00:00:00:00:00:05', '00:00:00:00:00:07', \
94 '00:00:00:00:00:09', '00:00:00:00:00:0b']
95 GUEST_NET2_MAC = ['00:00:00:00:00:02', '00:00:00:00:00:04', \
96 '00:00:00:00:00:06', '00:00:00:00:00:08', \
97 '00:00:00:00:00:0a', '00:00:00:00:00:0c']
99 # For 2 VNFs you may use ['00:04.0', '00:04.0']
100 GUEST_NET1_PCI_ADDRESS = ['00:04.0', '00:04.0', \
101 '00:04.0', '00:04.0', \
102 '00:04.0', '00:04.0']
103 GUEST_NET2_PCI_ADDRESS = ['00:05.0', '00:05.0', \
104 '00:05.0', '00:05.0', \
105 '00:05.0', '00:05.0']
107 GUEST_MEMORY = ['4096', '4096', '2048', '2048', '2048', '2048']
109 # test-pmd requires 2 VM cores
110 GUEST_SMP = ['2', '2', '2', '2', '2', '2']
112 # Host cores to use to affinitize the SMP cores of a QEMU instance
113 # For 2 VNFs you may use [(4,5), (6, 7)]
114 GUEST_CORE_BINDING = [(6, 7), (9, 10), (11, 12), (13, 14), (15, 16), (17, 18)]
116 # Queues per NIC inside guest for multi-queue configuration, requires switch
117 # multi-queue to be enabled. Set to 0 for disabled.
120 GUEST_START_TIMEOUT = 120
121 GUEST_OVS_DPDK_DIR = '/root/ovs_dpdk'
122 OVS_DPDK_SHARE = '/mnt/ovs_dpdk_share'
124 # Set the CPU mask for testpmd loopback. To bind to specific guest CPUs use -l
125 # GUEST_TESTPMD_CPU_MASK = '-l 0,1'
126 GUEST_TESTPMD_CPU_MASK = '-c 0x3'
128 # Testpmd multi-core config. Leave at 0's for disabled. Will not enable unless
129 # GUEST_NIC_QUEUES are > 0. For bi directional traffic NB_CORES must be equal
131 GUEST_TESTPMD_NB_CORES = 0
132 GUEST_TESTPMD_TXQ = 0
133 GUEST_TESTPMD_RXQ = 0
135 # IP addresses to use for Vanilla OVS PVP testing
136 # Consider using RFC 2544/3330 recommended IP addresses for benchmark testing.
137 # Network: 198.18.0.0/15
138 # Netmask: 255.254.0.0
139 # Broadcast: 198.19.255.255
140 # First IP: 198.18.0.1
141 # Last IP: 198.19.255.254
145 # ARP entries for the IXIA ports and the bridge you are using:
146 VANILLA_TGEN_PORT1_IP = '1.1.1.10'
147 VANILLA_TGEN_PORT1_MAC = 'AA:BB:CC:DD:EE:FF'
149 VANILLA_TGEN_PORT2_IP = '1.1.2.10'
150 VANILLA_TGEN_PORT2_MAC = 'AA:BB:CC:DD:EE:F0'
152 VANILLA_BRIDGE_IP = ['1.1.1.5/16', '1.1.1.6/16', \
153 '1.1.1.7/16', '1.1.1.8/16', \
154 '1.1.1.9/16', '1.1.1.10/16']
156 VANILLA_NIC1_IP_CIDR = ['192.168.1.2/24', '192.168.1.4/24', \
157 '192.168.1.6/24', '192.168.1.8/24', \
158 '192.168.1.10/24', '192.168.1.12/24']
159 VANILLA_NIC2_IP_CIDR = ['192.168.1.3/24', '192.168.1.5/24', \
160 '192.168.1.7/24', '192.168.1.9/24', \
161 '192.168.1.11/24', '192.168.1.13/24']
163 VNF_AFFINITIZATION_ON = True