Vanilla_Multi_Queue: Add vanilla ovs multi-queue functionality
[vswitchperf.git] / conf / 04_vnf.conf
1 # Copyright 2015 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 = 'vnfs/'
19 VNF = 'QemuDpdkVhostUser'
20
21 # ############################
22 # Guest configuration
23 # ############################
24
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']
31
32 # location of guest disk image
33 # For 2 VNFs you may use ['guest1.img', 'guest2.img']
34 GUEST_IMAGE = ['', '', '', '', '', '']
35
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]
39
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'
44
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'
50
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', \
62                   'testpmd', 'testpmd']
63
64 # username for guest image
65 GUEST_USERNAME = 'root'
66
67 # password for guest image
68 GUEST_PASSWORD = 'root'
69
70 # login username prompt for guest image
71 GUEST_PROMPT_LOGIN = '.* login:'
72
73 # login password prompt for guest image
74 GUEST_PROMPT_PASSWORD = 'Password: '
75
76 # standard prompt for guest image
77 GUEST_PROMPT = 'root.*#'
78
79 # log file for qemu
80 LOG_FILE_QEMU = 'qemu.log'
81
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'
85
86 # ############################
87 # Executables
88 # ############################
89
90 QEMU_BIN = os.path.join(QEMU_DIR, 'x86_64-softmmu/qemu-system-x86_64')
91
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']
95
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']
103
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']
111
112 GUEST_MEMORY = ['4096', '4096', '2048', '2048', '2048', '2048']
113
114 # test-pmd requires 2 VM cores
115 GUEST_SMP = ['2', '2', '2', '2', '2', '2']
116
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)]
120
121 # Queues per NIC inside guest for multi-queue configuration, requires switch
122 # multi-queue to be enabled for dpdk. Set to 0 for disabled. Can be enabled if
123 # using Vanilla OVS without enabling switch multi-queue.
124 GUEST_NIC_QUEUES = 0
125
126 # Virtio-Net vhost thread CPU mapping. If using  vanilla OVS with virtio-net,
127 # you can affinitize the vhost-net threads by enabling the below setting. There
128 # is one vhost-net thread per port per queue so one guest with 2 queues will
129 # have 4 vhost-net threads. If more threads are present than CPUs given, the
130 # affinitize will overlap CPUs.
131 VSWITCH_VHOST_NET_AFFINITIZATION = False
132 VSWITCH_VHOST_CPU_MAP = [4,5,8,11]
133
134 GUEST_START_TIMEOUT = 120
135 GUEST_OVS_DPDK_DIR = '/root/ovs_dpdk'
136 OVS_DPDK_SHARE = '/mnt/ovs_dpdk_share'
137
138 # Set the CPU mask for testpmd loopback. To bind to specific guest CPUs use -l
139 # GUEST_TESTPMD_CPU_MASK = '-l 0,1'
140 GUEST_TESTPMD_CPU_MASK = '-c 0x3'
141
142 # Testpmd multi-core config. Leave at 0's for disabled. Will not enable unless
143 # GUEST_NIC_QUEUES are > 0. For bi directional traffic NB_CORES must be equal
144 # to (RXQ + TXQ).
145 GUEST_TESTPMD_NB_CORES = 0
146 GUEST_TESTPMD_TXQ = 0
147 GUEST_TESTPMD_RXQ = 0
148
149 # IP addresses to use for Vanilla OVS PVP testing
150 # Consider using RFC 2544/3330 recommended IP addresses for benchmark testing.
151 # Network: 198.18.0.0/15
152 # Netmask: 255.254.0.0
153 # Broadcast: 198.19.255.255
154 # First IP: 198.18.0.1
155 # Last IP: 198.19.255.254
156 # Hosts: 131070
157 #
158
159 # ARP entries for the IXIA ports and the bridge you are using:
160 VANILLA_TGEN_PORT1_IP = '1.1.1.10'
161 VANILLA_TGEN_PORT1_MAC = 'AA:BB:CC:DD:EE:FF'
162
163 VANILLA_TGEN_PORT2_IP = '1.1.2.10'
164 VANILLA_TGEN_PORT2_MAC = 'AA:BB:CC:DD:EE:F0'
165
166 VANILLA_BRIDGE_IP = ['1.1.1.5/16', '1.1.1.6/16', \
167                      '1.1.1.7/16', '1.1.1.8/16', \
168                      '1.1.1.9/16', '1.1.1.10/16']
169
170 VANILLA_NIC1_IP_CIDR = ['192.168.1.2/24', '192.168.1.4/24', \
171                         '192.168.1.6/24', '192.168.1.8/24', \
172                         '192.168.1.10/24', '192.168.1.12/24']
173 VANILLA_NIC2_IP_CIDR = ['192.168.1.3/24', '192.168.1.5/24', \
174                         '192.168.1.7/24', '192.168.1.9/24', \
175                         '192.168.1.11/24', '192.168.1.13/24']
176
177 VNF_AFFINITIZATION_ON = True