NFVBENCH-190: Add a 'i40e_mixed' option, trex accepts other i40e driven ports to...
[nfvbench.git] / nfvbench / cfg.default.yaml
1 #
2 # NFVbench default configuration file
3 #
4 # This configuration file is ALWAYS loaded by NFVbench and should never be modified by users.
5 # To specify your own property values, always define them in a separate config file
6 # and pass that file to the script using -c or --config <file>
7 # Property values in that config file will override the default values in the current file
8 #
9 ---
10 # IMPORTANT CUSTOMIZATION NOTES
11 # There are roughly 2 types of NFVbench config based on the OpenStack encaps used:
12 # - VLAN (OVS, OVS-DPDK, ML2/VPP)
13 # Many of the fields to customize are relevant to only 1 of the 2 encaps
14 # These will be clearly labeled "VxLAN only" or "VLAN only"
15 # Fields that are not applicable will not be used by NFVbench and can be left empty
16 #
17 # All fields are applicable to all encaps/traffic generators unless explicitly marked otherwise.
18 # Fields that can be over-ridden at the command line are marked with the corresponding
19 # option, e.g. "--interval"
20
21
22 # The OpenStack openrc file to use - must be a valid full pathname. If running
23 # in a container, this path must be valid in the container.
24 #
25 # The only case where this field can be empty is when measuring a system that does not run
26 # OpenStack or when OpenStack APIs are not accessible or OpenStack APis use is not
27 # desirable. In that case the EXT service chain must be used.
28 #
29 # If openrc is not admin some parameters are mandatory and must be filled with valid values in config file such as :
30 # - availability_zone
31 # - hypervisor_hostname
32 # - vlans
33 openrc_file:
34
35 # Forwarder to use in nfvbenchvm image. Available options: ['vpp', 'testpmd']
36 vm_forwarder: testpmd
37
38 # By default (empty) NFVbench will try to locate a VM image file
39 # from the package root directory named "nfvbench-<version>.qcow2" and
40 # upload that file. The image name will be "nfvbench-<version>"
41 # This can be overridden by specifying here a pathname of a file
42 # that follows the same naming convention.
43 # In most cases, this field should be left empty as the packaging should
44 # include the proper VM image file
45 vm_image_file:
46
47 # Name of the flavor to use for the loopback VMs
48 #
49 # If the provided name is an exact match to a flavor name known by OpenStack
50 # (as shown from 'nova flavor-list'), that flavor will be reused.
51 # Otherwise, a new flavor will be created with attributes listed below.
52 flavor_type: 'nfvbench.medium'
53
54 # Custom flavor attributes for the test VM
55 flavor:
56   # Number of vCPUs for the flavor, must be at least 2!
57   vcpus: 2
58   # Memory for the flavor in MB
59   ram: 4096
60   # Size of local disk in GB
61   disk: 0
62   # metadata are supported and can be added if needed, optional
63   # note that if your OpenStack does not have NUMA optimization
64   # (cpu pinning and huge pages)
65   # you must comment out extra_specs completely otherwise
66   # loopback VM creation will fail
67   extra_specs:
68       "hw:cpu_policy": dedicated
69       "hw:mem_page_size": large
70
71 # Enable multiqueue for all test VM interfaces (PVP and PVVP only).
72 # When enabled, the test VM image will get added the property to enable
73 # multiqueue (hw_vif_multiqueue_enabled='true').
74 # The number of queues per interace will be set to the number of vCPUs configured for
75 # the VM.
76 # By default there is only 1 queue per interface
77 # The max allowed queue per interface is 8.
78 # The valid range for this parameter is [1..min(8, vcpu_count)]
79 # When multiqueue is used the recommended setting is to set it to same value as the
80 # number of vCPU used - up to a max of 8 queues.
81 # Setting to a lower value than vCPU should also work. For example if using 4 vCPU and
82 # vif_multiqueue_size is set to 2, OpenStack will create 4 queues per interface but the
83 # test VM will only use the first 2 queues.
84 vif_multiqueue_size: 1
85
86 # Increase number of buffers allocated for VPP VM forwarder. May be needed in scenarios with large
87 # number of interfaces and worker threads, or a lot of physical interfaces with multiple RSS queues.
88 # Value is per CPU socket. Default is 16384.
89 num_mbufs: 16384
90
91 # Name of the availability zone to use for the test VMs
92 # Must be one of the zones listed by 'nova availability-zone-list'
93 # availability_zone: 'nova'
94 # If openrc is not admin set a valid value
95 availability_zone:
96 # To force placement on a given hypervisor, set the name here
97 # (if multiple names are provided, the first will be used)
98 # Leave empty to let OpenStack pick the hypervisor
99 compute_nodes:
100 # If openrc is not admin set a valid value for hypervisor hostname
101 # Example of value: hypervisor_hostname: "server1"
102 hypervisor_hostname:
103
104 # Type of service chain to run, possible options are PVP, PVVP and EXT
105 # PVP - port to VM to port
106 # PVVP - port to VM to VM to port
107 # EXT - external chain used only for running traffic and checking traffic generator counters,
108 #       all other parts of chain must be configured manually
109 # Can be overriden by --service-chain
110 service_chain: 'PVP'
111
112 # Total number of service chains, every chain has own traffic stream
113 # Can be overriden by --service-chain-count
114 service_chain_count: 1
115
116 # Specifies if all chains share the same right/left/middle networks
117 service_chain_shared_net: false
118
119 # Total number of traffic flows for all chains and directions generated by the traffic generator.
120 # Minimum is '2 * service_chain_count', it is automatically adjusted if too small
121 # value was configured. Must be even.
122 # Every flow has packets with different IPs in headers
123 # Can be overriden by --flow-count
124 flow_count: 10000
125
126 # set to true if service chains should use SRIOV
127 # This requires SRIOV to be available on compute nodes
128 sriov: false
129
130 # Perform port to port loopback (direct or through switch)
131 # e.g. for unitary testing of the switch or the bench itself.
132 # When selected, this mode forces EXT service chain and no ARP mode
133 # Destination MAC for each port is set to the other (peer) port MAC.
134 # VLAN tagging is defined by 'vlans' & 'vlan_tagging' properties.
135 # Can be overriden by --l2-loopback (including vlan tagging spec).
136 l2_loopback: false
137 # No assumption is made about the loop implementation.
138 # Multiple L2 vlan tagged service chains are allowed,
139 # the vlan ID lists' size must be at least service_chain_count.
140 # If not vlan tagging, the service chain count is forced to 1.
141
142 # Resources created by NFVbench will not be removed
143 # Can be overriden by --no-cleanup
144 no_cleanup: false
145
146 # Configuration for traffic generator
147 traffic_generator:
148     # Name of the traffic generator, only for informational purposes
149     host_name: 'nfvbench_tg'
150     # this is the default traffic generator profile to use
151     # the name must be defined under generator_profile
152     # you can override the traffic generator to use using the
153     # -g or --traffic-gen option at the command line
154     default_profile: trex-local
155
156     # IP addresses for L3 traffic.
157     # This section describes the addresses to use to fill in the UDP packets sent by the
158     # traffic generator. If you VNFs are L2 forwarders, these fields below do not need to change.
159     # If your VNFs are L3 routers, the fields below must match the static routes in your VNFs
160     # so that UDP packets can be routed back to the peer port of the traffic generator.
161
162     # All of the IPs are used as base for IP sequence computed based on chain or flow count.
163     # (sim-devices-left)---(tg-gateway-left)---(vnf-left)- ...
164     #                                      -(vnf-right)---(tg-gateway-right)---(sim-devices-right)
165     #
166     # `ip_addrs` base IPs used as src and dst in packet header, quantity depends on flow count
167     #            these are used for addressing virtual devices simulated by the traffic generator
168     #            and be a different subnet than tg_gateway_ip_addrs and gateway_ip_addrs
169     # `ip_addrs_step`: step for generating IP sequence. Use "random" for random patterns, default is 0.0.0.1.
170     ip_addrs: ['10.0.0.0/8', '20.0.0.0/8']
171     ip_addrs_step: 0.0.0.1
172
173     #'ip_src_static': an attribute to precise the state of source IP during the generation of traffic, It indicates whether
174     #                the IP source variate or remain constant. Use True for constant IP and  False for varying IPs.
175     #                default value is  True
176     ip_src_static: True
177
178     # `tg_gateway_ip_addrs` base IP for traffic generator ports in the left and right networks to the VNFs
179     #                       chain count consecutive IP addresses spaced by tg_gateway_ip_addrs_step will be used
180     # `tg_gateway_ip_addrs__step`: step for generating traffic generator gateway sequences. default is 0.0.0.1
181     tg_gateway_ip_addrs: ['192.168.1.100', '192.168.2.100']
182     tg_gateway_ip_cidrs: ['192.168.1.0/24','192.168.2.0/24']
183     tg_gateway_ip_addrs_step: 0.0.0.1
184     # `gateway_ip_addrs`: base IPs of VNF router gateways (left and right), quantity used depends on chain count
185     #                     must correspond to the public IP on the left and right networks
186     #                     for each left-most and right-most VNF of every chain.
187     #                     must be the same subnet but not same IP as tg_gateway_ip_addrs.
188     #                     chain count consecutive IP addresses spaced by gateway_ip_addrs_step will be used
189     # `gateway_ip_addrs_step`: step for generating router gateway sequences. default is 0.0.0.1
190     gateway_ip_addrs: ['192.168.1.1', '192.168.2.1']
191     gateway_ip_addrs_step: 0.0.0.1
192
193     # UDP DEFINED VARIABLES
194     # TRex pick default UDP port (53) but the range of UDP source and destination ports are also
195     # defined from configuration file by using the following attributes:
196     #
197     # `udp_src_port`: the source port for sending UDP traffic, default is picked by TRex (53)
198     # `udp_dst_port`: the destination port for sending UDP traffic, default is picked by TRex (53)
199     # `udp_src_port` and `udp_dst_port` can be defined by a single port or a range. Example:
200     #   udp_src_port: 80
201     #   udp_dst_port: ['1024','65000']
202     # `udp_port_step`: the step between two generated ports, default is equal to '1'
203     #
204     # NOTICE:
205     # Following TRex functionalities, incrementation and decrementation of source port and destination
206     # port values occur simultaneously.
207     # So, in order to reach the highest possible number of packets, it's recommended that the range of source ports
208     # minus the range of destination ports should be different of 1
209     # i.e:  |range[source_port] - range[destination_port]| = 1
210     udp_src_port:
211     udp_dst_port:
212     udp_port_step: '1'
213
214     # VxLAN only: optionally specify what VLAN tag to use for the VxLAN overlay
215     # This is used if the vxlan tunnels are running on a specific VLAN.
216     # Leave empty if there is no VLAN tagging required, or specify the VLAN id to use
217     # for all VxLAN tunneled traffic
218     vtep_vlan:
219     # VxLAN and MPLS only: local/source vteps IP addresses for port 0 and 1 ['10.1.1.230', '10.1.1.231']
220     src_vteps:
221     # VxLAN only: remote IP address of the remote VTEPs that terminate all tunnels originating from local VTEPs
222     dst_vtep:
223     # The encapsulated L3/MPLS packet needs to traverse L3 or MPLS fabric to reach to its final dst_vtep.
224     # This parameter is required to resolve first next-hop MAC address if it next-hop is not its final dst_vtep.
225     # This parameter is mandatory for MPLS only
226     vtep_gateway_ips:
227     # L2 ADDRESSING OF UDP PACKETS
228     # Lists of dest MAC addresses to use on each traffic generator port (one dest MAC per chain)
229     # Leave empty for PVP, PVVP, EXT with ARP
230     # Only used when `service_chain` is EXT and `no_arp` is true.
231     #   - If both lists are empty the far end MAC of the traffic generator will be used for left and right
232     #     (this is typicaly used to loop back on the first hop switch or using a loopback cable)
233     #   - The length of each list must match the number of chains being used!
234     #   - The index of each list must correspond to the chain index to ensure proper pairing.
235     #   - Below is an example of using two chains:
236     #     - mac_addrs_left: ['00:00:00:00:01:00', '00:00:00:00:02:00']
237     #     - mac_addrs_right: ['00:00:00:00:01:01', '00:00:00:00:02:01']
238     #     UDP packets sent on port 0 will use dest MAC '00:00:00:00:01:00' for chain #0 and
239     #                                         dest MAC '00:00:00:00:02:00' for chain #1
240     #     UDP packets sent on port 1 will use dest MAC '00:00:00:00:01:01' for chain #0 and
241     #                                         dest MAC '00:00:00:00:02:01' for chain #1
242     #     It is expected that the looping device (L2 forwarder) will rewrite the src and dst MAC
243     #     of the looping UDP packet so that it can reach back to the peer port of the traffic
244     #     generator.
245     #
246     mac_addrs_left:
247     mac_addrs_right:
248
249     # Traffic Generator Profiles
250     # In case you have multiple testbeds or traffic generators,
251     # you can define one traffic generator profile per testbed/traffic generator.
252     # In most cases you only need to fill in the pci address for the 2 ports used by the
253     # traffic generator and leave all other fields unchanged
254     #
255     # Generator profiles are listed in the following format:
256     # `name`: Traffic generator profile name (use a unique name, no space or special character)
257     #         Do not change this field
258     # `tool`: Traffic generator tool to be used (currently supported is `TRex`).
259     #         Do not change this field
260     # `ip`: IP address of the traffic generator.
261     #       The default loopback address is used when the traffic generator runs on the same host
262     #       as NFVbench.
263     # `cores`: Specify the number of cores for running the TRex traffic generator.
264     #          ONLY applies to trex-local.
265     # `software_mode`: Advice TRex to use software mode which provides the best compability. But
266     #                  note that TRex will not use any hardware acceleration technology under
267     #                  software mode, therefore the performance of TRex will be significantly
268     #                  lower. ONLY applies to trex-local.
269     #                  Recommended to leave the default value (false)
270     # `limit_memory`: Specify the memory reserved for running the TRex traffic generator (in MB). Limit the amount
271     #                 of packet memory used. (Passed to dpdk as -m arg)
272     #          ONLY applies to trex-local.
273     # `zmq_pub_port`: Specify the ZMQ pub port number for the TRex traffic generator instance (default value is 4500).
274     #          ONLY applies to trex-local.
275     # `zmq_rpc_port`: Specify the ZMQ rpc port for the TRex traffic generator instance (default value is 4501).
276     #          ONLY applies to trex-local.
277     # `interfaces`: Configuration of traffic generator interfaces.
278     # `interfaces.port`: The port of the traffic generator to be used (leave as 0 and 1 resp.)
279     # `interfaces.switch_port`: Leave empty (deprecated)
280     # `interfaces.pci`: The PCI address of the intel NIC interface associated to this port
281     #                   This field is required and cannot be empty
282     #                   Use lspci to list the PCI address of all devices
283     #                   Example of value: "0000:5e:00.0"
284     # `intf_speed`: The speed of the interfaces used by the traffic generator (per direction).
285     #               Empty value (default) to use the speed discovered by the traffic generator.
286     #               Recommended to leave this field empty.
287     #               Do not use unless you want to override the speed discovered by the
288     #               traffic generator. Expected format: 10Gbps
289     #
290     # `platform`: Optional. Used to tune the performance and allocate the cores to the right NUMA.
291     #             See https://trex-tgn.cisco.com/trex/doc/trex_manual.html (6.2.3. Platform section configuration)
292     #             for more details
293     # `platform.master_thread_id`: Hardware thread_id for control thread. (Valid value is mandatory if platform property is set)
294     # `platform.latency_thread_id`: Hardware thread_id for RX thread. (Valid value is mandatory if platform property is set)
295     # `platform.dual_if`: Section defines info for interface pairs (according to the order in “interfaces” list). (Valid value is mandatory if platform property is set)
296     #                     Each section, starting with “- socket” defines info for different interface pair. (Valid value is mandatory if platform property is set)
297     # `platform.dual_if.socket`: The NUMA node from which memory will be allocated for use by the interface pair. (Valid value is mandatory if platform property is set)
298     # `platform.dual_if.threads`: Hardware threads to be used for sending packets for the interface pair. (Valid value is mandatory if platform property is set)
299     #                     Threads are pinned to cores, so specifying threads actually determines the hardware cores.
300     # Example of values:
301     # platform:
302     #   master_thread_id: 0
303     #   latency_thread_id: 2
304     #   dual_if:
305     #     - socket: 0
306     #       threads: [1]
307     #
308     generator_profile:
309         - name: trex-local
310           tool: TRex
311           ip: 127.0.0.1
312           cores: 4
313           software_mode: false
314           limit_memory: 1024
315           zmq_pub_port: 4500
316           zmq_rpc_port: 4501
317           interfaces:
318             - port: 0
319               pci:
320               switch_port:
321             - port: 1
322               pci:
323               switch_port:
324           intf_speed:
325           platform:
326             master_thread_id:
327             latency_thread_id:
328             dual_if:
329               - socket:
330                 threads:
331
332 # Use 'true' to force restart of local TRex server before next run
333 # TRex local server will be restarted even if restart property is false in case of generator config changes between runs
334 restart: false
335
336 # Simpler override for trex core count and mbuf multilier factor
337 # if empty defaults to the one specified in generator_profile.cores
338 cores:
339
340 # Simpler override for the interface speed
341 # if empty, the current generator_profile.intf_speed parameter applies
342 # if value = 'auto' the auto-detection is forced
343 intf_speed:
344
345 # 'cores' and 'intf_speed' parameters can be overriden themselves
346 # by respective options --cores and --intf-speed on the command-line.
347
348 # By default, the real ports line rate is detected and used as
349 # the reference for computing the theoretical maximum traffic load (100%).
350 # Note that specifying 'intf_speed' allows to artificially lower this
351 # reference while not modifying the actual transmission bit rate.
352
353 # The values of the following parameters are ignored on entry
354 # they are defined here in order to appear in the reported configuration.
355 # They will reflect the value active at run-time (after overriding or detection)
356 cores_used:
357 intf_speed_used:
358 intf_speed_detected:
359
360 # A cache size value is passed to the TRex field engine (FE) at packet generation.
361 # Can be overridden by --cache-size
362 # More information for TRex performance:
363 # https://trex-tgn.cisco.com/trex/doc/trex_stateless.html#_tutorial_field_engine_significantly_improve_performance
364 # If cache_size = 0 (or empty): no cache will be used by TRex (default)
365 # If cache_size < 0: cache_size will be set to flow count value
366 cache_size: 0
367 # The cache size is actually limited by the number of 64B mbufs configured in the trex platform configuration (see Trex manual 6.2.2. Memory section configuration)
368 # Note that the resulting value is finally capped to 10000, whatever the requested size is (by design limitation).
369
370 # Specification of the TRex behaviour dealing with the i40e network card driver issue: Trex-528
371 #   see https://trex-tgn.cisco.com/youtrack/issue/trex-528
372 #       This issue states that if other ports, in the same card,
373 #       are in kernel mode, they could impair traffic counting.      
374 # Can be overridden by --i40e-mixed
375 # Values can be:
376 #  ignore - don't consider the case (default)
377 #  exit   - should the case arise, exit (TRex default behaviour)
378 #  unbind - unbind kernel bound ports (the former NFVbench behaviour)
379 # The 'ignore' option might be OK as soon as the issue has been fixed in the driver.
380 # The 'unbind' option should not be used! who knows the current use of other ports?
381 i40e_mixed:
382
383 # Trex will use 1 x 64B mbuf per pre-built cached packet, assuming 1 pre-built cached packet per flow, it means for very large number of flows, the number of configured mbuf_64 will need to be set accordingly.
384 mbuf_64:
385
386 # mbuffer ratio to use for TRex (see TRex documentation for more details)
387 mbuf_factor: 0.2
388
389 # A switch to disable hdrh
390 # hdrh is enabled by default and requires TRex v2.58 or higher
391 disable_hdrh: false
392
393 # List of latency percentiles values returned using hdrh
394 # elements should be int or float between 0.0 and 100.0
395 lat_percentiles: [25, 75, 99]
396
397 # -----------------------------------------------------------------------------
398 # These variables are not likely to be changed
399
400 # Number of seconds to wait for VMs to pass traffic in both directions
401 check_traffic_time_sec: 200
402
403 # General retry count
404 generic_retry_count: 100
405
406 # General poll period
407 generic_poll_sec: 2
408
409 # name of the loop VM
410 loop_vm_name: 'nfvbench-loop-vm'
411
412 # Default names, subnets and CIDRs for PVP/PVVP networks (OpenStack only)
413 #
414 # If a network with given name already exists it will be reused.
415 # - PVP only uses left and right
416 # - PVVP uses left, middle and right
417 # - for EXT chains, this structure is not relevant - refer to external_networks
418 # Otherwise a new internal network will be created with that name, subnet and CIDR.
419 #
420 # network_type must be 'vlan' (for VLAN and SRIOV) or 'vxlan' (for VxLAN)
421 #              all 3 networks must use the same network type in this release
422 # segmentation_id can be set to enforce a specific segmentation id (vlan ID or VNI if vxlan)
423 #                 by default (empty) the segmentation id will be assigned by Neutron.
424 #                 If specified, it must be unique for each network
425 #                 For multi-chaining, see notes below
426 # physical_network can be set to pick a specific phsyical network - by default (empty) the
427 #                   default physical network will be picked
428 # SR-IOV: both physical_network and VLAN segmentation ID must be provided
429 # VxLAN: the VNI must generally be provided (except special Neutron VxLAN implementations)
430 #
431 # For example to setup 1xPVP using 2 different SR-IOV ports, you must put the appropriate physnet
432 # names under left.physical_network and right.physical_network.
433 # For multi-chaining and non shared networks,
434 # Example of override configuration to force PVP to run on 2 SRIOV ports (phys_sriov0 and phys_sriov1)
435 # using VLAN ID 2000 and 2001:
436 # internal_networks:
437 #    left:
438 #        segmentation_id: 2000
439 #        physical_network: phys_sriov0
440 #    right:
441 #        segmentation_id: 2001
442 #        physical_network: phys_sriov1
443 #
444 # For multi-chaining and non shared network mode (VLAN, SRIOV, VxLAN, MPLS):
445 # - the segmentation_id field if provided must be a list of values (as many as chains)
446 # - segmentation_id auto-indexing:
447 #   the segmentation_id field can also be a single value that represents the base value from which
448 #   values for each chain is derived using the chain ID as an offset. For example
449 #   if 2000 is specified, NFVbench will use 2000 for chain 0, 2001 for chain 1 etc...
450 #   The ranges of all the networks must not overlap.
451 # - the physical_network can be a single name (all VFs to be allocated on same physnet)
452 #   of a list of physnet names to use different PFs
453 #
454 #   Example of 2-chain VLAN configuration:
455 #   internal_networks:
456 #      left:
457 #          segmentation_id: [2000, 2001]
458 #          physical_network: phys_sriov0
459 #      right:
460 #          segmentation_id: [2010, 2011]
461 #          physical_network: phys_sriov1
462 #   Equivalent to (using auto-indexing):
463 #   internal_networks:
464 #      left:
465 #          segmentation_id: 2000
466 #          physical_network: phys_sriov0
467 #      right:
468 #          segmentation_id: 2010
469 #          physical_network: phys_sriov1
470 #
471 # - mpls_transport_labels is used only when MPLS encapsulation is enabled (mpls: true)
472 #   this parameter doesn't support auto-indexing because this is not a typical scenario
473 #   expected the list of values in a range 256-1048575, one value per chain is expected
474 #
475 #   In the bellow configuration example 'segmentation_id; contains the inner MPLS label for each chain
476 #   and 'mpls_transport_labels' contains the outer transport MPLS label for each chain
477 #   Example of 2-chain MPLS configuration:
478 #   internal_networks:
479 #      left:
480 #          network_type: mpls
481 #          segmentation_id: [2000, 2001]
482 #          mpls_transport_labels: [10000, 10000]
483 #          physical_network: phys_sriov0
484 #      right:
485 #          network_type: mpls
486 #          segmentation_id: [2010, 2011]
487 #          mpls_transport_labels: [11000, 11000]
488 #          physical_network: phys_sriov1
489
490
491 internal_networks:
492     left:
493         name: 'nfvbench-lnet'
494         subnet: 'nfvbench-lsubnet'
495         cidr: '192.168.1.0/24'
496         network_type: 'vlan'
497         segmentation_id:
498         physical_network:
499         mpls_transport_labels:
500     right:
501         name: 'nfvbench-rnet'
502         subnet: 'nfvbench-rsubnet'
503         cidr: '192.168.2.0/24'
504         network_type: 'vlan'
505         segmentation_id:
506         physical_network:
507         mpls_transport_labels:
508     middle:
509         name: 'nfvbench-mnet'
510         subnet: 'nfvbench-msubnet'
511         cidr: '192.168.3.0/24'
512         network_type: 'vlan'
513         segmentation_id:
514         physical_network:
515         mpls_transport_labels:
516
517 # IDLE INTERFACES: PVP, PVVP and non shared net only.
518 # By default each test VM will have 2 virtual interfaces for looping traffic.
519 # If service_chain_shared_net is false, additional virtual interfaces can be
520 # added at VM creation time, these interfaces will not carry any traffic and
521 # can be used to test the impact of idle interfaces in the overall performance.
522 # All these idle interfaces will use normal ports (not direct).
523 # Number of idle interfaces per VM (none by default)
524 idle_interfaces_per_vm: 0
525
526 # A new network is created for each idle interface.
527 # If service_chain_shared_net is true, the options below will be ignored
528 # and no idle interfaces will be added.
529 idle_networks:
530     # Prefix for all idle networks, the final name will append the chain ID and idle index
531     # e.g. "nfvbench-idle-net.0.4" chain 0 idle index 4
532     name: 'nfvbench-idle-net'
533     # Subnet name to use for all idle subnetworks
534     subnet: 'nfvbench-idle-subnet'
535     # CIDR to use for all idle networks (value should not matter)
536     cidr: '192.169.1.0/24'
537     # Type of network associated to the idle virtual interfaces (vlan or vxlan)
538     network_type: 'vlan'
539     # segmentation ID to use for the network attached to the idle virtual interfaces
540     # vlan: leave empty to let neutron pick the segmentation ID
541     # vxlan: must specify the starting VNI value to be used (cannot be empty)
542     # Note that NFVbench will use as many consecutive segmentation IDs as needed.
543     # For example, for 4 PVP chains and 8 idle
544     # interfaces per VM, NFVbench will use 32 consecutive values of segmentation ID
545     # starting from the value provided.
546     segmentation_id:
547     # physnet name to use for all idle interfaces
548     physical_network:
549
550 # MANAGEMENT INTERFACE
551 # By default each test VM will have 2 virtual interfaces for looping traffic.
552 # If use_management_port is true, additional virtual interface can be
553 # added at VM creation time, this interface will be used for VM management over SSH.
554 # This will be helpful for debug (forwarder config, capture traffic...)
555 # or to emulate VNF with management interface
556 use_management_port: false
557
558 # If a network with given name already exists it will be reused.
559 # Otherwise a new network is created for management interface.
560 # If use_management_port is false, the options below will be ignored
561 # and no management interface will be added.
562 management_network:
563     name: 'nfvbench-management-net'
564     # Subnet name to use for management subnetwork
565     subnet: 'nfvbench-management-subnet'
566     # CIDR to use for management network
567     cidr: '192.168.0.0/24'
568     gateway: '192.168.0.254'
569     # Type of network associated to the management virtual interface (vlan or vxlan)
570     network_type: 'vlan'
571     # segmentation ID to use for the network attached to the management virtual interface
572     # vlan: leave empty to let neutron pick the segmentation ID
573     # vxlan: must specify the starting VNI value to be used (cannot be empty)
574     segmentation_id:
575     # physnet name to use for all idle interfaces
576     physical_network:
577
578 # Floating IP for management interface
579 # If use_floating_ip is true, floating IP will be set on management interface port
580 # One floating IP by loop VM will be used (floating ips are often limited,
581 # use them on limited context mainly for debug). If there are 10 PVP chains, this will require 10
582 # floating IPs. If 10 PVVP chains, it will require 20 floating IPs
583 use_floating_ip: false
584
585 # If a network with given name already exists it will be reused.
586 # Set same name as management_network if you want to use a floating IP from this network
587 # Otherwise set name, subnet and CIDR information from your floating IP pool network
588 # Floating network used to set floating IP on management port.
589 # Only 1 floating network will be used for all VMs and chains (shared network).
590 # If use_floating_ip is false, the options below will be ignored
591 # and no floating IP will be added.
592 floating_network:
593     name: 'nfvbench-floating-net'
594     # Subnet name to use for floating subnetwork
595     subnet: 'nfvbench-floating-subnet'
596     # CIDR to use for floating network
597     cidr: '192.168.0.0/24'
598     # Type of network associated to the management virtual interface (vlan or vxlan)
599     network_type: 'vlan'
600     # segmentation ID to use for the network attached to the management virtual interface
601     # vlan: leave empty to let neutron pick the segmentation ID
602     # vxlan: must specify the starting VNI value to be used (cannot be empty)
603     segmentation_id:
604     # physnet name to use for all idle interfaces
605     physical_network:
606
607 # In the scenario of PVVP + SRIOV, there is choice of how the traffic will be
608 # handled in the middle network. The default (false) will use vswitch, while
609 # SRIOV can be used by toggling below setting.
610 use_sriov_middle_net: false
611
612 # EXT chain only. Prefix names of edge networks or list of edge network names
613 # used to send traffic via traffic generator.
614 #
615 # If service_chain_shared_net is true, the left and right networks must pre-exist and match exactly by name.
616 #
617 # If service_chain_shared_net is false, each chain must have its own pre-existing left and right networks.
618 # left and right can take either a string prefix or a list of arbitrary network names
619 # If a string prefix is passed, an index will be appended to each network name to form the final name.
620 # Example:
621 # external_networks:
622 #    left:  'ext-lnet'
623 #    right: 'ext-rnet'
624 # ext-lnet0 ext-rnet0 for chain #0
625 # ext-lnet1 ext-rnet1 for chain #1
626 # etc...
627 # If a list of strings is passed, each string in the list must be the name of the network used for the
628 # chain indexed by the entry position in the list.
629 # The list must have at least as many entries as there are chains
630 # Example:
631 # external_networks:
632 #   left:  ['ext-lnet', 'ext-lnet2']
633 #   right: ['ext-rnet', 'ext-rnet2']
634 #
635 external_networks:
636     left:
637     right:
638
639 # PVP with L3 router in the packet path only.
640 # Only use when l3_router option is True (see l3_router)
641 # Prefix names of edge networks which will be used to send traffic via traffic generator.
642 # If a network with given name already exists it will be reused.
643 # Otherwise a new edge network will be created with that name, subnet and CIDR.
644 #
645 # gateway can be set in case of L3 traffic with edge networks - refer to edge_networks
646 #
647 # segmentation_id can be set to enforce a specific VLAN id - by default (empty) the VLAN id
648 #                 will be assigned by Neutron.
649 #                 Must be unique for each network
650 # physical_network can be set to pick a specific phsyical network - by default (empty) the
651 #                   default physical network will be picked
652 #
653 edge_networks:
654     left:
655         name: 'nfvbench-net2'
656         router_name: 'router_left'
657         subnet: 'nfvbench-subnet2'
658         cidr: '192.168.3.0/24'
659         gateway:
660         network_type:
661         segmentation_id:
662         physical_network:
663     right:
664         name: 'nfvbench-net3'
665         router_name: 'router_right'
666         subnet: 'nfvbench-subnet3'
667         cidr: '192.168.4.0/24'
668         gateway:
669         network_type:
670         segmentation_id:
671         physical_network:
672
673 # Use 'true' to enable VXLAN encapsulation support and sent by the traffic generator
674 # When this option enabled internal networks 'network type' parameter value should be 'vxlan'
675 # VxLAN and MPLS encapsulations are mutual exclusive if 'vxlan' is true then 'mpls' should be false
676 # and vise versa
677 vxlan: false
678 # Use 'true' to enable MPLS encapsulation support and sent by the traffic generator
679 # When this option enabled internal networks 'network type' parameter value should be 'mpls'
680 # MPLS and VxLAN encapsulations are mutual exclusive if 'mpls' is 'true' then 'vxlan' should be set to 'false'
681 # and vise versa. no_flow_stats, no_latency_stats, no_latency_streams should be set to 'true' because these
682 # features are not supported at the moment. In future when these features will be supported they will require
683 # special NIC hardware. Only 2 label stack supported at the moment where one label is transport and another
684 # is VPN for more details please refer to 'mpls_transport_labels' and 'segmentation_id' in networks configuration
685 mpls: false
686 # Use 'true' to enable VLAN tagging of packets generated and sent by the traffic generator
687 # Leave empty or set to false if you do not want the traffic generator to insert the VLAN tag (this is
688 # needed for example if VLAN tagging is enabled on switch (access mode) or if you want to hook
689 # directly to a NIC).
690 # By default is set to true (which is the nominal use case with TOR and trunk mode to Trex ports)
691 # If VxLAN or MPLS are enabled, this option should be set to false (vlan tagging for encapsulated packets
692 # is not supported). Use the vtep_vlan option to enable vlan tagging for the VxLAN overlay network.
693 vlan_tagging: true
694
695 # Used only in the case of EXT chain and no OpenStack or not admin access to specify the VLAN IDs to use.
696 # This property is ignored when OpenStack is used or when 'vlan_tagging' is disabled.
697 # If OpenStack is used leave the list empty, VLAN IDs are retrieved from OpenStack networks using Neutron API.
698 # If networks are shared across all chains (service_chain_shared_net=true), the list should have exactly 2 values
699 # If networks are not shared across chains (service_chain_shared_net=false), the list should have
700 # 2 list of vlan IDs
701 # Examples:
702 #   [1998, 1999] left network uses vlan 1998 right network uses vlan 1999
703 #   [[1,2],[3,4]] chain 0 left vlan 1, right vlan 2 - chain 1 left vlan 3 right vlan 4
704 #   [1010, 1010] same vlan ID on both sides, for a typical l2-loopback test (*)
705 # The vlan lists may be oversized, compared to the actual service chain count
706 # (lowest indexes are used) but an exception is raised if they are too short.
707 vlans: []
708 # (*) actually there is no restriction, left/right IDs may differ
709 #     for some exotic purpose - see also the l2_loopback parameter.
710
711 # ARP is used to discover the MAC address of VNFs that run L3 routing.
712 # Used only with EXT chain.
713 # False (default): ARP requests are sent to find out dest MAC addresses.
714 # True: do not send ARP but use provisioned dest macs instead
715 #       (see mac_addrs_left and mac_addrs_right)
716 no_arp: false
717
718 # Loop VM (VPP forwarder) can use ARP to discover next hop mac address
719 # False (default): do not send ARP but use static config devices macs instead (TRex gratuitous ARP are not interpreted by VPP)
720 # True: ARP requests are sent to find out next hop MAC addresses (for instance SDN-GW)
721 loop_vm_arp: false
722
723 # Traffic Profiles
724 # You can add here more profiles as needed
725 # `l2frame_size` can be specified in any none zero integer value to represent the size in bytes
726 # of the L2 frame, or "IMIX" to represent the standard 3-packet size mixed sequence (IMIX1).
727 traffic_profile:
728     - name: traffic_profile_64B
729       l2frame_size: ['64']
730     - name: traffic_profile_IMIX
731       l2frame_size: ['IMIX']
732     - name: traffic_profile_1518B
733       l2frame_size: ['1518']
734     - name: traffic_profile_3sizes
735       l2frame_size: ['64', 'IMIX', '1518']
736
737 # Traffic Configuration
738 # bidirectional: to have traffic generated from both direction, set bidirectional to true
739 # profile: must be one of the profiles defined in traffic_profile
740 # The traffic profile can be overriden with the options --frame-size and --uni-dir
741 traffic:
742     bidirectional: true
743     profile: traffic_profile_64B
744
745 # Check config and connectivity only - do not generate traffic
746 # Can be overriden by --no-traffic
747 no_traffic: false
748
749 # Use an L3 router in the packet path. This option if set will create or reuse an OpenStack neutron
750 # router (PVP, PVVP) or reuse an existing L3 router (EXT) to route traffic to the destination VM.
751 # Can be overriden by --l3-router
752 l3_router: false
753
754 # If l3_router is true and depending on ARP stale time SUT configuration
755 # Gratuitous ARP (GARP) from TG port to the router is needed to keep traffic up
756 # Default value: 1 packet per second
757 # This value needs to be defined inferior to SUT ARP stale time to avoid GARP packets drop
758 # in case of high load traffic
759 periodic_gratuitous_arp: false
760 gratuitous_arp_pps: 1
761
762 # Test configuration
763
764 # The rate pps for traffic going in reverse direction in case of unidirectional flow. Default to 1.
765 unidir_reverse_traffic_pps: 1
766
767 # The rate specifies if NFVbench should determine the NDR/PDR
768 #  or if NFVbench should just generate traffic at a given fixed rate
769 # for a given duration (called "single run" mode)
770 # Supported rate format:
771 # NDR/PDR test: `ndr`, `pdr`, `ndr_pdr` (default)
772 # Or for single run mode:
773 # Packet per second: pps (e.g. `50pps`)
774 # Bits per second: bps, kbps, Mbps, etc (e.g. `1Gbps`, `1000bps`)
775 # Load percentage: % (e.g. `50%`)
776 # Can be overridden by --rate
777 rate: ndr_pdr
778
779 # Default run duration (single run at given rate only)
780 # Can be overridden by --duration
781 duration_sec: 60
782
783 # Interval between intermediate reports when interval reporting is enabled
784 # Can be overridden by --interval
785 interval_sec: 10
786
787 # Default pause between iterations of a binary search (NDR/PDR)
788 pause_sec: 2
789
790 # NDR / PDR configuration
791 measurement:
792     # Drop rates represent the ratio of dropped packet to the total number of packets sent.
793     # Values provided here are percentages. A value of 0.01 means that at most 0.01% of all
794     # packets sent are dropped (or 1 packet every 10,000 packets sent)
795
796     # No Drop Rate in percentage; Default to 0.001%
797     NDR: 0.001
798     # Partial Drop Rate in percentage; NDR should always be less than PDR
799     PDR: 0.1
800     # The accuracy of NDR and PDR as a percnetage of line rate; The exact NDR
801     # or PDR should be within `load_epsilon` line rate % from the one calculated.
802     # For example, with a value 0.1, and a line rate of 10Gbps, the accuracy
803     # of NDR and PDR will be within 0.1% Of 10Gbps or 10Mbps.
804     # The lower the value the more iterations and the longer it will take to find the NDR/PDR.
805     # In practice, due to the precision of the traffic generator it is not recommended to
806     # set it to lower than 0.1
807     load_epsilon: 0.1
808
809 # Location where to store results in a JSON format. Must be container specific path.
810 # Can be overriden by --json
811 json:
812
813 # Location where to store results in the NFVbench standard JSON format:
814 # <service-chain-type>-<service-chain-count>-<flow-count>-<packet-sizes>.json
815 # Example: PVP-1-10-64-IMIX.json
816 # Must be container specific path.
817 # Can be overriden by --std-json
818 std_json:
819
820 # Prints debug messages (verbose mode)
821 # Can be overriden by --debug
822 debug: false
823
824 # Set to a valid path name if logging to file is to be enabled
825 # Defaults to disabled
826 log_file:
827
828 # One can specify a user ID for changing ownership of output log/json files
829 #   - empty: depends on file existency
830 #     . yes? replacement, owner is unchanged
831 #     . no ? creation with root as user
832 #   - 0: this is the root user ID
833 #   - other: will corresponds (or not) to an existing user/group in the host
834 #            (the current user ID can be obtained with the command 'id -u')
835 # Can be overriden by --user-id
836 # Consider also that the default value below is overridable by a USER_ID env variable,
837 # if nfvbench is run into a container, this information can be passed at its creation.
838 # The overall precedence rule is: 'default_config (this) < env < config < command_line'
839 user_id:
840
841 # Similarly, the group ID is defined
842 # Can be overriden by --group-id
843 # Default may be set through env GROUP_ID
844 # Caveat: user and group with a same name may have different numerical IDs
845 #         (the current group ID can be obtained with the command 'id -g')
846 group_id:
847
848 # When enabled, all results and/or logs will be sent to a fluentd servers at the requested IPs and ports
849 # A list of one or more fluentd servers identified by their IPs and  port numbers should be given.
850 # For each recipient it is possible to enable both sending logs and performance
851 # results, or enable either logs or performance results. For enabling logs or results logging_tag or
852 # result_tag should be set.
853
854 fluentd:
855       # by default (logging_tag is empty) nfvbench log messages are not sent to fluentd
856       # to enable logging to fluents, specify a valid fluentd tag name to be used for the
857       # log records
858     - logging_tag:
859
860       # by default (result_tag is empty) nfvbench results are not sent to fluentd
861       # to enable sending nfvbench results to fluentd, specify a valid fluentd tag name
862       # to be used for the results records, which is different than logging_tag
863       result_tag:
864
865       # IP address of the server, defaults to loopback
866       ip: 127.0.0.1
867
868       # port # to use, by default, use the default fluentd forward port
869       port: 24224
870
871       # by default (logging_tag is empty) nfvbench log messages are not sent to fluentd
872       # to enable logging to fluents, specify a valid fluentd tag name to be used for the
873       # log records
874
875 # Module and class name of factory which will be used to provide classes dynamically for other components.
876 factory_module: 'nfvbench.factory'
877 factory_class: 'BasicFactory'
878
879 # Custom label added for every perf record generated during this run.
880 # Can be overriden by --user-label
881 user_label:
882
883 # Custom information to be passed to results post-processing,
884 # they will be included as is in the json report 'config' branch.
885 # Useful for documenting or automating further treatments.
886 # The value is any yaml object (=> open usage) - example:
887 # |user_info:
888 # |    status: explore
889 # |    description:
890 # |        generator: VM
891 # |        attachment: direct
892 # |        target: lab-pf
893 # |        switch: qfx3500
894 # Keys may be merged/overriden using the --user-info command line option
895 # (the command-line parameter value is expressed as a json object string)
896 user_info:
897
898
899 # THESE FIELDS SHOULD BE USED VERY RARELY OR ON PURPOSE
900
901 # Skip vswitch configuration and retrieving of stats
902 # Can be overriden by --no-vswitch-access
903 # Should be left to the default value (false)
904 no_vswitch_access: false
905
906 # Enable service mode for trafic capture from TRex console (for debugging purpose)
907 # Can be overriden by --service-mode
908 # Should be left to the default value (false)
909 service_mode: false
910
911 # Disable extra flow stats (on high load traffic)
912 # Can be overriden by --no-flow-stats
913 # Should be left to the default value (false)
914 no_flow_stats: false
915
916 # Disable flow stats for latency traffic
917 # Can be overriden by --no-latency-stats
918 # Should be left to the default value (false)
919 no_latency_stats: false
920
921 # Disable latency measurements (no streams)
922 # Can be overriden by --no-latency-streams
923 # Should be left to the default value (false)
924 no_latency_streams: false
925
926 # Skip "end to end" connectivity check on traffic setup
927 # Can be overriden by --no-e2e-check
928 # Should be left to the default value (false)
929 # This flag is usable for traffic generation only
930 no_e2e_check: false
931
932 # General purpose register (debugging flags)
933 # Can be overriden by --debug-mask
934 # Designed for development needs
935 # The hexadecimal notation (0x...) is accepted.
936 debug_mask: 0x00000000