diff options
author | Maryam Tahhan <maryam.tahhan@intel.com> | 2015-10-28 10:47:49 +0000 |
---|---|---|
committer | Maryam Tahhan <maryam.tahhan@intel.com> | 2015-10-29 14:28:12 +0000 |
commit | bd576aaae3b5c2f517af2b2dd49343a2bf9ac968 (patch) | |
tree | bdc79d073cbb028771563a4891e73f1758a1b8c8 /docs/to-be-reorganized | |
parent | 4bdcd58361959541d9d3572373cabd60c0929851 (diff) |
docs: fixup documentation errors and locations
Fixup the location of all rst documentation and any errors in the ltd.
JIRA:VSPERF-60
Change-Id: I1472d540b1b4eca4ab038d079bfb0ef2f0c5ebcd
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
Reviewed-by: Brian Castelli <brian.castelli@spirent.com>
Reviewed-by: Gene Snider <eugene.snider@huawei.com>
Reviewed-by: Al Morton <acmorton@att.com>
Reviewed-by: Tv Rao <tv.rao@freescale.com>
Diffstat (limited to 'docs/to-be-reorganized')
-rw-r--r-- | docs/to-be-reorganized/vswitchperf_design.rst | 204 | ||||
-rwxr-xr-x | docs/to-be-reorganized/vswitchperf_ltd.rst | 26 |
2 files changed, 217 insertions, 13 deletions
diff --git a/docs/to-be-reorganized/vswitchperf_design.rst b/docs/to-be-reorganized/vswitchperf_design.rst new file mode 100644 index 00000000..689c2098 --- /dev/null +++ b/docs/to-be-reorganized/vswitchperf_design.rst @@ -0,0 +1,204 @@ +Intended Audience +================= + +This document is intended to aid those who want to modify the vsperf code. Or to extend it - for example to add support for new traffic generators, deployment scenarios and so on. + +Usage +===== + +Example Command Lines +--------------------- + +List all the cli options: + + .. code-block:: console + + $ ./vsperf -h + +Run all tests that have ``tput`` in their name - ``p2p_tput``, ``pvp_tput`` etc.: + + .. code-block:: console + + $ ./vsperf --tests 'tput' + +As above but override default configuration with settings in 'my_settings.py'. This is useful as modifying configuration directly in the configuration files in ``conf/NN_*.py`` shows up as changes under git source control: + + .. code-block:: console + + $ ./vsperf --conf-file my_settings.py --tests 'tput' + +Override specific test parameters. Useful for shortening the duration of tests for development purposes: + + .. code-block:: console + + $ ./vsperf --test-params 'rfc2544_duration=10;rfc2544_trials=1;packet_sizes=64' --tests 'pvp_tput' + +Typical Test Sequence +===================== + +This is a typical flow of control for a test. + +.. image:: images/vsperf.png + + +Configuration +============= + +The conf package contains the configuration files (``*.conf``) for all system components, it also provides a ``settings`` object that exposes all of these settings. + +Settings are not passed from component to component. Rather they are available globally to all components once they import the conf package. + + .. code-block:: python + + from conf import settings + ... + log_file = settings.getValue('LOG_FILE_DEFAULT') + +Settings files (``*.conf``) are valid python code so can be set to complex types such as lists and dictionaries as well as scalar types: + + .. code-block:: python + + first_packet_size = settings.getValue('PACKET_SIZE_LIST')[0] + +Configuration Procedure and Precedence +-------------------------------------- + +Configuration files follow a strict naming convention that allows them to be processed in a specific order. All the .conf files are named ``NN_name.conf``, where NN is a decimal digit. The files are processed in order from 00_name.conf to 99_name.conf so that if the name setting is given in both a lower and higher numbered conf file then the higher numbered file is the effective setting as it is processed after the setting in the lower numbered file. + +The values in the file specified by ``--conf-file`` takes precedence over all the other configuration files and does not have to follow the naming convention. + + +Other Configuration +------------------- + +``conf.settings`` also loads configuration from the command line and from the environment. + +VM, vSwitch, Traffic Generator Independence +=========================================== + +VSPERF supports different vSwithes, Traffic Generators and VNFs by using standard object-oriented polymorphism: + + * Support for vSwitches is implemented by a class inheriting from IVSwitch. + * Support for Traffic Generators is implemented by a class inheriting from ITrafficGenerator. + * Support for VNF is implemented by a class inheriting from IVNF. + +By dealing only with the abstract interfaces the core framework can support many implementations of different vSwitches, Traffic Generators and VNFs. + +IVSwitch +-------- + + .. code-block:: python + + class IVSwitch: + start(self) + stop(self) + add_switch(switch_name) + del_switch(switch_name) + add_phy_port(switch_name) + add_vport(switch_name) + get_ports(switch_name) + del_port(switch_name, port_name) + add_flow(switch_name, flow) + del_flow(switch_name, flow=None) + +ITrafficGenerator +----------------- + + .. code-block:: python + + class ITrafficGenerator: + connect() + disconnect() + + send_burst_traffic(traffic, numpkts, time, framerate) + + send_cont_traffic(traffic, time, framerate) + start_cont_traffic(traffic, time, framerate) + stop_cont_traffic(self): + + send_rfc2544_throughput(traffic, trials, duration, lossrate) + start_rfc2544_throughput(traffic, trials, duration, lossrate) + wait_rfc2544_throughput(self) + + send_rfc2544_back2back(traffic, trials, duration, lossrate) + start_rfc2544_back2back(traffic, , trials, duration, lossrate) + wait_rfc2544_back2back() + +Note ``send_xxx()`` blocks whereas ``start_xxx()`` does not and must be followed by a subsequent call to ``wait_xxx()``. + +IVnf +---- + + .. code-block:: python + + class IVnf: + start(memory, cpus, + monitor_path, shared_path_host, + shared_path_guest, guest_prompt) + stop() + execute(command) + wait(guest_prompt) + execute_and_wait (command) + +Controllers +----------- + +Controllers are used in conjunction with abstract interfaces as way of decoupling the control of vSwtiches, VNFs and TrafficGenerators from other components. + +The controlled classes provide basic primitive operations. The Controllers sequence and co-ordinate these primitive operation in to useful actions. For instance the vswitch_controller_PVP can be used to bring any vSwitch (that implements the primitives defined in IVSwitch) into the configuration required by the Phy-to-Phy Deployment Scenario. + +In order to support a new vSwitch only a new implementation of IVSwitch needs be created for the new vSwitch to be capable of fulfilling all the Deployment Scenarios provided for by existing or future vSwitch Controllers. + +Similarly if a new Deployment Scenario is required it only needs to be written once as a new vSwitch Controller and it will immediately be capable of controlling all existing and future vSwitches in to that Deployment Scenario. + +Similarly the Traffic Controllers can be used to co-ordinate basic operations provided by implementers of ITrafficGenerator to provide useful tests. Though traffic generators generally already implement full test cases i.e. they both generate suitable traffic and analyse returned traffic in order to implement a test which has typically been predefined in an RFC document. However the Traffic Controller class allows for the possibility of further enhancement - such as iterating over tests for various packet sizes or creating new tests. + +Traffic Controller's Role +------------------------- + +.. image:: images/traffic_controller.png + + +Loader & Component Factory +-------------------------- + +The working of the Loader package (which is responsible for *finding* arbitrary classes based on configuration data) and the Component Factory which is responsible for *choosing* the correct class for a particular situation - e.g. Deployment Scenario can be seen in this diagram. + +.. image:: images/factory_and_loader.png + +Routing Tables +============== + +Vsperf uses a standard set of routing tables in order to allow tests to easily mix and match Deployment Scenarios (PVP, P2P topology), Tuple Matching and Frame Modification requirements. + +:: + + +--------------+ + | | + | Table 0 | table#0 - Match table. Flows designed to force 5 & 10 tuple matches go here. + | | + +--------------+ + | + | + v + +--------------+ table#1 - Routing table. Flows to route packets between ports goes here. + | | The chosen port is communicated to subsequent tables by setting the + | Table 1 | metadata value to the egress port number. Generally this table + | | is set-up by by the vSwitchController. + +--------------+ + | + | + v + +--------------+ table#2 - Frame modification table. Frame modification flow rules are + | | isolated in this table so that they can be turned on or off + | Table 2 | without affecting the routing or tuple-matching flow rules. + | | This allows the frame modification and tuple matching required by the + +--------------+ tests in the VSWITCH PERFORMANCE FOR TELCO NFV test specification + | to be independent of the Deployment Scenario set up by the vSwitchController. + | + v + +--------------+ + | | + | Table 3 | table#3 - Egress table. Egress packets on the ports setup in Table 1. + | | + +--------------+ diff --git a/docs/to-be-reorganized/vswitchperf_ltd.rst b/docs/to-be-reorganized/vswitchperf_ltd.rst index 3ffd23e3..15c1de5c 100755 --- a/docs/to-be-reorganized/vswitchperf_ltd.rst +++ b/docs/to-be-reorganized/vswitchperf_ltd.rst @@ -1244,9 +1244,9 @@ Test ID: LTD.Throughput.RFC2544.BackToBackFrames - Physical → virtual switch → physical. -Test ID: LTD.Throughput.RFC2889.Soak +Test ID: LTD.Throughput.RFC2889.MaxForwardingRateSoak ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - **Title**: RFC 2889 X% packet loss Throughput Soak Test + **Title**: RFC 2889 X% packet loss Max Forwarding Rate Soak Test **Prerequisite Test** LTD.Throughput.RFC2544.PacketLossRatio @@ -1254,11 +1254,11 @@ Test ID: LTD.Throughput.RFC2889.Soak **Description**: - The aim of this test is to understand the Throughput stability over an - extended test duration in order to uncover any outliers. To allow for an - extended test duration, the test should ideally run for 24 hours or, if - this is not possible, for at least 6 hours. For this test, each frame - size must be sent at the highest Throughput with X% packet loss, as + The aim of this test is to understand the Max Forwarding Rate stability + over an extended test duration in order to uncover any outliers. To allow + for an extended test duration, the test should ideally run for 24 hours + or, if this is not possible, for at least 6 hours. For this test, each frame + size must be sent at the highest Throughput rate with X% packet loss, as determined in the prerequisite test. The default loss percentages to be tested are: - X = 0% - X = 10^-7% @@ -1270,7 +1270,7 @@ Test ID: LTD.Throughput.RFC2889.Soak The following are the metrics collected for this test: - - Throughput stability of the DUT. + - Max Forwarding Rate stability of the DUT. - This means reporting the number of packets lost per time interval and reporting any time intervals with packet loss. The @@ -1284,9 +1284,9 @@ Test ID: LTD.Throughput.RFC2889.Soak PDV form of delay variation on the traffic flow, using the 99th percentile. -Test ID: LTD.Throughput.RFC2889.SoakFrameModification +Test ID: LTD.Throughput.RFC2889.MaxForwardingRateSoakFrameModification ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - **Title**: RFC 2889 Throughput Soak Test with Frame Modification + **Title**: RFC 2889 Max Forwarding Rate Soak Test with Frame Modification **Prerequisite Test**: LTD.Throughput.RFC2544.PacketLossRatioFrameModification (0% Packet Loss) @@ -1294,11 +1294,11 @@ Test ID: LTD.Throughput.RFC2889.SoakFrameModification **Description**: - The aim of this test is to understand the throughput stability over an + The aim of this test is to understand the Max Forwarding Rate stability over an extended test duration in order to uncover any outliers. To allow for an extended test duration, the test should ideally run for 24 hours or, if this is not possible, for at least 6 hour. For this test, each frame - size must be sent at the highest Throughput with 0% packet loss, as + size must be sent at the highest Throughput rate with 0% packet loss, as determined in the prerequisite test. During this test, the DUT must perform the following operations on the @@ -1323,7 +1323,7 @@ Test ID: LTD.Throughput.RFC2889.SoakFrameModification The following are the metrics collected for this test: - - Throughput stability of the DUT. + - Max Forwarding Rate stability of the DUT. - This means reporting the number of packets lost per time interval and reporting any time intervals with packet loss. The |