Yardstick should not generate config files for vPE.
The current autogenerated configfile is incorrect.
Therefore this patch is removing the auto-generation functionality.
JIRA: YARDSTICK-1473
Change-Id: I9d909fcd0ac517d5ccdefb024c89b6bf979ef9c0
Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
traffic_type: 4
vnf__0:
nfvi_enable: True
- vnf_config: vpe_config
+ vnf_config: {file: './vpe_config/vpe_config_2_ports',
+ action_bulk_file: './vpe_config/action_bulk_512.txt',
+ full_tm_profile_file: './vpe_config/full_tm_profile_10G.cfg'}
runner:
type: Duration
duration: 4
- ixia_profile: ../../traffic_profiles/vpe/HTTP-vPE_IPv4_2Ports.rxf # Need vlan update
context:
type: Node
name: yardstick
allowed_drop_rate: 0.0001 - 0.0001
vnf__0:
nfvi_enable: True
- vnf_config: vpe_config
+ vnf_config: {file: './vpe_config/vpe_config_2_ports',
+ action_bulk_file: './vpe_config/action_bulk_512.txt',
+ full_tm_profile_file: './vpe_config/full_tm_profile_10G.cfg'}
runner:
type: Iteration
iterations: 10
allowed_drop_rate: 0.0001 - 0.0001
vnf__0:
nfvi_enable: True
- vnf_config: vpe_config
+ vnf_config: {file: './vpe_config/vpe_config_2_ports',
+ action_bulk_file: './vpe_config/action_bulk_512.txt',
+ full_tm_profile_file: './vpe_config/full_tm_profile_10G.cfg'}
runner:
type: Iteration
iterations: 10
allowed_drop_rate: 0.0001 - 0.0001
vnf__0:
nfvi_enable: True
- vnf_config: vpe_config
+ vnf_config: {file: './vpe_config/vpe_config_2_ports',
+ action_bulk_file: './vpe_config/action_bulk_512.txt',
+ full_tm_profile_file: './vpe_config/full_tm_profile_10G.cfg'}
runner:
type: Iteration
iterations: 10
correlated_traffic: true
vnf__0:
nfvi_enable: True
- vnf_config: vpe_config
+ vnf_config: {file: './vpe_config/vpe_config_2_ports',
+ action_bulk_file: './vpe_config/action_bulk_512.txt',
+ full_tm_profile_file: './vpe_config/full_tm_profile_10G.cfg'}
runner:
type: Iteration
iterations: 10
allowed_drop_rate: 0.0001 - 0.0001
vnf__0:
nfvi_enable: True
- vnf_config: vpe_config
+ vnf_config: {file: './vpe_config/vpe_config_2_ports',
+ action_bulk_file: './vpe_config/action_bulk_512.txt',
+ full_tm_profile_file: './vpe_config/full_tm_profile_10G.cfg'}
runner:
type: Iteration
iterations: 10
allowed_drop_rate: 0.0001 - 0.0001
vnf__0:
nfvi_enable: True
- vnf_config: vpe_config
+ vnf_config: {file: './vpe_config/vpe_config_2_ports',
+ action_bulk_file: './vpe_config/action_bulk_512.txt',
+ full_tm_profile_file: './vpe_config/full_tm_profile_10G.cfg'}
runner:
type: Iteration
iterations: 10
allowed_drop_rate: 0.0001 - 0.0001
vnf__0:
nfvi_enable: True
- vnf_config: vpe_config
+ vnf_config: {file: './vpe_config/vpe_config_2_ports',
+ action_bulk_file: './vpe_config/action_bulk_512.txt',
+ full_tm_profile_file: './vpe_config/full_tm_profile_10G.cfg'}
runner:
type: Iteration
iterations: 10
--- /dev/null
+[PIPELINE0]
+type = MASTER
+core = 0
+
+[TM0]
+burst_read = 24
+burst_write = 32
+cfg = /tmp/full_tm_profile_10G.cfg
+
+[PIPELINE1]
+type = FIREWALL
+core = s0c1
+pktq_in = RXQ0.0
+pktq_out = SWQ0 SINK0
+n_rules = 4096
+pkt_type = qinq_ipv4
+
+[PIPELINE2]
+type = FLOW_CLASSIFICATION
+core = s0c2
+pktq_in = SWQ0
+pktq_out = SWQ1 SINK1
+n_flows = 65536
+key_size = 8
+key_offset = 268
+key_mask = 00000FFF00000FFF
+flowid_offset = 172
+
+[PIPELINE3]
+type = FLOW_ACTIONS
+core = s0c2
+pktq_in = SWQ1
+pktq_out = SWQ2
+n_flows = 65536
+n_meters_per_flow = 1
+flow_id_offset = 172
+ip_hdr_offset = 278
+color_offset = 176
+
+[PIPELINE4]
+type = FLOW_ACTIONS
+core = s0c1
+pktq_in = SWQ2
+pktq_out = SWQ3
+n_flows = 65536
+n_meters_per_flow = 4
+flow_id_offset = 172
+ip_hdr_offset = 278
+color_offset = 176
+
+[PIPELINE5]
+type = ROUTING
+core = s0c3
+pktq_in = SWQ3
+pktq_out = TXQ1.0 SINK2
+encap = ethernet_mpls
+mpls_color_mark = yes
+ip_hdr_offset = 278
+color_offset = 176
+
+[PIPELINE6]
+type = ROUTING
+core = s0c4
+pktq_in = RXQ1.0
+pktq_out = SWQ4 SINK3
+encap = ethernet_qinq
+qinq_sched = yes
+ip_hdr_offset = 270
+
+[PIPELINE7]
+type = PASS-THROUGH
+core = s0c5
+pktq_in = SWQ4
+pktq_out = SWQ5
+
+[PIPELINE8]
+type = PASS-THROUGH
+core = s0c5
+pktq_in = SWQ5 TM0
+pktq_out = TM0 SWQ6
+
+[PIPELINE9]
+type = PASS-THROUGH
+core = s0c5
+pktq_in = SWQ6
+pktq_out = TXQ0.0
description: Traffic profile to run RFC2544 latency
traffic_profile:
traffic_type : IXIARFC2544Profile # defines traffic behavior - constant or look for highest possible throughput
- frame_rate : 100 # pc of linerate
+ frame_rate : 100% # pc of linerate
injection_time: {{ injection_time }}
enable_latency: True
id: 1
outer_l2:
framesize:
- 64B: "{{ get(imix, 'imix.uplink.imix_small', '0') }}"
+ 64B: "{{ get(imix, 'imix.uplink.imix_64B', '0') }}"
128B: "{{ get(imix, 'imix.uplink.imix_128B', '0') }}"
256B: "{{ get(imix, 'imix.uplink.imix_256B', '0') }}"
373b: "{{ get(imix, 'imix.uplink.imix_373B', '0') }}"
cfi: 0
outer_l3v4:
- proto: "tcp"
+ proto: "udp"
srcip4: "{{get(flow, 'flow.src_ip_0', '192.168.0.0-192.168.255.255') }}"
dstip4: "{{get(flow, 'flow.dst_ip_0', '192.16.0.0-192.16.0.31') }}"
count: "{{get(flow, 'flow.count', '1') }}"
count: "{{get(flow, 'flow.count', '1') }}"
seed: "{{get(flow, 'flow.seed', '1') }}"
downlink_0:
- id: 2
ipv4:
+ id: 2
outer_l2:
framesize:
- 64B: "{{ get(imix, 'imix.uplink.imix_small', '0') }}"
+ 64B: "{{ get(imix, 'imix.uplink.imix_64B', '0') }}"
128B: "{{ get(imix, 'imix.uplink.imix_128B', '0') }}"
256B: "{{ get(imix, 'imix.uplink.imix_256B', '0') }}"
373b: "{{ get(imix, 'imix.uplink.imix_373B', '0') }}"
1518B: "{{get(imix, 'imix.uplink.imix_1500B', '0') }}"
outer_l3v4:
- proto: "tcp"
+ proto: "udp"
srcip4: "{{get(flow, 'flow.dst_ip_0', '192.16.0.0-192.16.0.31') }}"
dstip4: "{{get(flow, 'flow.src_ip_0', '192.168.0.0-192.168.255.255') }}"
count: "{{get(flow, 'flow.count', '1') }}"
count: "{{get(flow, 'flow.count', '1') }}"
seed: "{{get(flow, 'flow.seed', '1') }}"
uplink_1:
- id: 3
ipv4:
+ id: 3
outer_l2:
framesize:
- 64B: "{{ get(imix, 'imix.uplink.imix_small', '0') }}"
+ 64B: "{{ get(imix, 'imix.uplink.imix_64B', '0') }}"
128B: "{{ get(imix, 'imix.uplink.imix_128B', '0') }}"
256B: "{{ get(imix, 'imix.uplink.imix_256B', '0') }}"
373b: "{{ get(imix, 'imix.uplink.imix_373B', '0') }}"
cfi: 0
outer_l3v4:
- proto: "tcp"
+ proto: "udp"
srcip4: "{{get(flow, 'flow.srcip_1', '192.168.0.0-192.168.255.255') }}"
dstip4: "{{get(flow, 'flow.dstip_1', '192.16.0.0-192.16.0.31') }}"
count: "{{get(flow, 'flow.count', '1') }}"
count: "{{get(flow, 'flow.count', '1') }}"
seed: "{{get(flow, 'flow.seed', '1') }}"
downlink_1:
- id: 4
ipv4:
+ id: 4
outer_l2:
framesize:
- 64B: "{{ get(imix, 'imix.uplink.imix_small', '0') }}"
+ 64B: "{{ get(imix, 'imix.uplink.imix_64B', '0') }}"
128B: "{{ get(imix, 'imix.uplink.imix_128B', '0') }}"
256B: "{{ get(imix, 'imix.uplink.imix_256B', '0') }}"
373b: "{{ get(imix, 'imix.uplink.imix_373B', '0') }}"
1518B: "{{get(imix, 'imix.uplink.imix_1500B', '0') }}"
outer_l3v4:
- proto: "tcp"
+ proto: "udp"
srcip4: "{{get(flow, 'flow.dst_ip_1', '192.16.0.0-192.16.0.31') }}"
dstip4: "{{get(flow, 'flow.src_ip_1', '192.168.0.0-192.168.255.255') }}"
count: "{{get(flow, 'flow.count', '1') }}"
\r
FIREWALL_ADD_DEFAULT = "p {0} firewall add default 1"\r
FIREWALL_ADD_PRIO = """\\r
-p {0} firewall add priority 1 ipv4 {1} 24 0.0.0.0 0 0 65535 0 65535 6 0xFF port 0"""\r
+p {0} firewall add priority 1 ipv4 {1} 24 0.0.0.0 0 0 65535 0 65535 17 0xFF port 0"""\r
\r
FLOW_ADD_QINQ_RULES = """\\r
p {0} flow add qinq 128 512 port 0 id 1\r
"""No actions/rules (flows) by default"""
return None
- def _build_pipeline_kwargs(self):
+ def _build_pipeline_kwargs(self, cfg_file=None):
tool_path = self.ssh_helper.provision_tool(tool_file=self.APP_NAME)
# count the number of actual ports in the list of pairs
# remove duplicate ports
hwlb = ' --hwlb %s' % worker_threads
self.pipeline_kwargs = {
- 'cfg_file': self.CFG_CONFIG,
+ 'cfg_file': cfg_file if cfg_file else self.CFG_CONFIG,
'script': self.CFG_SCRIPT,
'port_mask_hex': ports_mask_hex,
'tool_path': tool_path,
from six.moves import configparser, zip
+from yardstick.common import utils
from yardstick.common.process import check_if_process_failed
from yardstick.network_services.helpers.samplevnf_helper import PortPairs
from yardstick.network_services.pipeline import PipelineRules
if os.path.exists(vnf_cfg):
return open(vnf_cfg).read()
-
class VpeApproxSetupEnvHelper(DpdkVnfSetupEnvHelper):
APP_NAME = 'vPE_vnf'
- CFG_CONFIG = "/tmp/vpe_config"
CFG_SCRIPT = "/tmp/vpe_script"
TM_CONFIG = "/tmp/full_tm_profile_10G.cfg"
CORES = ['0', '1', '2', '3', '4', '5']
self.all_ports = self._port_pairs.all_ports
def build_config(self):
+ vnf_cfg = self.scenario_helper.vnf_cfg
+ task_path = self.scenario_helper.task_path
+ action_bulk_file = vnf_cfg.get('action_bulk_file', '/tmp/action_bulk_512.txt')
+ full_tm_profile_file = vnf_cfg.get('full_tm_profile_file', '/tmp/full_tm_profile_10G.cfg')
+ config_file = vnf_cfg.get('file', '/tmp/vpe_config')
vpe_vars = {
"bin_path": self.ssh_helper.bin_path,
"socket": self.socket,
}
-
self._build_vnf_ports()
vpe_conf = ConfigCreate(self.vnfd_helper, self.socket)
- vpe_conf.create_vpe_config(self.scenario_helper.vnf_cfg)
- config_basename = posixpath.basename(self.CFG_CONFIG)
+ config_basename = posixpath.basename(config_file)
script_basename = posixpath.basename(self.CFG_SCRIPT)
- tm_basename = posixpath.basename(self.TM_CONFIG)
- with open(self.CFG_CONFIG) as handle:
- vpe_config = handle.read()
- self.ssh_helper.upload_config_file(config_basename, vpe_config.format(**vpe_vars))
+ with utils.open_relative_file(action_bulk_file, task_path) as handle:
+ action_bulk = handle.read()
+
+ with utils.open_relative_file(full_tm_profile_file, task_path) as handle:
+ full_tm_profile = handle.read()
+ with utils.open_relative_file(config_file, task_path) as handle:
+ vpe_config = handle.read()
+
+ # vpe_script needs to be autogenerated
vpe_script = vpe_conf.generate_vpe_script(self.vnfd_helper.interfaces)
+ # upload the 4 config files to the target server
+ self.ssh_helper.upload_config_file(config_basename, vpe_config.format(**vpe_vars))
self.ssh_helper.upload_config_file(script_basename, vpe_script.format(**vpe_vars))
-
- tm_config = vpe_conf.generate_tm_cfg(self.scenario_helper.vnf_cfg)
- self.ssh_helper.upload_config_file(tm_basename, tm_config)
+ self.ssh_helper.upload_config_file(posixpath.basename(action_bulk_file),
+ action_bulk.format(**vpe_vars))
+ self.ssh_helper.upload_config_file(posixpath.basename(full_tm_profile_file),
+ full_tm_profile.format(**vpe_vars))
LOG.info("Provision and start the %s", self.APP_NAME)
- LOG.info(self.CFG_CONFIG)
+ LOG.info(config_file)
LOG.info(self.CFG_SCRIPT)
- self._build_pipeline_kwargs()
+ self._build_pipeline_kwargs(cfg_file='/tmp/' + config_basename)
return self.PIPELINE_COMMAND.format(**self.pipeline_kwargs)