aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services
AgeCommit message (Collapse)AuthorFilesLines
2018-01-08Remove unnecessary function definition in IxLoadTrafficGenRodolfo Alonso Hernandez1-5/+2
Removed call to 'instantiate' base class in IxLoadTrafficGen. JIRA: YARDSTICK-894 Change-Id: I0ebee1f5e0f22cfd3a67eaac8accc67ecd35ad0c Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-01-04Remove tool provisioning in PROX helperRodolfo Alonso Hernandez1-30/+24
Tool provisioning in PROX setup environment helper is not needed [1]. The tool (PROX traffic injector) is already provided during the VNF building: ./ansible/nsb_setup.yml --> ./ansible/build_yardstick_image.yml --> ./ansible/ubuntu_server_cloudimg_modify_samplevnfs.yml --> ./ansible/roles/install_samplevnf [1]https://github.com/opnfv/yardstick/blob/master/yardstick/network_services/vnf_generic/vnf/prox_helpers.py#L641 JIRA: YARDSTICK-872 Change-Id: I0f925a7967a35a97901fbe5053793a791a7b1b01 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-01-03Make GenericVNF an abstract classRodolfo Alonso Hernandez6-60/+54
GenericVNF class is now an abstract class. Only optional methods are implemented. Mandatory methods: - instantiate - wait_for_instantiate - terminate - scale - collect_kpi. JIRA: YARDSTICK-866 Change-Id: Ia8766f9f98816e11894d1e72b0f3bd573d091d99 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-12-19Variable local_iface_name is read before it is setJiri Prokes1-2/+1
Moving variable setting before reading Verified via TC: yardstick/samples/vnf_samples/nsut/ping/tc_ping_heat_context.yaml JIRA: YARDSTICK-899 Change-Id: Ia2feac1ed4e67dccd02446ba27afc9d40e87be35 Signed-off-by: Jiri Prokes <jirix.x.prokes@intel.com>
2017-12-16samples: Add generic L3 forwarder testsDino Madarang1-0/+185
A generic throughput test case that can be used as a stub code for a Linux-based VNF configured as an L3 forwarder. Supported context: * Standalone OVSDPDK and SRIOV * Baremetal Code changes: * Allow pmd-cpu-mask and lcore mask for OVS DPDK * router_vnf.py - configures interface IP addresses and static arp entries using ip command * NFVi KPIs * Allow cputune tag for standalone context to be able to PIN on NUMA 1 cpus SRIOV Test cases: * RFC2544 Ethernet framesizes, 128K Flows * 2,4 and 6 ports * 2 and 3 vcpus per port * OVSDPDK Test cases: * RFC2544 Ethernet framesizes, 128K Flows * 2 and 4 ports * 2 vcpus per port * 2 PMD threads per port TODO: * Documentation * Add 6 ports tests References: * router_vnf.py is based on sample_vnf.py * tc_*.yaml files are based on acl/vfw test case files Added unitests Added get_stats to parse ip -s link Change-Id: Id1b969d5420dfcab7c1e695acbd2cd1655747efe Signed-off-by: Dino Simeon Madarang <dinox.madarang@intel.com> Signed-off-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Reviewed-by: Alain Jebara <alain.jebara@intel.com> Reviewed-by: Deepak S <deepak.s@linux.intel.com> Reviewed-by: Emma Foley <emma.l.foley@intel.com> Reviewed-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> Reviewed-by: Ross Brattain <ross.b.brattain@intel.com> Reviewed-by: Edward MacGillivray <edward.s.macgillivray@intel.com> Signed-off-by: Dhaval Patel <dhaval.r.patel@intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-12-15NSB: Fix standalone.model.Libvirt SR-IOV modelingDino Madarang1-22/+30
Fixed standalone.model.Libvirt SR-IOV XML interface modeling, acording to [1]: - All PCI attributes now are printed in hexadecimal format. - The PCI address is now added in the correct section, 'interface'. network_services.utils.PciAddress was refactored to accept both 'domain: bus:slot:function' and 'bus:slot:function' format inputs. This class is used as input in the previous class, Libvirt, to print in XML the PCI address of a SR-IOV interface. network_services.utils.PciAddress.parse_address is now deprecated. Instead the class standard instantiation must be used: libvirt_obj = utils.PciAddress(text_with_address) A deprecation decorator is implemented along with this patch. This decorator is used for the first time in the previously mentioned function. This decorator stores every decorated function name and deprecation message and raises a logging warning message the first time this function is used. [1] https://goo.gl/so2Mrp Change-Id: I22e95c488e27d6e2a8fdf6c1a07faab275fa6bba Signed-off-by: Dino Simeon Madarang <dinox.madarang@intel.com> Reviewed-by: Alain Jebara <alain.jebara@intel.com> Reviewed-by: Deepak S <deepak.s@linux.intel.com> Reviewed-by: Ross Brattain <ross.b.brattain@intel.com> Reviewed-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-11-17Make GenericTrafficGen class abstractRodolfo Alonso Hernandez7-66/+32
GenericTrafficGen class is now an abstract class. Only optional methods are implemented. - 'run_traffic' and 'terminate' are mandatory. - 'listen_traffic', 'verify_traffic' and 'wait_for_instance' are optional. By default these methods doesn't execute any action. JIRA: YARDSTICK-853 Change-Id: I2befdaa337af79cc2364bdd7c66183c31c5ab69a Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-11-16NSB "Prox" : Cleanup duplicated traffic profileAbhijit Sinha1-99/+0
JIRA: YARDSTICK-848 The NSB PROX MPLS test uses Binsearch traffic profile and the mpls traffic profile is a duplicate. Change-Id: Ie2124cebf306fd6917b70ecd7c23ae12ef4850dc Signed-off-by: Abhijit Sinha <abhijit.sinha@intel.com>
2017-11-14NSB TRex: convert DPDK port number to logical TRex port numberRoss Brattain3-7/+33
when we create TRex config we sort based on PCI bus address and create a logical port ordering. We need to save this port ordering and re-use it everywhere. redirect vnfd_helper.port_num() to resource_helper.port_num() to use the logical mapping Change-Id: Ibff628556d5e11e686e15716a66a3210758c4ff0 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-11-10Merge "Remove ↵Ross Brattain1-5/+0
network_services.vnf_generic.vnf.prox_helpers.ProxSocketHelper.rx_stats"
2017-11-10Merge "pmu: remove event_download_local workaround script"Ross Brattain1-15/+0
2017-11-09Merge "NSB Prox LW_AFTR Test"Ross Brattain1-1/+189
2017-11-08Remove network_services.vnf_generic.vnf.prox_helpers.ProxSocketHelper.rx_statsEmma Foley1-5/+0
* Remove the method which is unused and is marked as deprecated. Change-Id: Ie64084fcd26985283c664445b173a757d3d908ab JIRA: YARDSTICK-838 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2017-11-08pmu: remove event_download_local workaround scriptRoss Brattain1-15/+0
intel_pmu needs to download a config file based on the CPU model. When generating VNF images we don't have access to the actual vCPU that will be used, so we can't predownload. This code was meant to be a fix for that by downloading all the configs and then selecting one that matched the vCPU. However we have license issues with intel_pmu enven GPLv2 code, so remove it for now. Change-Id: I5257ff7c4ddc1d40537dadb29efa40d1d68cb852 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-11-07NSB Prox LW_AFTR TestDanielMartinBuckley1-1/+189
JIRA: YARDSTICK-802 Addition of PROX LW_AFTR basked on PROX/DATS v037 test_104_lw_aftr.py - This support BM and Openstack Heat - This supports 4 Ports ONLY - Grafana Dashboards included - Code Coverage / Unit testing Change-Id: If2170ab458bf687256d5f1a1e840a3b9d2788ef7 Signed-off-by: Daniel MArtin Buckley <daniel.m.buckley@intel.com> Signed-off-by: Abhijit Sinha <abhijit.sinha@intel.com>
2017-10-31NSB: remove validate_cpu_cfg and all app cpu methodsRoss Brattain1-41/+0
We don't really know what core we are going to use for the VNF before we generate the MultiPortConfig, so these methods are incorrect. We may need some more advanced method to validate the vCPU topology, but that will probably happen in the MultiPortConfig Change-Id: Ifee7ae4589ce0fce67771fb8d8b8dce0a0f06409 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-27resource: remove cores argsRoss Brattain2-5/+2
We used to try to probe all the cores that the VNF was using and only dump CPU stats for those cores. We can't really detect those core accurately and we would rather dump all the core information and let influxdb and grafana filter the information. We do end up with excessive KPI output, especially on systems with 88 cores, but this is manageable. The core logic was partially removed, this finishes the removal. Change-Id: I5cbb694fd982519e2df54db49a21ed5948e13537 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-19Merge "NSB: fix trex config to use dpdk port number"Ross Brattain2-12/+16
2017-10-19BugFix: Negative dropped packets in Prox testsAbhijit Sinha1-3/+3
Removed the abs function which can potentially mask negative dropped packets. Dropped packets in Prox workload VNF = rx_packets - tx_packets Change-Id: I510a351e899cdf9a1f366d632b9f0528b1d9dcce Signed-off-by: Abhijit Sinha <abhijit.sinha@intel.com>
2017-10-18NSB: fix trex config to use dpdk port numberRoss Brattain2-12/+16
From some reason Heat/Neutron is now creating interfaces such that xe0 and xe1 are swapped. xe0 fa:16:3e:38:c7:66 0000:00:05.0 xe1 fa:16:3e:2f:f3:e2 0000:00:03.0 this causes the DPDK port numbering to be swapped. xe0 is DPDK port 1 because it has higher PCI address xe1 is DPDK port 0 because it has lower PCI address. The VNF is configured correctly because it uses DPDK port numbers, whereas TRex was using interface list ordering. Modify trex_cfg.yaml to use DPDK port ordering. This also requires running generate_cfg() after setup() in instantiate() +------------------------------------+-------------------+------------------------------+--------+ | Name | MAC Address | Fixed IP Addresses | Status | +------------------------------------+-------------------+------------------------------+--------+ | vnf_0.yardstick-af5ccb47-xe0-port | fa:16:3e:66:a5:e4 | ip_address='10.1.0.7', | ACTIVE | | vnf_0.yardstick-af5ccb47-mgmt-port | fa:16:3e:fa:98:fe | ip_address='10.0.1.10', | ACTIVE | | tg_0.yardstick-af5ccb47-xe1-port | fa:16:3e:2f:f3:e2 | ip_address='10.1.1.9', | ACTIVE | | vnf_0.yardstick-af5ccb47-xe1-port | fa:16:3e:f3:1d:f5 | ip_address='10.1.1.4', | ACTIVE | | | fa:16:3e:e3:8c:65 | ip_address='10.0.1.1', | ACTIVE | | | fa:16:3e:ff:d1:b7 | ip_address='11.191.14.110', | N/A | | tg_0.yardstick-af5ccb47-xe0-port | fa:16:3e:38:c7:66 | ip_address='10.1.0.8', | ACTIVE | | | fa:16:3e:ff:53:5f | ip_address='11.191.14.101', | DOWN | | | fa:16:3e:23:5d:2c | ip_address='10.0.1.2', | ACTIVE | | tg_0.yardstick-af5ccb47-mgmt-port | fa:16:3e:7a:df:4e | ip_address='10.0.1.5', | ACTIVE | | | fa:16:3e:22:65:36 | ip_address='11.191.14.109', | N/A | +------------------------------------+-------------------+------------------------------+--------+ /sys/devices/pci0000:00/0000:00:03.0/virtio0/net/ens3/address:fa:16:3e:2f:f3:e2 /sys/devices/pci0000:00/0000:00:05.0/virtio2/net/ens5/address:fa:16:3e:38:c7:66 Change-Id: Iaef2c7d9a5af7f45bd805a8ad6ee545ce0495cb1 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-17NSB: MultiPortConfig adjust start_coreRoss Brattain1-1/+1
Change-Id: I8f4b6af898c9d3783f7b45471088a69e51c8baba Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-17Merge "Enable static cgnapt functionality."Ross Brattain2-33/+28
2017-10-17Enable static cgnapt functionality.Deepak S2-33/+28
Change-Id: Ie770ca69ebdc66589ed6ca5c25bfc9a75afb8938 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-10-17Merge "BugFix: Fix to negative dropped packets appearing in results."Ross Brattain1-1/+1
2017-10-17Merge "BugFix: limit the count to supported range in min/max"Ross Brattain1-6/+24
2017-10-14Merge "Relocate iniparser to yardstick.network_services.helpers"Ross Brattain2-6/+5
2017-10-13resource: move make_resource_profile to ResourceProfileRoss Brattain2-13/+13
move factory method from Collector to ResourceProfile Change-Id: I1ddf3cffed7a3b2d45aa9cbffd3c0a5925c325d6 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-13Relocate iniparser to yardstick.network_services.helpersEdward MacGillivray2-6/+5
Change-Id: I1f457c9c24f2ca84dde61b64f58edaff8952670a Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
2017-10-13BugFix: Fix to negative dropped packets appearing in results.DanielMartinBuckley1-1/+1
As per defect: the "VNF packets dropped" time series is negative - negative number of packets dropped is not meaningful. Solution: Return a positive value. Change-Id: I358006a691f2d6b5954333b9f7a745aba97ae44f Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
2017-10-13Merge "Move arp route tbl to script and update defailt vnf config files"Ross Brattain2-13/+14
2017-10-12BugFix: limit the count to supported range in min/maxDeepak S1-6/+24
In trex, giving count beyond the allowed range causes trex client to fail. Check the range and reset the count before starting the traffic Change-Id: I58e54f47edb5f249087b8f7178b807ddfb13b03c Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-10-12collectd: set intel_pmu events path and OVS socket pathRoss Brattain2-11/+42
switch from hardcoded path to dynamic path based on bin_path also enable proxy for install_collectd add barometer settings for virt and ovs_stats Change-Id: Id138aef548332a3e3fcb3963b746e7c9f10c0948 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-11Move arp route tbl to script and update defailt vnf config filesDeepak S2-13/+14
Change-Id: I8674caa15c9fc32cfacb17f558da5fb31094877e Signed-off-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-10Enable intel_pmu plugin in collectdDeepak S1-5/+5
Change-Id: I62c6416e5c79d0b90880985bb5c076b65e34192e Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-10-09Bugfix: Update HW lb config VNF thread to start from core 1Deepak S1-0/+3
Change-Id: Ib0007fa3689b90346598baaef5c6e88d4fdf444a Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-10-09install pmu tools collectd pluginRoss Brattain2-1/+5
Added review dependency, removed collectd commit-id replicating bash script, added pmu roles to playbook Create local mirror for event list generation, copy script to image, and run event list generation at runtime if intel_pmu is enabled. Change-Id: Ie46a2b197f4d2037cf3eed194764ce9eb5670415 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-06NSB Prox vPE TestAbhijit Sinha1-27/+231
JIRA: YARDSTICK-802 Addition of Prox vPE test case - The tests supports BM, Openstack Heat - Supports 4 ports - Grafana dashboards included - Added support for parameters.lua for prox additional files - Unit tests for code coverage Change-Id: I5cccb351dacba88a293ae4b8aba1f0a803d62e6d Signed-off-by: Abhijit Sinha <abhijit.sinha@intel.com> Signed-off-by: Daniel MArtin Buckley <daniel.m.buckley@intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-05add wait_for_instantiateRoss Brattain1-0/+7
Change-Id: Idc54fc907dba4603984712fc43a0db8dfd4b7374 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-05Merge "NSB Prox minor refactor of BNG"Ross Brattain1-6/+9
2017-10-04Disable VNF deploy by defaultDeepak S1-7/+3
Change-Id: I27bcc41c855f34fb1fd0332fc24e7bf0b2af4ec2 Signed-off-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-04NSB Prox minor refactor of BNGAbhijit Sinha1-6/+9
JIRA: YARDSTICK-802 - Updated the BNG code with minor refactor. - Corrected the CPE core name - Update binsearch traffic profile with 64B Change-Id: Iae0be766edb986520045655fa567651711813a8b Signed-off-by: Abhijit Sinha <abhijit.sinha@intel.com>
2017-10-03NSB PROX test hang fixesRoss Brattain9-44/+145
The PROX tests were hanging in the duration runner. These are fixes for various errors: raise error in collect_kpi if VNF is down move prox dpdk_rebind after collectd stop fix dpdk nicbind rebind to group by drivers prox: raise error in collect_kpi if the VNF is down prox: add VNF_TYPE for consistency sample_vnf: debug and fix kill_vnf pkill is not matching some executable names, add some debug process dumps and try switching back to killall until we can find the issue sample_vnf: add default timeout, so we can override default 3600 SSH timeout collect_kpi is the point at which we check the VNFs and TGs for failures or exits queues are the problem make sure we aren't silently blocking on non-empty queues by canceling join thread in subprocess fixup duration runner to close queues and other attempt to stop duration runner from hanging VnfdHelper: memoize port_num resource: fail if ssh can't connect at the end of 3600 second test our ssh connection is dead, so we can't actually stop collectd unless we reconnect fix stop() logic to ignore ssh errors Change-Id: I6c8e682a80cb9d00362e2fef4a46df080f304e55 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-02Enable multi-port perf in trex as TGDeepak S2-7/+18
set TRex -c option for threads per port based on hardware number of queues. We can't auto-detect number of queues and we can't use more than one thread per core on systems with single-queue interfaces, so move the option to the config file options: tg_0: queues_per_port: 2 also enable trex debug by removing >/dev/null redirection options: tg_0: trex_server_debug: true Change-Id: I46da187849282bf28f4ef5b333e1ae890e202768 Signed-off-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-02Merge "add collectd resource node capability"Ross Brattain2-10/+65
2017-10-02add collectd resource node capabilityRoss Brattain2-10/+65
allow manually adding collectd nodes using Node context. if a node is present with a collectd config dict then we can create a ResourceProfile object for it and connect to collectd. example nodes: - name: compute_0 role: Compute ip: 1.1.1.1 user: root password: r00t collectd: interval: 5 plugins: ovs_stats: {} Change-Id: Ie0c00fdb58373206071daa1fb13faf175c4313e0 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-02Optimize Core usage for the sampleVNFsDeepak S1-12/+8
Change-Id: I80aa7e796b9ca4c4881c78310860e293a4a75560 Signed-off-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-02Merge "Enabling multi_VM & multi port launch in standalone context"Ross Brattain1-0/+57
2017-10-01Merge "Fix src/dst ip update in ixia configuration"Ross Brattain1-2/+2
2017-10-01NSB: cancel all queue join threadsRoss Brattain4-0/+6
In some cases we are blocking in base.Runner join() because the queues are not empty call cancel_join_thread to prevent the Queue from blocking the Process exit https://docs.python.org/3.3/library/multiprocessing.html#all-platforms Joining processes that use queues Bear in mind that a process that has put items in a queue will wait before terminating until all the buffered items are fed by the "feeder" thread to the underlying pipe. (The child process can call the cancel_join_thread() method of the queue to avoid this behaviour.) This means that whenever you use a queue you need to make sure that all items which have been put on the queue will eventually be removed before the process is joined. Otherwise you cannot be sure that processes which have put items on the queue will terminate. Remember also that non-daemonic processes will be joined automatically. Warning As mentioned above, if a child process has put items on a queue (and it has not used JoinableQueue.cancel_join_thread), then that process will not terminate until all buffered items have been flushed to the pipe. This means that if you try joining that process you may get a deadlock unless you are sure that all items which have been put on the queue have been consumed. Similarly, if the child process is non-daemonic then the parent process may hang on exit when it tries to join all its non-daemonic children. cancel_join_thread() Prevent join_thread() from blocking. In particular, this prevents the background thread from being joined automatically when the process exits – see join_thread(). A better name for this method might be allow_exit_without_flush(). It is likely to cause enqueued data to lost, and you almost certainly will not need to use it. It is really only there if you need the current process to exit immediately without waiting to flush enqueued data to the underlying pipe, and you don’t care about lost data. Change-Id: I61f11a3b01109d96b7a5445c60f1e171401157fc Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-09-29Fix src/dst ip update in ixia configurationDeepak S1-2/+2
Change-Id: I03976c182e164a512a5ef48ad20928f27451c3f6 Signed-off-by: Deepak S <deepak.s@linux.intel.com>