summaryrefslogtreecommitdiffstats
path: root/conf/04_vnf.conf
blob: eafec74badfbff7e987f8b6315300286cf767067 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sa { color: #e6db74 } /* Literal.String.Affix */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #a6e22e } /* Name.Function.Magic */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
}
@media (prefers-color-scheme: light) {
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f
# Copyright 2015-2016 Intel Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# ############################
# VNF configuration
# ############################
VNF_DIR = os.path.join(ROOT_DIR, 'vnfs/')
VNF = 'QemuDpdkVhostUser'
VNF_AFFINITIZATION_ON = True

# ############################
# Directories, executables and log files
# ############################

# please see conf/00_common.conf for description of PATHS dictionary
PATHS['qemu'] = {
    'type' : 'src',
    'src': {
        'path': os.path.join(ROOT_DIR, 'src/qemu/qemu/'),
        'qemu-system': 'x86_64-softmmu/qemu-system-x86_64'
    },
    'bin': {
        'qemu-system': 'qemu-system-x86_64'
    }
}

# log file for qemu
LOG_FILE_QEMU = 'qemu.log'

# log file for all commands executed on guest(s)
# multiple guests will result in log files with the guest number appended
LOG_FILE_GUEST_CMDS = 'guest-cmds.log'

# ############################
# Guest configuration
# ############################
# All configuration options related to a particular VM instance are defined as
# lists and prefixed with `GUEST_` label. It is essential, that there is enough
# items in all `GUEST_` options to cover all VM instances involved in the test.
# In case there is not enough items, then VSPERF will use the first item of
# particular `GUEST_` option to expand the list to required length. First option
# can contain macros starting with `#` to generate VM specific values. These
# macros can be used only for options of `list` or `str` types with `GUEST_`
# prefix.
# Following macros are supported:
#
# * #VMINDEX - it is replaced by index of VM being executed; This macro is
#   expanded first, so it can be used inside other macros.
#
# * #MAC(mac_address[, step]) - it will iterate given `mac_address` with
#   optional `step`. In case that step is not defined, then it is set to 1.
#   It means, that first VM will use the value of `mac_address`, second VM
#   value of `mac_address` increased by `step`, etc.
#
# * #IP(ip_address[, step]) - it will iterate given `ip_address` with optional
#   step. In case that step is not defined, then it is set to 1.
#   It means, that first VM will use the value of `ip_address`, second VM
#   value of `ip_address` increased by `step`, etc.
#
# * #EVAL(expression) - it will evaluate given `expression` as python code;
#   Only simple expressions should be used. Call of the functions is not
#   supported.

# directory which is shared to QEMU guests. Useful for exchanging files
# between host and guest, VNF specific share will be created
# For 2 VNFs you may use ['/tmp/qemu0_share', '/tmp/qemu1_share']
GUEST_SHARE_DIR = ['/tmp/qemu0_share']

# location of guest disk image
# For 2 VNFs you may use ['guest1.img', 'guest2.img']
GUEST_IMAGE = ['']

# guarding timer for VM start up
# For 2 VNFs you may use [180, 180]
GUEST_TIMEOUT = [180]

# Guest images may require different drive types such as ide to mount shared
# locations and/or boot correctly. You can modify the types here.
GUEST_BOOT_DRIVE_TYPE = ['scsi']
GUEST_SHARED_DRIVE_TYPE = ['scsi']

# guest loopback application method; supported options are:
#       'testpmd'       - testpmd from dpdk will be built and used
#       'l2fwd'         - l2fwd module provided by Huawei will be built and used
#       'linux_bridge'  - linux bridge will be configured
#       'buildin'       - nothing will be configured by vsperf; VM image must
#                         ensure traffic forwarding between its interfaces
# For 2 VNFs you may use ['testpmd', 'l2fwd']
GUEST_LOOPBACK = ['testpmd']

# guest driver binding option; support options are:
#	'igb_uio_from_src'  - build igb_uio driver from downloaded source files
#	'uio_pci_generic'   - use uio_pci_generic driver
#	'vfio_no_iommu'     - use unsafe vfio driver without iommu (requires
#                             image with supported kernel 4.5 or greater and
#                             dpdk 16.04 or greater. VSPerf vloop image does not
#                             support this mode.
GUEST_DPDK_BIND_DRIVER = ['igb_uio_from_src']

# username for guest image
GUEST_USERNAME = ['root']

# password for guest image
GUEST_PASSWORD = ['root']

# login username prompt for guest image
GUEST_PROMPT_LOGIN = ['.* login:']

# login password prompt for guest image
GUEST_PROMPT_PASSWORD = ['Password: ']

# standard prompt for guest image
GUEST_PROMPT = ['root.*#']

# defines the number of NICs configured for each guest, it must be less or equal to
# the number of NICs configured in GUEST_NICS
GUEST_NICS_NR = [2]

# template for guests with 4 NICS, but only GUEST_NICS_NR NICS will be configured at runtime
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'},
               {'device' : 'eth1', 'mac' : '#MAC(00:00:00:00:00:02,2)', 'pci' : '00:05.0', 'ip' : '#IP(192.168.1.3,4)/24'},
               {'device' : 'eth2', 'mac' : '#MAC(cc:00:00:00:00:01,2)', 'pci' : '00:06.0', 'ip' : '#IP(192.168.1.4,4)/24'},
               {'device' : 'eth3', 'mac' : '#MAC(cc:00:00:00:00:02,2)', 'pci' : '00:07.0', 'ip' : '#IP(192.168.1.5,4)/24'},
             ]]

# amount of host memory allocated for each guest
GUEST_MEMORY = ['2048']
# number of hugepages configured inside each guest
GUEST_HUGEPAGES_NR = ['1024']

# test-pmd requires 2 VM cores
GUEST_SMP = ['2']

# cpu features to the guest, default options provided to pass all available
# host processor features to the guest. Also tsc deadline timer for guest,
# the guest PMU, the invariant TSC options can be provided as well.
GUEST_CPU_OPTIONS = ['host,migratable=off']

# Host cores to use to affinitize the SMP cores of a QEMU instance
# For 2 VNFs you may use [(4,5), (6, 7)]
GUEST_CORE_BINDING = [('#EVAL(6+2*#VMINDEX)', '#EVAL(7+2*#VMINDEX)')]

# pin guest vCPU threads to another pCPU core. This reduces the noise from qemu
# housekeeping threads. By default the GUEST_THREAD_BINDING will be none.
GUEST_THREAD_BINDING = [ None ]

# Queues per NIC inside guest for multi-queue configuration, requires switch
# multi-queue to be enabled for dpdk. Set to 0 for disabled. Can be enabled if
# using Vanilla OVS without enabling switch multi-queue.
GUEST_NIC_QUEUES = [0]

# Disable VHost user guest NIC merge buffers by enabling the below setting. This
# can improve performance when not using Jumbo Frames.
GUEST_NIC_MERGE_BUFFERS_DISABLE = [True]

# Virtio-Net vhost thread CPU mapping. If using  vanilla OVS with virtio-net,
# you can affinitize the vhost-net threads by enabling the below setting. There
# is one vhost-net thread per port per queue so one guest with 2 queues will
# have 4 vhost-net threads. If more threads are present than CPUs given, the
# affinitize will overlap CPUs in a round robin fashion.
VSWITCH_VHOST_NET_AFFINITIZATION = False
VSWITCH_VHOST_CPU_MAP = [4,5,8,11]

GUEST_START_TIMEOUT = [120]
GUEST_OVS_DPDK_DIR = ['/root/ovs_dpdk']
GUEST_OVS_DPDK_SHARE = ['/mnt/ovs_dpdk_share']

# IP addresses to use for Vanilla OVS PXP testing
# Consider using RFC 2544/3330 recommended IP addresses for benchmark testing.
# Network: 198.18.0.0/15
# Netmask: 255.254.0.0
# Broadcast: 198.19.255.255
# First IP: 198.18.0.1
# Last IP: 198.19.255.254
# Hosts: 131070
#

# ARP entries for the IXIA ports and the bridge you are using:
VANILLA_TGEN_PORT1_IP = '1.1.1.10'
VANILLA_TGEN_PORT1_MAC = 'AA:BB:CC:DD:EE:FF'

VANILLA_TGEN_PORT2_IP = '1.1.2.10'
VANILLA_TGEN_PORT2_MAC = 'AA:BB:CC:DD:EE:F0'

GUEST_BRIDGE_IP = ['#IP(1.1.1.5)/16']

# ############################
# Guest TESTPMD configuration
# ############################

# set of configuration parameters, which will be passed to the testpmd
# executed inside the guest
# Note: Testpmd must be executed in interactive mode. It means, that
# VSPERF won't work correctly if '-i' will be removed.
GUEST_TESTPMD_PARAMS = ['-c 0x3 -n 4 --socket-mem 512 -- '
                        '--burst=64 -i --txqflags=0xf00 '
                        '--disable-hw-vlan']

# packet forwarding mode supported by testpmd; Please see DPDK documentation
# for comprehensive list of modes supported by your version.
# e.g. io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho|...
# Note: Option "mac_retry" has been changed to "mac retry" since DPDK v16.07
GUEST_TESTPMD_FWD_MODE = ['csum']