summaryrefslogtreecommitdiffstats
path: root/tools/pkt_gen
AgeCommit message (Collapse)AuthorFilesLines
2016-09-21pkt_gen: Spirent Testcenter RFC 2889 SupportSridhar K. N. Rao2-0/+390
The changes/additions, apart from spirent testcenter-specific, also includes to some files in conf (01_testcase and 03_traffic) and core (result- constants, traffic_controller and component_factory) folders. Currently, only RFC2889 Forwarding testcase is supported. Incorporated following review suggestions: 1. Log level fixes 2. Removing unused function in results_constants.py 3. Added documentation to docs/configguide/trafficgen.rst. Userguide will be updated once other RFC2889 tests are implemented. 4. string matching in component_factory. 5. Remove Trailing Whitespaces JIRA: VSPERF-286 Change-Id: I0195720ab2f8cf2c3a5aa490d66166bdca0afcb0 Signed-off-by: Sridhar K. N. Rao <sridhar.rao@spirent.com>
2016-09-07pkt_gen: MoonGen code clean upbmichalo1-64/+54
MoonGen code optimizations and general clean up. No functionality changes. JIRA: VSPERF-351 Change-Id: Ida16f16eb218eb6f0a1c90594c38511bfbb2cf97 Signed-off-by: bmichalo <bmichalo@redhat.com>
2016-08-26pkt_gen: MoonGen Incorrect RX_MBPS Calculationbmichalo1-1/+1
Misplaced parenthesis regarding THROUGHPUT_RX_MBPS JIRA: VSPERF-381 Change-Id: Ie33cf6ca88164f0686a819715b5f9f7409072063 Signed-off-by: bmichalo <bmichalo@redhat.com>
2016-08-12pkt_gen: Spirent changes to Harmonize test/trial terminologysridharkn1-7/+9
Added changes to make use of the tests parameter. The change is minor. Prior to this the value was taken from configuration file. With this change, the tests value is used as passed. JIRA: VSPERF-367 Change-Id: I9d1553d3b53dd19a79428ddaaacadb55fc27324f Signed-off-by: Sridhar Rao <sridhar.rao@spirent.com>
2016-08-09Xena_2544_tput_options: Add options for rfc 2544 testingChristian Trautman2-0/+27
Adds options to Xena for testing options when running RFC 2544 throughput testing. JIRA: VSPERF-369 Change-Id: I3145bd1a4d697d7b06cafda4f9d77cce859d1839 Signed-off-by: Christian Trautman <ctrautma@redhat.com>
2016-08-09Merge "pkt_gen: MoonGen should use class object for line rate calc"Maryam Tahhan1-1/+1
2016-08-09pkt_gen: MoonGen should use class object for line rate calcbmichalo1-1/+1
Instead of hard coding line speed numbers for rate calcuation, MoonGen should use its class object initialized at start time. JIRA: VSPERF-368 Change-Id: I68c688f8c244df16d98cfd15efabf491a317256b Signed-off-by: bmichalo <bmichalo@redhat.com>
2016-08-09Merge "bugfix: Harmonize test/trial RFC2544 terminology"Maryam Tahhan10-70/+79
2016-08-08pkt_gen: MoonGen incorrectly calculates rx/tx % statisticsbmichalo1-7/+16
For MoonGen, the final results parameters: throughput_rx_percent, throughput_tx_percent were incorrectly calculated when converting MoonGen to VSPERF format. In particular, this would occur when more than one data stream (single channel unidirectional traffic) was used in the test. When calculating these percentages, only aggregate throughput values equaling unidirectional traffic were used (for example, for 64 byte frames bidirectional traffic should use 29.76 Mpps, not 14.88 Mpps) JIRA: VSPERF-341 Change-Id: Ie62bded7aea023c287697f18c4172b58c320e050 Signed-off-by: bmichalo <bmichalo@redhat.com>
2016-08-08Merge "Xena: Modify aggregate_stats one port no stats when bi-direction"Maryam Tahhan1-2/+14
2016-08-05Merge "pkt_gen: MoonGen start rates not correct"Maryam Tahhan1-6/+21
2016-08-04bugfix: Harmonize test/trial RFC2544 terminologyMartin Klozik10-70/+79
VSPERF framework was updated to follow RFC2544 definition of 'test' and 'trial' terms. Test parameter 'rfc2544_trials' was replaced by new parameter 'rfc2544_tests'. Both code and documentation were updated to reflect these changes. JIRA: VSPERF-300 Change-Id: I144a28359fd06394f1f87ef324458bafd5aad45f Signed-off-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Christian Trautman <ctrautma@redhat.com> Reviewed-by: <bmichalo@redhat.com>
2016-08-03Xena: Modify aggregate_stats one port no stats when bi-directionliting1-2/+14
Xena exception when no stats collected on receive on one port during bi-directional traffic. Modify aggregate_stats in the XenaDriver.py, add judge whether the two port both has stats, if one port has no stats, the result use the port's value which has stats. JIRA: VSPERF-327 Change-Id: I18c349d609a2834907f0383dbfbebd5cd281f541 Signed-off-by: liting <tli@redhat.com>
2016-08-03pkt_gen: MoonGen start rates not correctbmichalo1-6/+21
The VSPERF traffic profile for starting rate is in a percentage of line rate. MoonGen programs its starting rate as Mpps. Therefore the traffic profile for VSPERF needs to be converted to a MoonGen format. There was a hardcoding of 14.88 that was used for the starting frame rate for all frame sizes. This needs to be corrected to take into account all frame sizes. JIRA: VSPERF-350 Change-Id: Ied71668a560d7d2b03483f9a1192dd2fb4965996 Signed-off-by: bmichalo <bmichalo@redhat.com>
2016-08-03Merge "docs: Enhancement of IxNetwork configuration guide"Maryam Tahhan1-3/+1
2016-08-02Merge "pkt_gen: Remove commas from MoonGen results"Martin Klozik1-18/+18
2016-08-02Merge "xena_deadlock: Fix xena2544.exe deadlock"Maryam Tahhan1-41/+62
2016-08-01pkt_gen: Remove commas from MoonGen resultsbmichalo1-18/+18
Results from other traffic generators are reported as pure numbers, i.e. 2477356.0000. These values are consumed and processed by other scripts (e.g. CI or OPNFV results visualization), so we should keep it consistent among various traffic generators. JIRA: VSPERF-342 Change-Id: I305421287eb632707038f2c8bc594fcb255ec939 Signed-off-by: bmichalo <bmichalo@redhat.com>
2016-07-27docs: Enhancement of IxNetwork configuration guideMartin Klozik1-3/+1
Configuration guide has been updated with description of IxNetwork specific configuration options. New section was added with description of test results sharing between IxNetwork and VSPERF. Additional changes: * wrong formatting inside installation.rst was fixed * description of IxNetwork configuration was updated inside ixnet.py JIRA: VSPERF-302 Change-Id: Ida0e086e69b82fd1f9821d16ea750b2dec1d5aa2 Signed-off-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Christian Trautman <ctrautma@redhat.com> Reviewed-by: <bmichalo@redhat.com>
2016-07-27pkt_gen: MoonGen incorrectly inserting VLAN tagbmichalo1-2/+3
MoonGen needs to take into account the VLAN tag 'enable' control knob defined within the VSPERF traffic profile and therefore only insert the VLAN tag when its 'True'. JIRA: VSPERF-329 Change-Id: Idbeed2f7e6411f0c28aa56a2d3e71bd7a79d975a Signed-off-by: bmichalo <bmichalo@redhat.com>
2016-07-21xena_deadlock: Fix xena2544.exe deadlockChristian Trautman1-41/+62
Fix Xena2544.exe execution with mono where sometimes the Xena process says complete, but the mono process doesn't exit. Changes call of Xena2544.exe from communicate thread lock to a wait try/catch block and checks the log periodically to see if a deadlock has occured and if so, the mono pid is terminated to prevent deadlock. * Fix one small issue with typecasting to int, changed to float JIRA: VSPERF-319 Change-Id: Ie7a86a2b9ff9cdfacba5a912ad17df6cc0581702 Signed-off-by: Christian Trautman <ctrautma@redhat.com>
2016-07-20pkt_gen: Moongen class name not consistent with name in conf filesbmichalo1-24/+24
Need to change naming to 'Moongen' for consistent naming between conf files and class JIRA: VSPERF-323 Change-Id: Ic580b68323a759b3c2ef7ca3c07006243a3acf7d Signed-off-by: bmichalo <bmichalo@redhat.com>
2016-07-05Spirent-TestCenter: Code Cleanup.sridharkn1-276/+136
Removal of redunant code in testcenter.py. No logic Changes. Cosmetic changes - removing redundant code of 150+ lines. JIRA: VSPERF-308 Change-Id: I4766890cdc9f3d23103b2d2090285361ac4a5197 Signed-off-by: Sridhar K. N. Rao <sridhar.rao@spirent.com>
2016-07-01Merge "Spirent Support for Continuous Traffic"Christian Trautman2-2/+129
2016-07-01Merge "pkt_gen: Adding MoonGen traffic generator"Christian Trautman2-0/+766
2016-06-30Xena: Modify the throughput result typecasts int issuetli1-4/+4
Modify the _create_throughput_result method typecasts int to typecasts to float JIRA: VSPERF-312 Change-Id: I45722251f3ca200373aa7b6958e62ea511c304f8 Signed-off-by: tli <tli@redhat.com>
2016-06-30Merge "xena_bug: Resolve baseconfig reporting option to work with new versions"Christian Trautman1-1/+1
2016-06-30pkt_gen: Adding MoonGen traffic generatorbmichalo2-0/+766
Adds support for the MoonGen packet generator. The following traffic types are included: * RFC 2544 Throughput: Synchronous Interface * RFC 2544 Back 2 Back: Synchronous Interface * Continous Flow: Synchronous Interface JIRA: VSPERF-168 Sample log of execution can be found as an attachment within JIRA VSPERF-168 Change-Id: I5bb84290945f4ba41bc962370e643bbbeff0e486 Signed-off-by: bmichalo <bmichalo@redhat.com>
2016-06-29Merge "xena_burst: Add Xena Burst traffic"Christian Trautman1-15/+11
2016-06-29xena_bug: Resolve baseconfig reporting option to work with new versionsChristian Trautman1-1/+1
Fix baseconfig to work with new Xena2544.exe versions. Reporting option for latency/jitter collection has changed. Added note to trafficgen document reflecting recommended version to use for Xena2544.exe. JIRA: VSPERF-311 Change-Id: I1974ea3c9f9e4c0935fc8adead6ddd5a92a16a04 Signed-off-by: Christian Trautman <ctrautma@redhat.com>
2016-06-28Xena: Modify xena_json for back2back optionstli2-14/+50
Add method set_test_options_back2back in code to modify duration, iterations, and flowrate for back2back options in the json file. JIRA: VSPERF-305 Change-Id: I1337318e7519fbd7b5a71bb26a1c62fcd8c2b66c Signed-off-by: tli <tli@redhat.com>
2016-06-26xena_burst: Add Xena Burst trafficChristian Trautman1-15/+11
Add Xena burst traffic functionality. JIRA: VSPERF-263 Change-Id: I6336e5fcb33c0f66ee87f0f14f1b795937e3d00d Signed-off-by: Christian Trautman <ctrautma@redhat.com>
2016-06-22Merge "xena_bug: Fix throughput stats with bi-directional traffic"Maryam Tahhan1-3/+5
2016-06-08Spirent Support for Continuous TrafficSridhar Rao2-2/+129
Adding changes for supporting continuous traffic for Spirent Testcenter The changes are as follows: 1. From send_cont_traffic invoke function in testcenter-rfc2544-rest.py 2. In testcenter-rfc2544-rest.py check for the traffic_custom 3. If the traffic_custom is 'cont' do additional configuration on traffic. JIRA: VSPERF-146 Change-Id: Ic963f9f0c2bd013f6e676c9d18b151ae67ff77af Signed-off-by: Sridhar Rao <sridhar.rao@spirent.com>
2016-06-07xena_cont: Add Xena continuous traffic functionalityChristian Trautman2-34/+1425
* Adds XenaDriver.py module to allow direct communication to Xena chassis through socket API and collect stats. * Adds implementation into xena.py for continuous traffic flow. JIRA: VSPERF-262 Change-Id: I6f975bc205e3c954215eb16466f11298e3fcdfaf Signed-off-by: Christian Trautman <ctrautma@redhat.com>
2016-05-27xena_bug: Fix throughput stats with bi-directional trafficChristian Trautman1-3/+5
Fix xena throughput stats for bi directional traffic by taking the receive numbers from both ports instead of a single port. JIRA: VSPERF-303 Change-Id: I3898afe00f8c80f54e5b4c210831e1fc6cef3c20 Signed-off-by: Christian Trautman <ctrautma@redhat.com>
2016-05-12xena_multistream_fix: Fix multistream json configChristian Trautman1-1/+1
Fix xena_json module to correctly assign hwmodifier for multistream. Append was incorrect application and list needs to be assigned directly. JIRA: VSPERF-293 Change-Id: I88d1930b88711af7c920b507a4db6c29cca83d8d Signed-off-by: Christian Trautman <ctrautma@redhat.com>
2016-05-04pkt_gen: Reporting FPS and MBPS from Spirent Testcentersridharkn1-8/+28
Support for reporting FPS and MBPS (TX and RX) is added. JIRA: VSPERF-285 Change-Id: Ic4b6ca02368b1808f0f985e90099cdb0b41c2afa Signed-off-by: sridharkn <sridhar.rao@spirent.com>
2016-05-04bidirectional value: Fix inconsistency for bidir paramChristian Trautman2-2/+2
Fixes bi-directional param and enforces string type in testcase configuration. Modifies all instance where bi directional value is used to string. * Changes documentation to specify value type as needed * Changes traffic defaults to use string for bidir value * Fixes testcases configuration files to use bidir as str * Change testcase conf documentation to note enforcement of string type * Sets bidir to title format to keep consitency in traffic profile when passed to traffic generators * Fix pvp/pvvp check for bidir value * Raise exception if testcase configuration is not set as str for bidir value * Change Xena bi-dir check to string compare instead of typecasting to boolean to compare. JIRA: VSPERF-282 Change-Id: I7c91fcd7333a1d1e1371bfd31700c01d7da268b5 Signed-off-by: Christian Trautman <ctrautma@redhat.com>
2016-04-25xena_port_ip: Add port ip assignment for Xena traffic generatorChristian Trautman2-4/+78
Adds port ip set options as part of conf files. Allows for IPv4 address assignment. Adds ipv6 options for later implementation when available in framework. * Adds Xena to documentation area where available traffic gens are listed. JIRA: VSPERF-273 Change-Id: Ia4129222ea95f1d399d5cc0c589c9a99d7b1b81a Signed-off-by: Christian Trautman <ctrautma@redhat.com>
2016-04-20xena_version: Add versioning info for report file from XenaChristian Trautman1-0/+2
Adds Xena version info to report files. Works by pulling the version info from the result file and adding it to the settings dictionary. JIRA: VSPERF-274 Change-Id: I2b7db30e5a621f32a7eaacfe48ab1bca498e4287 Signed-off-by: Christian Trautman <ctrautma@redhat.com>
2016-04-19xena: Back 2 Back implementationChristian Trautman2-36/+56
Allows for execution of back 2 back tests by enabling back to back test scenario in json file when executing Xena2544.exe. Return results are the number of frames. Results for test execution can be found in the coresponding JIRA ticket. - Disabled throughput by default in json file. - Modified test params in baseconfig file for b2b test - Modified create_result method to use data in resulting xml file over using inspect strategy to detect test type - Added line to Xena installation guide for issue that was found locally after installation JIRA: VSPERF-264 Change-Id: I0ecd6e1ce750613c53fe308aea3f5a55cca69c20 Signed-off-by: Christian Trautman <ctrautma@redhat.com>
2016-04-12pkt_gen: Testcenter traffic generation using STC-REST API -Import Issue.sridharkn1-2/+3
The import of stcrestclient in moved down to avoid execution errors. Change-Id: Ib9b64f62400c20a031f0ffcd3410582741cf1644 JIRA: VSPERF-237
2016-04-08xena: Throughput method implementation for Xena NetworksChristian Trautman4-0/+1279
Add files for Xena Networks 2544 throughput implementation. This allows for Xena to execute tput tests from VSPerf. For information on how this works please see the JIRA ticket. Modify traffic gen guide on install instructions for Xena. Add in scapy to requirements file. Modify conf file for Xena chassis connection information. * Added license info to __init__.py / baseconfig.x2544 * Set initial rate to 10% line rate for tput testing * Modified default mac address xena_json->set_header_layer2 from aa:aa:aa:aa:aa:aa to cc:cc:cc:cc:cc:cc * Removed obsolete multistream params * Added traffic params to 03_traffic.conf * Comments to explain try/catch for latency values * Removed unused import * Rebased to fix merge conflict * Added Xena to available traffic gen list in conf files JIRA: VSPERF-261 Change-Id: I3c4b4a332fd532e10b6096e9ed97a4a39d410839 Signed-off-by: Christian Trautman <ctrautma@redhat.com>
2016-04-07pkt_gen: Adding Support of testcenter traffic generation using STC REST API.sridharkn2-28/+713
Stcrestclient package based script is added. Support for RFC22544 backtoback, latency, frameloss are also added, along with the throughput. Comments Addressed: 1. Parameter name consistency. Ex: use duration (refer dummy.py). 2. Moved 'only the necessary contents of README to configguide/trafficgen.rst. 3. Removed README file 4. Commit message format (pkt_gen: and linewrap) 5. Merged 4 scripts (throughput/backtoback/latency/frameloss) that were rest-based into one single script. Name: testcenter-rfc2544-test.py 6. Changed year to 2016 7. Moved imports to the top (testcenter-rfc2544-rest.py) 8. Changed prints to Log (testcenter-rfc2544-rest.py) 9. Reporting the frame loss percentage. 10. Calls to frameloss and latency are not added as the 'caller' class TrafficControllerRFC2544 is only calling backtoback and throughput. 11. Changed Exception, e to Exception as e for python 3 compatibility 12. Remaining prints to debug and logger.error for errors. 13. Moved Session creation under try block. 14. Removed deadcode 15. Fixed missing docstring 16. Generic to specific Exception. 17. if-if to if-elif 18. Debug level logging only under verbose flag. 19. Fixed Arguments mismatch. 20. Ordering of the imports Note: The testcenter-rfc2544-rest.py is spawned as a separate process, and need not be wrapped in a class. JIRA: VSPERF-237 Change-Id: I05d2b24fca1da4ba67bc4d79206c5d755ebf8f20 Signed-off-by: sridharkn <sridhar.rao@spirent.com>
2016-03-12bugfix: Eliminate error and warning messagesMartin Klozik2-3/+3
Several issues have been fixed to decrease a number of warning and error messages written to the standard output. Error and warning messages causes false build failure report by Jenkins, in case that internal parsing of job output is enabled. Fixed issues: * qemu makefile updated * shared directories between host and guests are forcibly deleted before vsperf execution * nonstop_tsc cpu flag is exported from host to the guest * vloop-vnf help has been updated and changelog added * TCL scripts updated to print info instead of warning * vloop-vnf image updated to avoid snmpd related warnings Change-Id: Id9ca014bae8fa34772b67d1ebab3431682682931 JIRA: VSPERF-206 Signed-off-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
2016-03-11bugfix: Cleanup of traffic gen api and default traffic valuesMartin Klozik5-34/+32
Both documentation and traffic generator API are updated to match current code logic. Additional default values are added into TRAFFIC_DEFAULTS dictionary. Constructor of TestCase class uses default values from TRAFFIC_DEFAULTS instead of magic numbers. Change-Id: Id2f4983945e4b123adddbc9a2a832f4a735b27f6 JIRA: VSPERF-253 Signed-off-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Christian Trautman <ctrautma@redhat.com>
2016-02-23Results: Report percentage frameloss from DummyMaryam Tahhan1-30/+29
This patch adds the frameloss % result reporting to the dummy traffic gen and fixes incorrect calculations in the past for mbps that don't convert packet sizes to bits. JIRA: VSPERF-201 Change-Id: Ic4fc64a981ecbed0ab956f1cb94c7d76e7868def Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Billy O Mahony <billy.o.mahony@intel.com> Reviewed-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Al Morton <acmorton@att.com>
2016-02-21pktgen: docstring fixChristian Trautman1-1/+1
Fixed docstring to correctly reflect python output from using merge_spec function. JIRA: VSPERF-210 Change-Id: Ie3bf2a3d148aa9823bafafe8c61c4c94f00ccc87 Signed-off-by: Christian Trautman <ctrautma@redhat.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
2016-02-17VSPERF: Report percentage frameloss from IXIA/IXNETRadek Zetik2-0/+8
The patch introduces frame_loss_percent result value. The implementation is done for Ixia and IxNet traffic generators. The value is visible in list of result values at the end of the test, in csv, rst and md files. JIRA: VSPERF-201 Change-Id: I9b6795d427b199cb62ed66b7a137e412e36dc757 Signed-off-by: Radek Zetik <radekx.zetik@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Brian Castelli <brian.castelli@spirent.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Tv Rao <tv.rao@freescale.com> Reviewed-by: Billy O Mahony <billy.o.mahony@intel.com>