test_spec: LTD: RFC.WorstN-BestN test
[vswitchperf.git] / docs / requirements / vswitchperf_ltd.rst
1
2 .. 3.1
3
4 ===============
5 Introduction
6 ===============
7
8 The objective of the OPNFV project titled
9 **“Characterize vSwitch Performance for Telco NFV Use Cases”**, is to
10 evaluate a virtual switch to identify its suitability for a Telco
11 Network Function Virtualization (NFV) environment. The intention of this
12 Level Test Design (LTD) document is to specify the set of tests to carry
13 out in order to objectively measure the current characteristics of a
14 virtual switch in the Network Function Virtualization Infrastructure
15 (NFVI) as well as the test pass criteria. The detailed test cases will
16 be defined in `Section 2 <#DetailsOfTheLevelTestDesign>`__, preceded by
17 the `Document identifier <#DocId>`__ and the `Scope <#Scope>`__.
18
19 This document is currently in draft form.
20
21 .. 3.1.1
22
23 Document identifier
24 =========================
25
26 The document id will be used to uniquely
27 identify versions of the LTD. The format for the document id will be:
28 OPNFV\_vswitchperf\_LTD\_ver\_NUM\_MONTH\_YEAR\_STATUS, where by the
29 status is one of: draft, reviewed, corrected or final. The document id
30 for this version of the LTD is:
31 OPNFV\_vswitchperf\_LTD\_ver\_1.6\_Jan\_15\_DRAFT.
32
33 .. 3.1.2
34
35 Scope
36 ==========
37
38 The main purpose of this project is to specify a suite of
39 performance tests in order to objectively measure the current packet
40 transfer characteristics of a virtual switch in the NFVI. The intent of
41 the project is to facilitate testing of any virtual switch. Thus, a
42 generic suite of tests shall be developed, with no hard dependencies to
43 a single implementation. In addition, the test case suite shall be
44 architecture independent.
45
46 The test cases developed in this project shall not form part of a
47 separate test framework, all of these tests may be inserted into the
48 Continuous Integration Test Framework and/or the Platform Functionality
49 Test Framework - if a vSwitch becomes a standard component of an OPNFV
50 release.
51
52 .. 3.1.3
53
54 References
55 ===============
56
57 *  `RFC 1242 Benchmarking Terminology for Network Interconnection
58    Devices <http://www.ietf.org/rfc/rfc1242.txt>`__
59 *  `RFC 2544 Benchmarking Methodology for Network Interconnect
60    Devices <http://www.ietf.org/rfc/rfc2544.txt>`__
61 *  `RFC 2285 Benchmarking Terminology for LAN Switching
62    Devices <http://www.ietf.org/rfc/rfc2285.txt>`__
63 *  `RFC 2889 Benchmarking Methodology for LAN Switching
64    Devices <http://www.ietf.org/rfc/rfc2889.txt>`__
65 *  `RFC 3918 Methodology for IP Multicast
66    Benchmarking <http://www.ietf.org/rfc/rfc3918.txt>`__
67 *  `RFC 4737 Packet Reordering
68    Metrics <http://www.ietf.org/rfc/rfc4737.txt>`__
69 *  `RFC 5481 Packet Delay Variation Applicability
70    Statement <http://www.ietf.org/rfc/rfc5481.txt>`__
71 *  `RFC 6201 Device Reset
72    Characterization <http://tools.ietf.org/html/rfc6201>`__
73
74 .. 3.2
75
76 ===================================
77 Details of the Level Test Design
78 ===================================
79
80 This section describes the features to be tested (
81 :ref:_FeaturesToBeTested), the test approach (:ref:_Approach);
82 it also identifies the sets of test cases or scenarios (
83 :ref:_TestIdentification) along with the pass/fail criteria and
84 the test deliverables.
85
86 .. 3.2.1
87
88 .. _FeaturesToBeTested:
89
90 Features to be tested
91 ==========================
92
93 Characterizing virtual switches (i.e. Device Under Test (DUT) in this document)
94 includes measuring the following performance metrics:
95
96 - **Throughput** as defined by `RFC1242
97   <https://www.rfc-editor.org/rfc/rfc1242.txt>`__: The maximum rate at which
98   **none** of the offered frames are dropped by the DUT. The maximum frame
99   rate and bit rate that can be transmitted by the DUT without any error
100   should be recorded. Note there is an equivalent bit rate and a specific
101   layer at which the payloads contribute to the bits. Errors and
102   improperly formed frames or packets are dropped.
103 - **Packet delay** introduced by the DUT and its cumulative effect on
104   E2E networks. Frame delay can be measured equivalently.
105 - **Packet delay variation**: measured from the perspective of the
106   VNF/application. Packet delay variation is sometimes called "jitter".
107   However, we will avoid the term "jitter" as the term holds different
108   meaning to different groups of people. In this document we will
109   simply use the term packet delay variation. The preferred form for this
110   metric is the PDV form of delay variation defined in `RFC5481
111   <https://www.rfc-editor.org/rfc/rfc5481.txt>`__. The most relevant
112   measurement of PDV considers the delay variation of a single user flow,
113   as this will be relevant to the size of end-system buffers to compensate
114   for delay variation. The measurement system's ability to store the
115   delays of individual packets in the flow of interest is a key factor
116   that determines the specific measurement method. At the outset, it is
117   ideal to view the complete PDV distribution. Systems that can capture
118   and store packets and their delays have the freedom to calculate the
119   reference minimum delay and to determine various quantiles of the PDV
120   distribution accurately (in post-measurement processing routines).
121   Systems without storage must apply algorithms to calculate delay and
122   statistical measurements on the fly. For example, a system may store
123   temporary estimates of the mimimum delay and the set of (100) packets
124   with the longest delays during measurement (to calculate a high quantile,
125   and update these sets with new values periodically.
126   In some cases, a limited number of delay histogram bins will be
127   available, and the bin limits will need to be set using results from
128   repeated experiments. See section 8 of `RFC5481
129   <https://www.rfc-editor.org/rfc/rfc5481.txt>`__.
130 - **Packet loss** (within a configured waiting time at the receiver): All
131   packets sent to the DUT should be accounted for.
132 - **Burst behaviour**: measures the ability of the DUT to buffer packets.
133 - **Packet re-ordering**: measures the ability of the device under test to
134   maintain sending order throughout transfer to the destination.
135 - **Packet correctness**: packets or Frames must be well-formed, in that
136   they include all required fields, conform to length requirements, pass
137   integrity checks, etc.
138 - **Availability and capacity** of the DUT i.e. when the DUT is fully “up”
139   and connected, following measurements should be captured for
140   DUT without any network packet load:
141
142   - Includes average power consumption of the CPUs (in various power states) and
143     system over specified period of time. Time period should not be less
144     than 60 seconds.
145   - Includes average per core CPU utilization over specified period of time.
146     Time period should not be less than 60 seconds.
147   - Includes the number of NIC interfaces supported.
148   - Includes headroom of VM workload processing cores (i.e. available
149     for applications).
150
151 .. 3.2.2
152
153 .. _Approach:
154
155 Approach
156 ==============
157
158 In order to determine the packet transfer characteristics of a virtual
159 switch, the tests will be broken down into the following categories:
160
161 .. 3.2.2.1
162
163 Test Categories
164 ----------------------
165 - **Throughput Tests** to measure the maximum forwarding rate (in
166   frames per second or fps) and bit rate (in Mbps) for a constant load
167   (as defined by `RFC1242 <https://www.rfc-editor.org/rfc/rfc1242.txt>`__)
168   without traffic loss.
169 - **Packet and Frame Delay Tests** to measure average, min and max
170   packet and frame delay for constant loads.
171 - **Stream Performance Tests** (TCP, UDP) to measure bulk data transfer
172   performance, i.e. how fast systems can send and receive data through
173   the virtual switch.
174 - **Request/Response Performance** Tests (TCP, UDP) the measure the
175   transaction rate through the virtual switch.
176 - **Packet Delay Tests** to understand latency distribution for
177   different packet sizes and over an extended test run to uncover
178   outliers.
179 - **Scalability Tests** to understand how the virtual switch performs
180   as the number of flows, active ports, complexity of the forwarding
181   logic's configuration... it has to deal with increases.
182 - **Control Path and Datapath Coupling** Tests, to understand how
183   closely coupled the datapath and the control path are as well as the
184   effect of this coupling on the performance of the DUT.
185 - **CPU and Memory Consumption Tests** to understand the virtual
186   switch’s footprint on the system, this includes:
187
188   * CPU core utilization.
189   * CPU cache utilization.
190   * Memory footprint.
191   * System bus (QPI, PCI, ..) utilization.
192   * Memory lanes utilization.
193   * CPU cycles consumed per packet.
194   * Time To Establish Flows Tests.
195
196 - **Noisy Neighbour Tests**, to understand the effects of resource
197   sharing on the performance of a virtual switch.
198
199 **Note:** some of the tests above can be conducted simultaneously where
200 the combined results would be insightful, for example Packet/Frame Delay
201 and Scalability.
202
203 .. 3.2.2.2
204
205 Deployment Scenarios
206 --------------------------
207 The following represents possible deployment test scenarios which can
208 help to determine the performance of both the virtual switch and the
209 datapaths to physical ports (to NICs) and to logical ports (to VNFs):
210
211 .. 3.2.2.2.1
212
213 Physical port → vSwitch → physical port
214 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
215 .. code-block:: console
216
217                                                             _
218        +--------------------------------------------------+  |
219        |              +--------------------+              |  |
220        |              |                    |              |  |
221        |              |                    v              |  |  Host
222        |   +--------------+            +--------------+   |  |
223        |   |   phy port   |  vSwitch   |   phy port   |   |  |
224        +---+--------------+------------+--------------+---+ _|
225                   ^                           :
226                   |                           |
227                   :                           v
228        +--------------------------------------------------+
229        |                                                  |
230        |                traffic generator                 |
231        |                                                  |
232        +--------------------------------------------------+
233
234 .. 3.2.2.2.2
235
236 Physical port → vSwitch → VNF → vSwitch → physical port
237 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
238 .. code-block:: console
239
240                                                              _
241        +---------------------------------------------------+  |
242        |                                                   |  |
243        |   +-------------------------------------------+   |  |
244        |   |                 Application               |   |  |
245        |   +-------------------------------------------+   |  |
246        |       ^                                  :        |  |
247        |       |                                  |        |  |  Guest
248        |       :                                  v        |  |
249        |   +---------------+           +---------------+   |  |
250        |   | logical port 0|           | logical port 1|   |  |
251        +---+---------------+-----------+---------------+---+ _|
252                ^                                  :
253                |                                  |
254                :                                  v         _
255        +---+---------------+----------+---------------+---+  |
256        |   | logical port 0|          | logical port 1|   |  |
257        |   +---------------+          +---------------+   |  |
258        |       ^                                  :       |  |
259        |       |                                  |       |  |  Host
260        |       :                                  v       |  |
261        |   +--------------+            +--------------+   |  |
262        |   |   phy port   |  vSwitch   |   phy port   |   |  |
263        +---+--------------+------------+--------------+---+ _|
264                   ^                           :
265                   |                           |
266                   :                           v
267        +--------------------------------------------------+
268        |                                                  |
269        |                traffic generator                 |
270        |                                                  |
271        +--------------------------------------------------+
272
273 .. 3.2.2.2.3
274
275 Physical port → vSwitch → VNF → vSwitch → VNF → vSwitch → physical port
276 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
277
278 .. code-block:: console
279
280                                                        _
281     +----------------------+  +----------------------+  |
282     |   Guest 1            |  |   Guest 2            |  |
283     |   +---------------+  |  |   +---------------+  |  |
284     |   |  Application  |  |  |   |  Application  |  |  |
285     |   +---------------+  |  |   +---------------+  |  |
286     |       ^       |      |  |       ^       |      |  |
287     |       |       v      |  |       |       v      |  |  Guests
288     |   +---------------+  |  |   +---------------+  |  |
289     |   | logical ports |  |  |   | logical ports |  |  |
290     |   |   0       1   |  |  |   |   0       1   |  |  |
291     +---+---------------+--+  +---+---------------+--+ _|
292             ^       :                 ^       :
293             |       |                 |       |
294             :       v                 :       v        _
295     +---+---------------+---------+---------------+--+  |
296     |   |   0       1   |         |   3       4   |  |  |
297     |   | logical ports |         | logical ports |  |  |
298     |   +---------------+         +---------------+  |  |
299     |       ^       |                 ^       |      |  |  Host
300     |       |       L-----------------+       v      |  |
301     |   +--------------+          +--------------+   |  |
302     |   |   phy ports  | vSwitch  |   phy ports  |   |  |
303     +---+--------------+----------+--------------+---+ _|
304             ^       ^                 :       :
305             |       |                 |       |
306             :       :                 v       v
307     +--------------------------------------------------+
308     |                                                  |
309     |                traffic generator                 |
310     |                                                  |
311     +--------------------------------------------------+
312
313 .. 3.2.2.2.4
314
315 Physical port → VNF → vSwitch → VNF → physical port
316 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
317
318 .. code-block:: console
319
320                                                         _
321     +----------------------+  +----------------------+   |
322     |   Guest 1            |  |   Guest 2            |   |
323     |+-------------------+ |  | +-------------------+|   |
324     ||     Application   | |  | |     Application   ||   |
325     |+-------------------+ |  | +-------------------+|   |
326     |       ^       |      |  |       ^       |      |   |  Guests
327     |       |       v      |  |       |       v      |   |
328     |+-------------------+ |  | +-------------------+|   |
329     ||   logical ports   | |  | |   logical ports   ||   |
330     ||  0              1 | |  | | 0              1  ||   |
331     ++--------------------++  ++--------------------++  _|
332         ^              :          ^              :
333     (PCI passthrough)  |          |     (PCI passthrough)
334         |              v          :              |      _
335     +--------++------------+-+------------++---------+   |
336     |   |    ||        0   | |    1       ||     |   |   |
337     |   |    ||logical port| |logical port||     |   |   |
338     |   |    |+------------+ +------------+|     |   |   |
339     |   |    |     |                 ^     |     |   |   |
340     |   |    |     L-----------------+     |     |   |   |
341     |   |    |                             |     |   |   |  Host
342     |   |    |           vSwitch           |     |   |   |
343     |   |    +-----------------------------+     |   |   |
344     |   |                                        |   |   |
345     |   |                                        v   |   |
346     | +--------------+              +--------------+ |   |
347     | | phy port/VF  |              | phy port/VF  | |   |
348     +-+--------------+--------------+--------------+-+  _|
349         ^                                        :
350         |                                        |
351         :                                        v
352     +--------------------------------------------------+
353     |                                                  |
354     |                traffic generator                 |
355     |                                                  |
356     +--------------------------------------------------+
357
358 .. 3.2.2.2.5
359
360 Physical port → vSwitch → VNF
361 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
362
363 .. code-block:: console
364
365                                                           _
366     +---------------------------------------------------+  |
367     |                                                   |  |
368     |   +-------------------------------------------+   |  |
369     |   |                 Application               |   |  |
370     |   +-------------------------------------------+   |  |
371     |       ^                                           |  |
372     |       |                                           |  |  Guest
373     |       :                                           |  |
374     |   +---------------+                               |  |
375     |   | logical port 0|                               |  |
376     +---+---------------+-------------------------------+ _|
377             ^
378             |
379             :                                            _
380     +---+---------------+------------------------------+  |
381     |   | logical port 0|                              |  |
382     |   +---------------+                              |  |
383     |       ^                                          |  |
384     |       |                                          |  |  Host
385     |       :                                          |  |
386     |   +--------------+                               |  |
387     |   |   phy port   |  vSwitch                      |  |
388     +---+--------------+------------ -------------- ---+ _|
389                ^
390                |
391                :
392     +--------------------------------------------------+
393     |                                                  |
394     |                traffic generator                 |
395     |                                                  |
396     +--------------------------------------------------+
397
398 .. 3.2.2.2.6
399
400 VNF → vSwitch → physical port
401 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
402
403 .. code-block:: console
404
405                                                           _
406     +---------------------------------------------------+  |
407     |                                                   |  |
408     |   +-------------------------------------------+   |  |
409     |   |                 Application               |   |  |
410     |   +-------------------------------------------+   |  |
411     |                                          :        |  |
412     |                                          |        |  |  Guest
413     |                                          v        |  |
414     |                               +---------------+   |  |
415     |                               | logical port  |   |  |
416     +-------------------------------+---------------+---+ _|
417                                                :
418                                                |
419                                                v         _
420     +------------------------------+---------------+---+  |
421     |                              | logical port  |   |  |
422     |                              +---------------+   |  |
423     |                                          :       |  |
424     |                                          |       |  |  Host
425     |                                          v       |  |
426     |                               +--------------+   |  |
427     |                     vSwitch   |   phy port   |   |  |
428     +-------------------------------+--------------+---+ _|
429                                            :
430                                            |
431                                            v
432     +--------------------------------------------------+
433     |                                                  |
434     |                traffic generator                 |
435     |                                                  |
436     +--------------------------------------------------+
437
438 .. 3.2.2.2.7
439
440 VNF → vSwitch → VNF → vSwitch
441 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
442
443 .. code-block:: console
444
445                                                              _
446     +-------------------------+  +-------------------------+  |
447     |   Guest 1               |  |   Guest 2               |  |
448     |   +-----------------+   |  |   +-----------------+   |  |
449     |   |   Application   |   |  |   |   Application   |   |  |
450     |   +-----------------+   |  |   +-----------------+   |  |
451     |                :        |  |       ^                 |  |
452     |                |        |  |       |                 |  |  Guest
453     |                v        |  |       :                 |  |
454     |     +---------------+   |  |   +---------------+     |  |
455     |     | logical port 0|   |  |   | logical port 0|     |  |
456     +-----+---------------+---+  +---+---------------+-----+ _|
457                     :                    ^
458                     |                    |
459                     v                    :                    _
460     +----+---------------+------------+---------------+-----+  |
461     |    |     port 0    |            |     port 1    |     |  |
462     |    +---------------+            +---------------+     |  |
463     |              :                    ^                   |  |
464     |              |                    |                   |  |  Host
465     |              +--------------------+                   |  |
466     |                                                       |  |
467     |                     vswitch                           |  |
468     +-------------------------------------------------------+ _|
469
470 .. 3.2.2.2.8
471
472 HOST 1(Physical port → virtual switch → VNF → virtual switch → Physical port)
473 → HOST 2(Physical port → virtual switch → VNF → virtual switch → Physical port)
474
475 HOST 1 (PVP) → HOST 2 (PVP)
476 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
477
478 .. code-block:: console
479
480                                                        _
481     +----------------------+  +----------------------+  |
482     |   Guest 1            |  |   Guest 2            |  |
483     |   +---------------+  |  |   +---------------+  |  |
484     |   |  Application  |  |  |   |  Application  |  |  |
485     |   +---------------+  |  |   +---------------+  |  |
486     |       ^       |      |  |       ^       |      |  |
487     |       |       v      |  |       |       v      |  |  Guests
488     |   +---------------+  |  |   +---------------+  |  |
489     |   | logical ports |  |  |   | logical ports |  |  |
490     |   |   0       1   |  |  |   |   0       1   |  |  |
491     +---+---------------+--+  +---+---------------+--+ _|
492             ^       :                 ^       :
493             |       |                 |       |
494             :       v                 :       v        _
495     +---+---------------+--+  +---+---------------+--+  |
496     |   |   0       1   |  |  |   |   3       4   |  |  |
497     |   | logical ports |  |  |   | logical ports |  |  |
498     |   +---------------+  |  |   +---------------+  |  |
499     |       ^       |      |  |       ^       |      |  |  Hosts
500     |       |       v      |  |       |       v      |  |
501     |   +--------------+   |  |   +--------------+   |  |
502     |   |   phy ports  |   |  |   |   phy ports  |   |  |
503     +---+--------------+---+  +---+--------------+---+ _|
504             ^       :                 :       :
505             |       +-----------------+       |
506             :                                 v
507     +--------------------------------------------------+
508     |                                                  |
509     |                traffic generator                 |
510     |                                                  |
511     +--------------------------------------------------+
512
513
514
515 **Note:** For tests where the traffic generator and/or measurement
516 receiver are implemented on VM and connected to the virtual switch
517 through vNIC, the issues of shared resources and interactions between
518 the measurement devices and the device under test must be considered.
519
520 **Note:** Some RFC 2889 tests require a full-mesh sending and receiving
521 pattern involving more than two ports. This possibility is illustrated in the
522 Physical port → vSwitch → VNF → vSwitch → VNF → vSwitch → physical port
523 diagram above (with 2 sending and 2 receiving ports, though all ports
524 could be used bi-directionally).
525
526 **Note:** When Deployment Scenarios are used in RFC 2889 address learning
527 or cache capacity testing, an additional port from the vSwitch must be
528 connected to the test device. This port is used to listen for flooded
529 frames.
530
531 .. 3.2.2.3
532
533 General Methodology:
534 --------------------------
535 To establish the baseline performance of the virtual switch, tests would
536 initially be run with a simple workload in the VNF (the recommended
537 simple workload VNF would be `DPDK <http://www.dpdk.org/>`__'s testpmd
538 application forwarding packets in a VM or vloop\_vnf a simple kernel
539 module that forwards traffic between two network interfaces inside the
540 virtualized environment while bypassing the networking stack).
541 Subsequently, the tests would also be executed with a real Telco
542 workload running in the VNF, which would exercise the virtual switch in
543 the context of higher level Telco NFV use cases, and prove that its
544 underlying characteristics and behaviour can be measured and validated.
545 Suitable real Telco workload VNFs are yet to be identified.
546
547 .. 3.2.2.3.1
548
549 Default Test Parameters
550 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
551
552 The following list identifies the default parameters for suite of
553 tests:
554
555 -  Reference application: Simple forwarding or Open Source VNF.
556 -  Frame size (bytes): 64, 128, 256, 512, 1024, 1280, 1518, 2K, 4k OR
557    Packet size based on use-case (e.g. RTP 64B, 256B) OR Mix of packet sizes as
558    maintained by the Functest project <https://wiki.opnfv.org/traffic_profile_management>.
559 -  Reordering check: Tests should confirm that packets within a flow are
560    not reordered.
561 -  Duplex: Unidirectional / Bidirectional. Default: Full duplex with
562    traffic transmitting in both directions, as network traffic generally
563    does not flow in a single direction. By default the data rate of
564    transmitted traffic should be the same in both directions, please
565    note that asymmetric traffic (e.g. downlink-heavy) tests will be
566    mentioned explicitly for the relevant test cases.
567 -  Number of Flows: Default for non scalability tests is a single flow.
568    For scalability tests the goal is to test with maximum supported
569    flows but where possible will test up to 10 Million flows. Start with
570    a single flow and scale up. By default flows should be added
571    sequentially, tests that add flows simultaneously will explicitly
572    call out their flow addition behaviour. Packets are generated across
573    the flows uniformly with no burstiness. For multi-core tests should
574    consider the number of packet flows based on vSwitch/VNF multi-thread
575    implementation and behavior.
576
577 -  Traffic Types: UDP, SCTP, RTP, GTP and UDP traffic.
578 -  Deployment scenarios are:
579 -  Physical → virtual switch → physical.
580 -  Physical → virtual switch → VNF → virtual switch → physical.
581 -  Physical → virtual switch → VNF → virtual switch → VNF → virtual
582    switch → physical.
583 -  Physical → VNF → virtual switch → VNF → physical.
584 -  Physical → virtual switch → VNF.
585 -  VNF → virtual switch → Physical.
586 -  VNF → virtual switch → VNF.
587
588 Tests MUST have these parameters unless otherwise stated. **Test cases
589 with non default parameters will be stated explicitly**.
590
591 **Note**: For throughput tests unless stated otherwise, test
592 configurations should ensure that traffic traverses the installed flows
593 through the virtual switch, i.e. flows are installed and have an appropriate
594 time out that doesn't expire before packet transmission starts.
595
596 .. 3.2.2.3.2
597
598 Flow Classification
599 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
600
601 Virtual switches classify packets into flows by processing and matching
602 particular header fields in the packet/frame and/or the input port where
603 the packets/frames arrived. The vSwitch then carries out an action on
604 the group of packets that match the classification parameters. Thus a
605 flow is considered to be a sequence of packets that have a shared set of
606 header field values or have arrived on the same port and have the same
607 action applied to them. Performance results can vary based on the
608 parameters the vSwitch uses to match for a flow. The recommended flow
609 classification parameters for L3 vSwitch performance tests are: the
610 input port, the source IP address, the destination IP address and the
611 Ethernet protocol type field. It is essential to increase the flow
612 time-out time on a vSwitch before conducting any performance tests that
613 do not measure the flow set-up time. Normally the first packet of a
614 particular flow will install the flow in the vSwitch which adds an
615 additional latency, subsequent packets of the same flow are not subject
616 to this latency if the flow is already installed on the vSwitch.
617
618 .. 3.2.2.3.3
619
620 Test Priority
621 ~~~~~~~~~~~~~~~~~~~~~
622
623 Tests will be assigned a priority in order to determine which tests
624 should be implemented immediately and which tests implementations
625 can be deferred.
626
627 Priority can be of following types: - Urgent: Must be implemented
628 immediately. - High: Must be implemented in the next release. - Medium:
629 May be implemented after the release. - Low: May or may not be
630 implemented at all.
631
632 .. 3.2.2.3.4
633
634 SUT Setup
635 ~~~~~~~~~~~~~~~~~~
636
637 The SUT should be configured to its "default" state. The
638 SUT's configuration or set-up must not change between tests in any way
639 other than what is required to do the test. All supported protocols must
640 be configured and enabled for each test set up.
641
642 .. 3.2.2.3.5
643
644 Port Configuration
645 ~~~~~~~~~~~~~~~~~~~~~~~~~~
646
647 The DUT should be configured with n ports where
648 n is a multiple of 2. Half of the ports on the DUT should be used as
649 ingress ports and the other half of the ports on the DUT should be used
650 as egress ports. Where a DUT has more than 2 ports, the ingress data
651 streams should be set-up so that they transmit packets to the egress
652 ports in sequence so that there is an even distribution of traffic
653 across ports. For example, if a DUT has 4 ports 0(ingress), 1(ingress),
654 2(egress) and 3(egress), the traffic stream directed at port 0 should
655 output a packet to port 2 followed by a packet to port 3. The traffic
656 stream directed at port 1 should also output a packet to port 2 followed
657 by a packet to port 3.
658
659 .. 3.2.2.3.6
660
661 Frame Formats
662 ~~~~~~~~~~~~~~~~~~~~~
663
664 **Frame formats Layer 2 (data link layer) protocols**
665
666 -  Ethernet II
667
668 .. code-block:: console
669
670      +---------------------------+-----------+
671      | Ethernet Header | Payload | Check Sum |
672      +-----------------+---------+-----------+
673      |_________________|_________|___________|
674            14 Bytes     46 - 1500   4 Bytes
675                           Bytes
676
677
678 **Layer 3 (network layer) protocols**
679
680 -  IPv4
681
682 .. code-block:: console
683
684      +-----------------+-----------+---------+-----------+
685      | Ethernet Header | IP Header | Payload | Checksum  |
686      +-----------------+-----------+---------+-----------+
687      |_________________|___________|_________|___________|
688            14 Bytes       20 bytes  26 - 1480   4 Bytes
689                                       Bytes
690
691 -  IPv6
692
693 .. code-block:: console
694
695      +-----------------+-----------+---------+-----------+
696      | Ethernet Header | IP Header | Payload | Checksum  |
697      +-----------------+-----------+---------+-----------+
698      |_________________|___________|_________|___________|
699            14 Bytes       40 bytes  26 - 1460   4 Bytes
700                                       Bytes
701
702 **Layer 4 (transport layer) protocols**
703
704   - TCP
705   - UDP
706   - SCTP
707
708 .. code-block:: console
709
710      +-----------------+-----------+-----------------+---------+-----------+
711      | Ethernet Header | IP Header | Layer 4 Header  | Payload | Checksum  |
712      +-----------------+-----------+-----------------+---------+-----------+
713      |_________________|___________|_________________|_________|___________|
714            14 Bytes      40 bytes      20 Bytes       6 - 1460   4 Bytes
715                                                        Bytes
716
717
718 **Layer 5 (application layer) protocols**
719
720   - RTP
721   - GTP
722
723 .. code-block:: console
724
725      +-----------------+-----------+-----------------+---------+-----------+
726      | Ethernet Header | IP Header | Layer 4 Header  | Payload | Checksum  |
727      +-----------------+-----------+-----------------+---------+-----------+
728      |_________________|___________|_________________|_________|___________|
729            14 Bytes      20 bytes     20 Bytes        >= 6 Bytes   4 Bytes
730
731 .. 3.2.2.3.7
732
733 Packet Throughput
734 ~~~~~~~~~~~~~~~~~~~~~~~~~
735 There is a difference between an Ethernet frame,
736 an IP packet, and a UDP datagram. In the seven-layer OSI model of
737 computer networking, packet refers to a data unit at layer 3 (network
738 layer). The correct term for a data unit at layer 2 (data link layer) is
739 a frame, and at layer 4 (transport layer) is a segment or datagram.
740
741 Important concepts related to 10GbE performance are frame rate and
742 throughput. The MAC bit rate of 10GbE, defined in the IEEE standard 802
743 .3ae, is 10 billion bits per second. Frame rate is based on the bit rate
744 and frame format definitions. Throughput, defined in IETF RFC 1242, is
745 the highest rate at which the system under test can forward the offered
746 load, without loss.
747
748 The frame rate for 10GbE is determined by a formula that divides the 10
749 billion bits per second by the preamble + frame length + inter-frame
750 gap.
751
752 The maximum frame rate is calculated using the minimum values of the
753 following parameters, as described in the IEEE 802 .3ae standard:
754
755 -  Preamble: 8 bytes \* 8 = 64 bits
756 -  Frame Length: 64 bytes (minimum) \* 8 = 512 bits
757 -  Inter-frame Gap: 12 bytes (minimum) \* 8 = 96 bits
758
759 Therefore, Maximum Frame Rate (64B Frames)
760 = MAC Transmit Bit Rate / (Preamble + Frame Length + Inter-frame Gap)
761 = 10,000,000,000 / (64 + 512 + 96)
762 = 10,000,000,000 / 672
763 = 14,880,952.38 frame per second (fps)
764
765 .. 3.2.2.3.8
766
767 System isolation and validation
768 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
769
770 A key consideration when conducting any sort of benchmark is trying to
771 ensure the consistency and repeatability of test results between runs.
772 When benchmarking the performance of a virtual switch there are many
773 factors that can affect the consistency of results. This section
774 describes these factors and the measures that can be taken to limit
775 their effects. In addition, this section will outline some system tests
776 to validate the platform and the VNF before conducting any vSwitch
777 benchmarking tests.
778
779 **System Isolation:**
780
781 When conducting a benchmarking test on any SUT, it is essential to limit
782 (and if reasonable, eliminate) any noise that may interfere with the
783 accuracy of the metrics collected by the test. This noise may be
784 introduced by other hardware or software (OS, other applications), and
785 can result in significantly varying performance metrics being collected
786 between consecutive runs of the same test. In the case of characterizing
787 the performance of a virtual switch, there are a number of configuration
788 parameters that can help increase the repeatability and stability of
789 test results, including:
790
791 -  OS/GRUB configuration:
792
793    -  maxcpus = n where n >= 0; limits the kernel to using 'n'
794       processors. Only use exactly what you need.
795    -  isolcpus: Isolate CPUs from the general scheduler. Isolate all
796       CPUs bar one which will be used by the OS.
797    -  use taskset to affinitize the forwarding application and the VNFs
798       onto isolated cores. VNFs and the vSwitch should be allocated
799       their own cores, i.e. must not share the same cores. vCPUs for the
800       VNF should be affinitized to individual cores also.
801    -  Limit the amount of background applications that are running and
802       set OS to boot to runlevel 3. Make sure to kill any unnecessary
803       system processes/daemons.
804    -  Only enable hardware that you need to use for your test – to
805       ensure there are no other interrupts on the system.
806    -  Configure NIC interrupts to only use the cores that are not
807       allocated to any other process (VNF/vSwitch).
808
809 -  NUMA configuration: Any unused sockets in a multi-socket system
810    should be disabled.
811 -  CPU pinning: The vSwitch and the VNF should each be affinitized to
812    separate logical cores using a combination of maxcpus, isolcpus and
813    taskset.
814 -  BIOS configuration: BIOS should be configured for performance where
815    an explicit option exists, sleep states should be disabled, any
816    virtualization optimization technologies should be enabled, and
817    hyperthreading should also be enabled, turbo boost and overclocking
818    should be disabled.
819
820 **System Validation:**
821
822 System validation is broken down into two sub-categories: Platform
823 validation and VNF validation. The validation test itself involves
824 verifying the forwarding capability and stability for the sub-system
825 under test. The rationale behind system validation is two fold. Firstly
826 to give a tester confidence in the stability of the platform or VNF that
827 is being tested; and secondly to provide base performance comparison
828 points to understand the overhead introduced by the virtual switch.
829
830 * Benchmark platform forwarding capability: This is an OPTIONAL test
831   used to verify the platform and measure the base performance (maximum
832   forwarding rate in fps and latency) that can be achieved by the
833   platform without a vSwitch or a VNF. The following diagram outlines
834   the set-up for benchmarking Platform forwarding capability:
835
836   .. code-block:: console
837
838                                                             __
839        +--------------------------------------------------+   |
840        |   +------------------------------------------+   |   |
841        |   |                                          |   |   |
842        |   |          l2fw or DPDK L2FWD app          |   |  Host
843        |   |                                          |   |   |
844        |   +------------------------------------------+   |   |
845        |   |                 NIC                      |   |   |
846        +---+------------------------------------------+---+ __|
847                   ^                           :
848                   |                           |
849                   :                           v
850        +--------------------------------------------------+
851        |                                                  |
852        |                traffic generator                 |
853        |                                                  |
854        +--------------------------------------------------+
855
856 * Benchmark VNF forwarding capability: This test is used to verify
857   the VNF and measure the base performance (maximum forwarding rate in
858   fps and latency) that can be achieved by the VNF without a vSwitch.
859   The performance metrics collected by this test will serve as a key
860   comparison point for NIC passthrough technologies and vSwitches. VNF
861   in this context refers to the hypervisor and the VM. The following
862   diagram outlines the set-up for benchmarking VNF forwarding
863   capability:
864
865   .. code-block:: console
866
867                                                             __
868        +--------------------------------------------------+   |
869        |   +------------------------------------------+   |   |
870        |   |                                          |   |   |
871        |   |                 VNF                      |   |   |
872        |   |                                          |   |   |
873        |   +------------------------------------------+   |   |
874        |   |          Passthrough/SR-IOV              |   |  Host
875        |   +------------------------------------------+   |   |
876        |   |                 NIC                      |   |   |
877        +---+------------------------------------------+---+ __|
878                   ^                           :
879                   |                           |
880                   :                           v
881        +--------------------------------------------------+
882        |                                                  |
883        |                traffic generator                 |
884        |                                                  |
885        +--------------------------------------------------+
886
887
888 **Methodology to benchmark Platform/VNF forwarding capability**
889
890
891 The recommended methodology for the platform/VNF validation and
892 benchmark is: - Run `RFC2889 <https://www.rfc-editor.org/rfc/rfc2289.txt>`__
893 Maximum Forwarding Rate test, this test will produce maximum
894 forwarding rate and latency results that will serve as the
895 expected values. These expected values can be used in
896 subsequent steps or compared with in subsequent validation tests. -
897 Transmit bidirectional traffic at line rate/max forwarding rate
898 (whichever is higher) for at least 72 hours, measure throughput (fps)
899 and latency. - Note: Traffic should be bidirectional. - Establish a
900 baseline forwarding rate for what the platform can achieve. - Additional
901 validation: After the test has completed for 72 hours run bidirectional
902 traffic at the maximum forwarding rate once more to see if the system is
903 still functional and measure throughput (fps) and latency. Compare the
904 measure the new obtained values with the expected values.
905
906 **NOTE 1**: How the Platform is configured for its forwarding capability
907 test (BIOS settings, GRUB configuration, runlevel...) is how the
908 platform should be configured for every test after this
909
910 **NOTE 2**: How the VNF is configured for its forwarding capability test
911 (# of vCPUs, vNICs, Memory, affinitization…) is how it should be
912 configured for every test that uses a VNF after this.
913
914 .. 3.2.2.4
915
916 RFCs for testing virtual switch performance
917 --------------------------------------------------
918
919 The starting point for defining the suite of tests for benchmarking the
920 performance of a virtual switch is to take existing RFCs and standards
921 that were designed to test their physical counterparts and adapting them
922 for testing virtual switches. The rationale behind this is to establish
923 a fair comparison between the performance of virtual and physical
924 switches. This section outlines the RFCs that are used by this
925 specification.
926
927 .. 3.2.2.4.1
928
929 RFC 1242 Benchmarking Terminology for Network Interconnection
930 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
931 Devices RFC 1242 defines the terminology that is used in describing
932 performance benchmarking tests and their results. Definitions and
933 discussions covered include: Back-to-back, bridge, bridge/router,
934 constant load, data link frame size, frame loss rate, inter frame gap,
935 latency, and many more.
936
937 .. 3.2.2.4.2
938
939 RFC 2544 Benchmarking Methodology for Network Interconnect Devices
940 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
941 RFC 2544 outlines a benchmarking methodology for network Interconnect
942 Devices. The methodology results in performance metrics such as latency,
943 frame loss percentage, and maximum data throughput.
944
945 In this document network “throughput” (measured in millions of frames
946 per second) is based on RFC 2544, unless otherwise noted. Frame size
947 refers to Ethernet frames ranging from smallest frames of 64 bytes to
948 largest frames of 9K bytes.
949
950 Types of tests are:
951
952 1. Throughput test defines the maximum number of frames per second
953    that can be transmitted without any error.
954
955 2. Latency test measures the time required for a frame to travel from
956    the originating device through the network to the destination device.
957    Please note that RFC2544 Latency measurement will be superseded with
958    a measurement of average latency over all successfully transferred
959    packets or frames.
960
961 3. Frame loss test measures the network’s
962    response in overload conditions - a critical indicator of the
963    network’s ability to support real-time applications in which a
964    large amount of frame loss will rapidly degrade service quality.
965
966 4. Burst test assesses the buffering capability of a virtual switch. It
967    measures the maximum number of frames received at full line rate
968    before a frame is lost. In carrier Ethernet networks, this
969    measurement validates the excess information rate (EIR) as defined in
970    many SLAs.
971
972 5. System recovery to characterize speed of recovery from an overload
973    condition.
974
975 6. Reset to characterize speed of recovery from device or software
976    reset. This type of test has been updated by `RFC6201
977    <https://www.rfc-editor.org/rfc/rfc6201.txt>`__ as such,
978    the methodology defined by this specification will be that of RFC 6201.
979
980 Although not included in the defined RFC 2544 standard, another crucial
981 measurement in Ethernet networking is packet delay variation. The
982 definition set out by this specification comes from
983 `RFC5481 <https://www.rfc-editor.org/rfc/rfc5481.txt>`__.
984
985 .. 3.2.2.4.3
986
987 RFC 2285 Benchmarking Terminology for LAN Switching Devices
988 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
989 RFC 2285 defines the terminology that is used to describe the
990 terminology for benchmarking a LAN switching device. It extends RFC
991 1242 and defines: DUTs, SUTs, Traffic orientation and distribution,
992 bursts, loads, forwarding rates, etc.
993
994 .. 3.2.2.4.4
995
996 RFC 2889 Benchmarking Methodology for LAN Switching
997 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
998 RFC 2889 outlines a benchmarking methodology for LAN switching, it
999 extends RFC 2544. The outlined methodology gathers performance
1000 metrics for forwarding, congestion control, latency, address handling
1001 and finally filtering.
1002
1003 .. 3.2.2.4.5
1004
1005 RFC 3918 Methodology for IP Multicast Benchmarking
1006 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1007 RFC 3918 outlines a methodology for IP Multicast benchmarking.
1008
1009 .. 3.2.2.4.6
1010
1011 RFC 4737 Packet Reordering Metrics
1012 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1013 RFC 4737 describes metrics for identifying and counting re-ordered
1014 packets within a stream, and metrics to measure the extent each
1015 packet has been re-ordered.
1016
1017 .. 3.2.2.4.7
1018
1019 RFC 5481 Packet Delay Variation Applicability Statement
1020 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1021 RFC 5481 defined two common, but different forms of delay variation
1022 metrics, and compares the metrics over a range of networking
1023 circumstances and tasks. The most suitable form for vSwitch
1024 benchmarking is the "PDV" form.
1025
1026 .. 3.2.2.4.8
1027
1028 RFC 6201 Device Reset Characterization
1029 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1030 RFC 6201 extends the methodology for characterizing the speed of
1031 recovery of the DUT from device or software reset described in RFC
1032 2544.
1033
1034 .. 3.2.2.5
1035
1036 Details of the Test Report
1037 ---------------------------------
1038
1039 There are a number of parameters related to the system, DUT and tests
1040 that can affect the repeatability of a test results and should be
1041 recorded. In order to minimise the variation in the results of a test,
1042 it is recommended that the test report includes the following information:
1043
1044 -  Hardware details including:
1045
1046    -  Platform details.
1047    -  Processor details.
1048    -  Memory information (see below)
1049    -  Number of enabled cores.
1050    -  Number of cores used for the test.
1051    -  Number of physical NICs, as well as their details (manufacturer,
1052       versions, type and the PCI slot they are plugged into).
1053    -  NIC interrupt configuration.
1054    -  BIOS version, release date and any configurations that were
1055       modified.
1056
1057 -  Software details including:
1058
1059    -  OS version (for host and VNF)
1060    -  Kernel version (for host and VNF)
1061    -  GRUB boot parameters (for host and VNF).
1062    -  Hypervisor details (Type and version).
1063    -  Selected vSwitch, version number or commit id used.
1064    -  vSwitch launch command line if it has been parameterised.
1065    -  Memory allocation to the vSwitch – which NUMA node it is using,
1066       and how many memory channels.
1067    -  Where the vswitch is built from source: compiler details including
1068       versions and the flags that were used to compile the vSwitch.
1069    -  DPDK or any other SW dependency version number or commit id used.
1070    -  Memory allocation to a VM - if it's from Hugpages/elsewhere.
1071    -  VM storage type: snapshot/independent persistent/independent
1072       non-persistent.
1073    -  Number of VMs.
1074    -  Number of Virtual NICs (vNICs), versions, type and driver.
1075    -  Number of virtual CPUs and their core affinity on the host.
1076    -  Number vNIC interrupt configuration.
1077    -  Thread affinitization for the applications (including the vSwitch
1078       itself) on the host.
1079    -  Details of Resource isolation, such as CPUs designated for
1080       Host/Kernel (isolcpu) and CPUs designated for specific processes
1081       (taskset).
1082
1083 -  Memory Details
1084
1085    -  Total memory
1086    -  Type of memory
1087    -  Used memory
1088    -  Active memory
1089    -  Inactive memory
1090    -  Free memory
1091    -  Buffer memory
1092    -  Swap cache
1093    -  Total swap
1094    -  Used swap
1095    -  Free swap
1096
1097 -  Test duration.
1098 -  Number of flows.
1099 -  Traffic Information:
1100
1101    -  Traffic type - UDP, TCP, IMIX / Other.
1102    -  Packet Sizes.
1103
1104 -  Deployment Scenario.
1105
1106 **Note**: Tests that require additional parameters to be recorded will
1107 explicitly specify this.
1108
1109 .. _TestIdentification:
1110
1111 .. 3.2.3
1112
1113 Test identification
1114 =========================
1115
1116 .. 3.2.3.1
1117
1118 Throughput tests
1119 ----------------------
1120 The following tests aim to determine the maximum forwarding rate that
1121 can be achieved with a virtual switch. The list is not exhaustive but
1122 should indicate the type of tests that should be required. It is
1123 expected that more will be added.
1124
1125 .. 3.2.3.1.1
1126
1127 Test ID: LTD.Throughput.RFC2544.PacketLossRatio
1128 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1129     **Title**: RFC 2544 X% packet loss ratio Throughput and Latency Test
1130
1131     **Prerequisite Test**: N/A
1132
1133     **Priority**:
1134
1135     **Description**:
1136
1137     This test determines the DUT's maximum forwarding rate with X% traffic
1138     loss for a constant load (fixed length frames at a fixed interval time).
1139     The default loss percentages to be tested are: - X = 0% - X = 10^-7%
1140
1141     Note: Other values can be tested if required by the user.
1142
1143     The selected frame sizes are those previously defined under `Default
1144     Test Parameters <#DefaultParams>`__. The test can also be used to
1145     determine the average latency of the traffic.
1146
1147     Under the `RFC2544 <https://www.rfc-editor.org/rfc/rfc2544.txt>`__
1148     test methodology, the test duration will
1149     include a number of trials; each trial should run for a minimum period
1150     of 60 seconds. A binary search methodology must be applied for each
1151     trial to obtain the final result.
1152
1153     **Expected Result**: At the end of each trial, the presence or absence
1154     of loss determines the modification of offered load for the next trial,
1155     converging on a maximum rate, or
1156     `RFC2544 <https://www.rfc-editor.org/rfc/rfc2544.txt>`__ Throughput with X%
1157     loss.
1158     The Throughput load is re-used in related
1159     `RFC2544 <https://www.rfc-editor.org/rfc/rfc2544.txt>`__ tests and other
1160     tests.
1161
1162     **Metrics Collected**:
1163
1164     The following are the metrics collected for this test:
1165
1166     -  The maximum forwarding rate in Frames Per Second (FPS) and Mbps of
1167        the DUT for each frame size with X% packet loss.
1168     -  The average latency of the traffic flow when passing through the DUT
1169        (if testing for latency, note that this average is different from the
1170        test specified in Section 26.3 of
1171        `RFC2544 <https://www.rfc-editor.org/rfc/rfc2544.txt>`__).
1172     -  CPU and memory utilization may also be collected as part of this
1173        test, to determine the vSwitch's performance footprint on the system.
1174
1175 .. 3.2.3.1.2
1176
1177 Test ID: LTD.Throughput.RFC2544.PacketLossRatioFrameModification
1178 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1179     **Title**: RFC 2544 X% packet loss Throughput and Latency Test with
1180     packet modification
1181
1182     **Prerequisite Test**: N/A
1183
1184     **Priority**:
1185
1186     **Description**:
1187
1188     This test determines the DUT's maximum forwarding rate with X% traffic
1189     loss for a constant load (fixed length frames at a fixed interval time).
1190     The default loss percentages to be tested are: - X = 0% - X = 10^-7%
1191
1192     Note: Other values can be tested if required by the user.
1193
1194     The selected frame sizes are those previously defined under `Default
1195     Test Parameters <#DefaultParams>`__. The test can also be used to
1196     determine the average latency of the traffic.
1197
1198     Under the `RFC2544 <https://www.rfc-editor.org/rfc/rfc2544.txt>`__
1199     test methodology, the test duration will
1200     include a number of trials; each trial should run for a minimum period
1201     of 60 seconds. A binary search methodology must be applied for each
1202     trial to obtain the final result.
1203
1204     During this test, the DUT must perform the following operations on the
1205     traffic flow:
1206
1207     -  Perform packet parsing on the DUT's ingress port.
1208     -  Perform any relevant address look-ups on the DUT's ingress ports.
1209     -  Modify the packet header before forwarding the packet to the DUT's
1210        egress port. Packet modifications include:
1211
1212        -  Modifying the Ethernet source or destination MAC address.
1213        -  Modifying/adding a VLAN tag. (**Recommended**).
1214        -  Modifying/adding a MPLS tag.
1215        -  Modifying the source or destination ip address.
1216        -  Modifying the TOS/DSCP field.
1217        -  Modifying the source or destination ports for UDP/TCP/SCTP.
1218        -  Modifying the TTL.
1219
1220     **Expected Result**: The Packet parsing/modifications require some
1221     additional degree of processing resource, therefore the
1222     `RFC2544 <https://www.rfc-editor.org/rfc/rfc2544.txt>`__
1223     Throughput is expected to be somewhat lower than the Throughput level
1224     measured without additional steps. The reduction is expected to be
1225     greatest on tests with the smallest packet sizes (greatest header
1226     processing rates).
1227
1228     **Metrics Collected**:
1229
1230     The following are the metrics collected for this test:
1231
1232     -  The maximum forwarding rate in Frames Per Second (FPS) and Mbps of
1233        the DUT for each frame size with X% packet loss and packet
1234        modification operations being performed by the DUT.
1235     -  The average latency of the traffic flow when passing through the DUT
1236        (if testing for latency, note that this average is different from the
1237        test specified in Section 26.3 of
1238        `RFC2544 <https://www.rfc-editor.org/rfc/rfc2544.txt>`__).
1239     -  The `RFC5481 <https://www.rfc-editor.org/rfc/rfc5481.txt>`__
1240        PDV form of delay variation on the traffic flow,
1241        using the 99th percentile.
1242     -  CPU and memory utilization may also be collected as part of this
1243        test, to determine the vSwitch's performance footprint on the system.
1244
1245 .. 3.2.3.1.3
1246
1247 Test ID: LTD.Throughput.RFC2544.Profile
1248 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1249     **Title**: RFC 2544 Throughput and Latency Profile
1250
1251     **Prerequisite Test**: N/A
1252
1253     **Priority**:
1254
1255     **Description**:
1256
1257     This test reveals how throughput and latency degrades as the offered
1258     rate varies in the region of the DUT's maximum forwarding rate as
1259     determined by LTD.Throughput.RFC2544.PacketLossRatio (0% Packet Loss).
1260     For example it can be used to determine if the degradation of throughput
1261     and latency as the offered rate increases is slow and graceful or sudden
1262     and severe.
1263
1264     The selected frame sizes are those previously defined under `Default
1265     Test Parameters <#DefaultParams>`__.
1266
1267     The offered traffic rate is described as a percentage delta with respect
1268     to the DUT's RFC 2544 Throughput as determined by
1269     LTD.Throughput.RFC2544.PacketLoss Ratio (0% Packet Loss case). A delta
1270     of 0% is equivalent to an offered traffic rate equal to the RFC 2544
1271     Throughput; A delta of +50% indicates an offered rate half-way
1272     between the Throughput and line-rate, whereas a delta of
1273     -50% indicates an offered rate of half the maximum rate. Therefore the
1274     range of the delta figure is natuarlly bounded at -100% (zero offered
1275     traffic) and +100% (traffic offered at line rate).
1276
1277     The following deltas to the maximum forwarding rate should be applied:
1278
1279     -  -50%, -10%, 0%, +10% & +50%
1280
1281     **Expected Result**: For each packet size a profile should be produced
1282     of how throughput and latency vary with offered rate.
1283
1284     **Metrics Collected**:
1285
1286     The following are the metrics collected for this test:
1287
1288     -  The forwarding rate in Frames Per Second (FPS) and Mbps of the DUT
1289        for each delta to the maximum forwarding rate and for each frame
1290        size.
1291     -  The average latency for each delta to the maximum forwarding rate and
1292        for each frame size.
1293     -  CPU and memory utilization may also be collected as part of this
1294        test, to determine the vSwitch's performance footprint on the system.
1295     -  Any failures experienced (for example if the vSwitch crashes, stops
1296        processing packets, restarts or becomes unresponsive to commands)
1297        when the offered load is above Maximum Throughput MUST be recorded
1298        and reported with the results.
1299
1300 .. 3.2.3.1.4
1301
1302 Test ID: LTD.Throughput.RFC2544.SystemRecoveryTime
1303 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1304     **Title**: RFC 2544 System Recovery Time Test
1305
1306     **Prerequisite Test** LTD.Throughput.RFC2544.PacketLossRatio
1307
1308     **Priority**:
1309
1310     **Description**:
1311
1312     The aim of this test is to determine the length of time it takes the DUT
1313     to recover from an overload condition for a constant load (fixed length
1314     frames at a fixed interval time). The selected frame sizes are those
1315     previously defined under `Default Test Parameters <#DefaultParams>`__,
1316     traffic should be sent to the DUT under normal conditions. During the
1317     duration of the test and while the traffic flows are passing though the
1318     DUT, at least one situation leading to an overload condition for the DUT
1319     should occur. The time from the end of the overload condition to when
1320     the DUT returns to normal operations should be measured to determine
1321     recovery time. Prior to overloading the DUT, one should record the
1322     average latency for 10,000 packets forwarded through the DUT.
1323
1324     The overload condition SHOULD be to transmit traffic at a very high
1325     frame rate to the DUT (150% of the maximum 0% packet loss rate as
1326     determined by LTD.Throughput.RFC2544.PacketLossRatio or line-rate
1327     whichever is lower), for at least 60 seconds, then reduce the frame rate
1328     to 75% of the maximum 0% packet loss rate. A number of time-stamps
1329     should be recorded: - Record the time-stamp at which the frame rate was
1330     reduced and record a second time-stamp at the time of the last frame
1331     lost. The recovery time is the difference between the two timestamps. -
1332     Record the average latency for 10,000 frames after the last frame loss
1333     and continue to record average latency measurements for every 10,000
1334     frames, when latency returns to within 10% of pre-overload levels record
1335     the time-stamp.
1336
1337     **Expected Result**:
1338
1339     **Metrics collected**
1340
1341     The following are the metrics collected for this test:
1342
1343     -  The length of time it takes the DUT to recover from an overload
1344        condition.
1345     -  The length of time it takes the DUT to recover the average latency to
1346        pre-overload conditions.
1347
1348     **Deployment scenario**:
1349
1350     -  Physical → virtual switch → physical.
1351
1352 .. 3.2.3.1.5
1353
1354 Test ID: LTD.Throughput.RFC2544.BackToBackFrames
1355 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1356     **Title**: RFC2544 Back To Back Frames Test
1357
1358     **Prerequisite Test**: N
1359
1360     **Priority**:
1361
1362     **Description**:
1363
1364     The aim of this test is to characterize the ability of the DUT to
1365     process back-to-back frames. For each frame size previously defined
1366     under `Default Test Parameters <#DefaultParams>`__, a burst of traffic
1367     is sent to the DUT with the minimum inter-frame gap between each frame.
1368     If the number of received frames equals the number of frames that were
1369     transmitted, the burst size should be increased and traffic is sent to
1370     the DUT again. The value measured is the back-to-back value, that is the
1371     maximum burst size the DUT can handle without any frame loss. Please note
1372     a trial must run for a minimum of 2 seconds and should be repeated 50
1373     times (at a minimum).
1374
1375     **Expected Result**:
1376
1377     Tests of back-to-back frames with physical devices have produced
1378     unstable results in some cases. All tests should be repeated in multiple
1379     test sessions and results stability should be examined.
1380
1381     **Metrics collected**
1382
1383     The following are the metrics collected for this test:
1384
1385     -  The average back-to-back value across the trials, which is
1386        the number of frames in the longest burst that the DUT will
1387        handle without the loss of any frames.
1388     -  CPU and memory utilization may also be collected as part of this
1389        test, to determine the vSwitch's performance footprint on the system.
1390
1391     **Deployment scenario**:
1392
1393     -  Physical → virtual switch → physical.
1394
1395 .. 3.2.3.1.6
1396
1397 Test ID: LTD.Throughput.RFC2889.MaxForwardingRateSoak
1398 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1399     **Title**: RFC 2889 X% packet loss Max Forwarding Rate Soak Test
1400
1401     **Prerequisite Test** LTD.Throughput.RFC2544.PacketLossRatio
1402
1403     **Priority**:
1404
1405     **Description**:
1406
1407     The aim of this test is to understand the Max Forwarding Rate stability
1408     over an extended test duration in order to uncover any outliers. To allow
1409     for an extended test duration, the test should ideally run for 24 hours
1410     or, if this is not possible, for at least 6 hours. For this test, each frame
1411     size must be sent at the highest Throughput rate with X% packet loss, as
1412     determined in the prerequisite test. The default loss percentages to be
1413     tested are: - X = 0% - X = 10^-7%
1414
1415     Note: Other values can be tested if required by the user.
1416
1417     **Expected Result**:
1418
1419     **Metrics Collected**:
1420
1421     The following are the metrics collected for this test:
1422
1423     -  Max Forwarding Rate stability of the DUT.
1424
1425        -  This means reporting the number of packets lost per time interval
1426           and reporting any time intervals with packet loss. The
1427           `RFC2889 <https://www.rfc-editor.org/rfc/rfc2289.txt>`__
1428           Forwarding Rate shall be measured in each interval.
1429           An interval of 60s is suggested.
1430
1431     -  CPU and memory utilization may also be collected as part of this
1432        test, to determine the vSwitch's performance footprint on the system.
1433     -  The `RFC5481 <https://www.rfc-editor.org/rfc/rfc5481.txt>`__
1434        PDV form of delay variation on the traffic flow,
1435        using the 99th percentile.
1436
1437 .. 3.2.3.1.7
1438
1439 Test ID: LTD.Throughput.RFC2889.MaxForwardingRateSoakFrameModification
1440 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1441     **Title**: RFC 2889 Max Forwarding Rate Soak Test with Frame Modification
1442
1443     **Prerequisite Test**:
1444     LTD.Throughput.RFC2544.PacketLossRatioFrameModification (0% Packet Loss)
1445
1446     **Priority**:
1447
1448     **Description**:
1449
1450     The aim of this test is to understand the Max Forwarding Rate stability over an
1451     extended test duration in order to uncover any outliers. To allow for an
1452     extended test duration, the test should ideally run for 24 hours or, if
1453     this is not possible, for at least 6 hour. For this test, each frame
1454     size must be sent at the highest Throughput rate with 0% packet loss, as
1455     determined in the prerequisite test.
1456
1457     During this test, the DUT must perform the following operations on the
1458     traffic flow:
1459
1460     -  Perform packet parsing on the DUT's ingress port.
1461     -  Perform any relevant address look-ups on the DUT's ingress ports.
1462     -  Modify the packet header before forwarding the packet to the DUT's
1463        egress port. Packet modifications include:
1464
1465        -  Modifying the Ethernet source or destination MAC address.
1466        -  Modifying/adding a VLAN tag (**Recommended**).
1467        -  Modifying/adding a MPLS tag.
1468        -  Modifying the source or destination ip address.
1469        -  Modifying the TOS/DSCP field.
1470        -  Modifying the source or destination ports for UDP/TCP/SCTP.
1471        -  Modifying the TTL.
1472
1473     **Expected Result**:
1474
1475     **Metrics Collected**:
1476
1477     The following are the metrics collected for this test:
1478
1479     -  Max Forwarding Rate stability of the DUT.
1480
1481        -  This means reporting the number of packets lost per time interval
1482           and reporting any time intervals with packet loss. The
1483           `RFC2889 <https://www.rfc-editor.org/rfc/rfc2289.txt>`__
1484           Forwarding Rate shall be measured in each interval.
1485           An interval of 60s is suggested.
1486
1487     -  CPU and memory utilization may also be collected as part of this
1488        test, to determine the vSwitch's performance footprint on the system.
1489     -  The `RFC5481 <https://www.rfc-editor.org/rfc/rfc5481.txt>`__
1490        PDV form of delay variation on the traffic flow, using the 99th
1491        percentile.
1492
1493 .. 3.2.3.1.8
1494
1495 Test ID: LTD.Throughput.RFC6201.ResetTime
1496 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1497     **Title**: RFC 6201 Reset Time Test
1498
1499     **Prerequisite Test**: N/A
1500
1501     **Priority**:
1502
1503     **Description**:
1504
1505     The aim of this test is to determine the length of time it takes the DUT
1506     to recover from a reset.
1507
1508     Two reset methods are defined - planned and unplanned. A planned reset
1509     requires stopping and restarting the virtual switch by the usual
1510     'graceful' method defined by it's documentation. An unplanned reset
1511     requires simulating a fatal internal fault in the virtual switch - for
1512     example by using kill -SIGKILL on a Linux environment.
1513
1514     Both reset methods SHOULD be exercised.
1515
1516     For each frame size previously defined under `Default Test
1517     Parameters <#DefaultParams>`__, traffic should be sent to the DUT under
1518     normal conditions. During the duration of the test and while the traffic
1519     flows are passing through the DUT, the DUT should be reset and the Reset
1520     time measured. The Reset time is the total time that a device is
1521     determined to be out of operation and includes the time to perform the
1522     reset and the time to recover from it (cf. `RFC6201
1523     <https://www.rfc-editor.org/rfc/rfc6201.txt>`__).
1524
1525     `RFC6201 <https://www.rfc-editor.org/rfc/rfc6201.txt>`__ defines two methods
1526     to measure the Reset time:
1527
1528       - Frame-Loss Method: which requires the monitoring of the number of
1529         lost frames and calculates the Reset time based on the number of
1530         frames lost and the offered rate according to the following
1531         formula:
1532
1533         .. code-block:: console
1534
1535                                     Frames_lost (packets)
1536                  Reset_time = -------------------------------------
1537                                 Offered_rate (packets per second)
1538
1539       - Timestamp Method: which measures the time from which the last frame
1540         is forwarded from the DUT to the time the first frame is forwarded
1541         after the reset. This involves time-stamping all transmitted frames
1542         and recording the timestamp of the last frame that was received prior
1543         to the reset and also measuring the timestamp of the first frame that
1544         is received after the reset. The Reset time is the difference between
1545         these two timestamps.
1546
1547     According to `RFC6201 <https://www.rfc-editor.org/rfc/rfc6201.txt>`__ the
1548     choice of method depends on the test tool's capability; the Frame-Loss
1549     method SHOULD be used if the test tool supports:
1550
1551      * Counting the number of lost frames per stream.
1552      * Transmitting test frame despite the physical link status.
1553
1554     whereas the Timestamp method SHOULD be used if the test tool supports:
1555      * Timestamping each frame.
1556      * Monitoring received frame's timestamp.
1557      * Transmitting frames only if the physical link status is up.
1558
1559     **Expected Result**:
1560
1561     **Metrics collected**
1562
1563     The following are the metrics collected for this test:
1564
1565      * Average Reset Time over the number of trials performed.
1566
1567     Results of this test should include the following information:
1568
1569      * The reset method used.
1570      * Throughput in Fps and Mbps.
1571      * Average Frame Loss over the number of trials performed.
1572      * Average Reset Time in milliseconds over the number of trials performed.
1573      * Number of trials performed.
1574      * Protocol: IPv4, IPv6, MPLS, etc.
1575      * Frame Size in Octets
1576      * Port Media: Ethernet, Gigabit Ethernet (GbE), etc.
1577      * Port Speed: 10 Gbps, 40 Gbps etc.
1578      * Interface Encapsulation: Ethernet, Ethernet VLAN, etc.
1579
1580     **Deployment scenario**:
1581
1582     * Physical → virtual switch → physical.
1583
1584 .. 3.2.3.1.9
1585
1586 Test ID: LTD.Throughput.RFC2889.MaxForwardingRate
1587 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1588     **Title**: RFC2889 Forwarding Rate Test
1589
1590     **Prerequisite Test**: LTD.Throughput.RFC2544.PacketLossRatio
1591
1592     **Priority**:
1593
1594     **Description**:
1595
1596     This test measures the DUT's Max Forwarding Rate when the Offered Load
1597     is varied between the throughput and the Maximum Offered Load for fixed
1598     length frames at a fixed time interval. The selected frame sizes are
1599     those previously defined under `Default Test
1600     Parameters <#DefaultParams>`__. The throughput is the maximum offered
1601     load with 0% frame loss (measured by the prerequisite test), and the
1602     Maximum Offered Load (as defined by
1603     `RFC2285 <https://www.rfc-editor.org/rfc/rfc2285.txt>`__) is *"the highest
1604     number of frames per second that an external source can transmit to a
1605     DUT/SUT for forwarding to a specified output interface or interfaces"*.
1606
1607     Traffic should be sent to the DUT at a particular rate (TX rate)
1608     starting with TX rate equal to the throughput rate. The rate of
1609     successfully received frames at the destination counted (in FPS). If the
1610     RX rate is equal to the TX rate, the TX rate should be increased by a
1611     fixed step size and the RX rate measured again until the Max Forwarding
1612     Rate is found.
1613
1614     The trial duration for each iteration should last for the period of time
1615     needed for the system to reach steady state for the frame size being
1616     tested. Under `RFC2889 <https://www.rfc-editor.org/rfc/rfc2289.txt>`__
1617     (Sec. 5.6.3.1) test methodology, the test
1618     duration should run for a minimum period of 30 seconds, regardless
1619     whether the system reaches steady state before the minimum duration
1620     ends.
1621
1622     **Expected Result**: According to
1623     `RFC2889 <https://www.rfc-editor.org/rfc/rfc2289.txt>`__ The Max Forwarding
1624     Rate is the highest forwarding rate of a DUT taken from an iterative set of
1625     forwarding rate measurements. The iterative set of forwarding rate measurements
1626     are made by setting the intended load transmitted from an external source and
1627     measuring the offered load (i.e what the DUT is capable of forwarding). If the
1628     Throughput == the Maximum Offered Load, it follows that Max Forwarding Rate is
1629     equal to the Maximum Offered Load.
1630
1631     **Metrics Collected**:
1632
1633     The following are the metrics collected for this test:
1634
1635     -  The Max Forwarding Rate for the DUT for each packet size.
1636     -  CPU and memory utilization may also be collected as part of this
1637        test, to determine the vSwitch's performance footprint on the system.
1638
1639     **Deployment scenario**:
1640
1641     -  Physical → virtual switch → physical. Note: Full mesh tests with
1642        multiple ingress and egress ports are a key aspect of RFC 2889
1643        benchmarks, and scenarios with both 2 and 4 ports should be tested.
1644        In any case, the number of ports used must be reported.
1645
1646 .. 3.2.3.1.10
1647
1648 Test ID: LTD.Throughput.RFC2889.ForwardPressure
1649 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1650     **Title**: RFC2889 Forward Pressure Test
1651
1652     **Prerequisite Test**: LTD.Throughput.RFC2889.MaxForwardingRate
1653
1654     **Priority**:
1655
1656     **Description**:
1657
1658     The aim of this test is to determine if the DUT transmits frames with an
1659     inter-frame gap that is less than 12 bytes. This test overloads the DUT
1660     and measures the output for forward pressure. Traffic should be
1661     transmitted to the DUT with an inter-frame gap of 11 bytes, this will
1662     overload the DUT by 1 byte per frame. The forwarding rate of the DUT
1663     should be measured.
1664
1665     **Expected Result**: The forwarding rate should not exceed the maximum
1666     forwarding rate of the DUT collected by
1667     LTD.Throughput.RFC2889.MaxForwardingRate.
1668
1669     **Metrics collected**
1670
1671     The following are the metrics collected for this test:
1672
1673     -  Forwarding rate of the DUT in FPS or Mbps.
1674     -  CPU and memory utilization may also be collected as part of this
1675        test, to determine the vSwitch's performance footprint on the system.
1676
1677     **Deployment scenario**:
1678
1679     -  Physical → virtual switch → physical.
1680
1681 .. 3.2.3.1.11
1682
1683 Test ID: LTD.Throughput.RFC2889.ErrorFramesFiltering
1684 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1685     **Title**: RFC2889 Error Frames Filtering Test
1686
1687     **Prerequisite Test**: N/A
1688
1689     **Priority**:
1690
1691     **Description**:
1692
1693     The aim of this test is to determine whether the DUT will propagate any
1694     erroneous frames it receives or whether it is capable of filtering out
1695     the erroneous frames. Traffic should be sent with erroneous frames
1696     included within the flow at random intervals. Illegal frames that must
1697     be tested include: - Oversize Frames. - Undersize Frames. - CRC Errored
1698     Frames. - Dribble Bit Errored Frames - Alignment Errored Frames
1699
1700     The traffic flow exiting the DUT should be recorded and checked to
1701     determine if the erroneous frames where passed through the DUT.
1702
1703     **Expected Result**: Broken frames are not passed!
1704
1705     **Metrics collected**
1706
1707     No Metrics are collected in this test, instead it determines:
1708
1709     -  Whether the DUT will propagate erroneous frames.
1710     -  Or whether the DUT will correctly filter out any erroneous frames
1711        from traffic flow with out removing correct frames.
1712
1713     **Deployment scenario**:
1714
1715     -  Physical → virtual switch → physical.
1716
1717 .. 3.2.3.1.12
1718
1719 Test ID: LTD.Throughput.RFC2889.BroadcastFrameForwarding
1720 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1721     **Title**: RFC2889 Broadcast Frame Forwarding Test
1722
1723     **Prerequisite Test**: N
1724
1725     **Priority**:
1726
1727     **Description**:
1728
1729     The aim of this test is to determine the maximum forwarding rate of the
1730     DUT when forwarding broadcast traffic. For each frame previously defined
1731     under `Default Test Parameters <#DefaultParams>`__, the traffic should
1732     be set up as broadcast traffic. The traffic throughput of the DUT should
1733     be measured.
1734
1735     The test should be conducted with at least 4 physical ports on the DUT.
1736     The number of ports used MUST be recorded.
1737
1738     As broadcast involves forwarding a single incoming packet to several
1739     destinations, the latency of a single packet is defined as the average
1740     of the latencies for each of the broadcast destinations.
1741
1742     The incoming packet is transmitted on each of the other physical ports,
1743     it is not transmitted on the port on which it was received. The test MAY
1744     be conducted using different broadcasting ports to uncover any
1745     performance differences.
1746
1747     **Expected Result**:
1748
1749     **Metrics collected**:
1750
1751     The following are the metrics collected for this test:
1752
1753     -  The forwarding rate of the DUT when forwarding broadcast traffic.
1754     -  The minimum, average & maximum packets latencies observed.
1755
1756     **Deployment scenario**:
1757
1758     -  Physical → virtual switch 3x physical. In the Broadcast rate testing,
1759        four test ports are required. One of the ports is connected to the test
1760        device, so it can send broadcast frames and listen for miss-routed frames.
1761
1762 .. 3.2.3.1.13
1763
1764 Test ID: LTD.Throughput.RFC2544.WorstN-BestN
1765 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1766     **Title**: Modified RFC 2544 X% packet loss ratio Throughput and Latency Test
1767
1768     **Prerequisite Test**: N/A
1769
1770     **Priority**:
1771
1772     **Description**:
1773
1774     This test determines the DUT's maximum forwarding rate with X% traffic
1775     loss for a constant load (fixed length frames at a fixed interval time).
1776     The default loss percentages to be tested are: X = 0%, X = 10^-7%
1777
1778     Modified RFC 2544 throughput benchmarking methodology aims to quantify
1779     the throughput measurement variations observed during standard RFC 2544
1780     benchmarking measurements of virtual switches and VNFs. The RFC2544
1781     binary search algorithm is modified to use more samples per test trial
1782     to drive the binary search and yield statistically more meaningful
1783     results. This keeps the heart of the RFC2544 methodology, still relying
1784     on the binary search of throughput at specified loss tolerance, while
1785     providing more useful information about the range of results seen in
1786     testing. Instead of using a single traffic trial per iteration step,
1787     each traffic trial is repeated N times and the success/failure of the
1788     iteration step is based on these N traffic trials. Two types of revised
1789     tests are defined - *Worst-of-N* and *Best-of-N*.
1790
1791     **Worst-of-N**
1792
1793     *Worst-of-N* indicates the lowest expected maximum throughput for (
1794     packet size, loss tolerance) when repeating the test.
1795
1796     1.  Repeat the same test run N times at a set packet rate, record each
1797         result.
1798     2.  Take the WORST result (highest packet loss) out of N result samples,
1799         called the Worst-of-N sample.
1800     3.  If Worst-of-N sample has loss less than the set loss tolerance, then
1801         the step is successful - increase the test traffic rate.
1802     4.  If Worst-of-N sample has loss greater than the set loss tolerance
1803         then the step failed - decrease the test traffic rate.
1804     5.  Go to step 1.
1805
1806     **Best-of-N**
1807
1808     *Best-of-N* indicates the highest expected maximum throughput for (
1809     packet size, loss tolerance) when repeating the test.
1810
1811     1.  Repeat the same traffic run N times at a set packet rate, record
1812         each result.
1813     2.  Take the BEST result (least packet loss) out of N result samples,
1814         called the Best-of-N sample.
1815     3.  If Best-of-N sample has loss less than the set loss tolerance, then
1816         the step is successful - increase the test traffic rate.
1817     4.  If Best-of-N sample has loss greater than the set loss tolerance,
1818         then the step failed - decrease the test traffic rate.
1819     5.  Go to step 1.
1820
1821     Performing both Worst-of-N and Best-of-N benchmark tests yields lower
1822     and upper bounds of expected maximum throughput under the operating
1823     conditions, giving a very good indication to the user of the
1824     deterministic performance range for the tested setup.
1825
1826     **Expected Result**: At the end of each trial series, the presence or
1827     absence of loss determines the modification of offered load for the
1828     next trial series, converging on a maximum rate, or
1829     `RFC2544 <https://www.rfc-editor.org/rfc/rfc2544.txt>`__ Throughput
1830     with X% loss.
1831     The Throughput load is re-used in related
1832     `RFC2544 <https://www.rfc-editor.org/rfc/rfc2544.txt>`__ tests and other
1833     tests.
1834
1835     **Metrics Collected**:
1836
1837     The following are the metrics collected for this test:
1838
1839     -  The maximum forwarding rate in Frames Per Second (FPS) and Mbps of
1840        the DUT for each frame size with X% packet loss.
1841     -  The average latency of the traffic flow when passing through the DUT
1842        (if testing for latency, note that this average is different from the
1843        test specified in Section 26.3 of
1844        `RFC2544 <https://www.rfc-editor.org/rfc/rfc2544.txt>`__).
1845     -  Following may also be collected as part of this test, to determine
1846        the vSwitch's performance footprint on the system:
1847       -  CPU core utilization.
1848       -  CPU cache utilization.
1849       -  Memory footprint.
1850       -  System bus (QPI, PCI, ...) utilization.
1851       -  CPU cycles consumed per packet.
1852
1853 .. 3.2.3.2
1854
1855 Packet Latency tests
1856 ---------------------------
1857 These tests will measure the store and forward latency as well as the packet
1858 delay variation for various packet types through the virtual switch. The
1859 following list is not exhaustive but should indicate the type of tests
1860 that should be required. It is expected that more will be added.
1861
1862 .. 3.2.3.2.1
1863
1864 Test ID: LTD.PacketLatency.InitialPacketProcessingLatency
1865 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1866     **Title**: Initial Packet Processing Latency
1867
1868     **Prerequisite Test**: N/A
1869
1870     **Priority**:
1871
1872     **Description**:
1873
1874     In some virtual switch architectures, the first packets of a flow will
1875     take the system longer to process than subsequent packets in the flow.
1876     This test determines the latency for these packets. The test will
1877     measure the latency of the packets as they are processed by the
1878     flow-setup-path of the DUT. There are two methods for this test, a
1879     recommended method and a nalternative method that can be used if it is
1880     possible to disable the fastpath of the virtual switch.
1881
1882     Recommended method: This test will send 64,000 packets to the DUT, each
1883     belonging to a different flow. Average packet latency will be determined
1884     over the 64,000 packets.
1885
1886     Alternative method: This test will send a single packet to the DUT after
1887     a fixed interval of time. The time interval will be equivalent to the
1888     amount of time it takes for a flow to time out in the virtual switch
1889     plus 10%. Average packet latency will be determined over 1,000,000
1890     packets.
1891
1892     This test is intended only for non-learning virtual switches; For learning
1893     virtual switches use RFC2889.
1894
1895     For this test, only unidirectional traffic is required.
1896
1897     **Expected Result**: The average latency for the initial packet of all
1898     flows should be greater than the latency of subsequent traffic.
1899
1900     **Metrics Collected**:
1901
1902     The following are the metrics collected for this test:
1903
1904     -  Average latency of the initial packets of all flows that are
1905        processed by the DUT.
1906
1907     **Deployment scenario**:
1908
1909     -  Physical → Virtual Switch → Physical.
1910
1911 .. 3.2.3.2.2
1912
1913 Test ID: LTD.PacketDelayVariation.RFC3393.Soak
1914 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1915     **Title**: Packet Delay Variation Soak Test
1916
1917     **Prerequisite Tests**: LTD.Throughput.RFC2544.PacketLossRatio (0% Packet Loss)
1918
1919     **Priority**:
1920
1921     **Description**:
1922
1923     The aim of this test is to understand the distribution of packet delay
1924     variation for different frame sizes over an extended test duration and
1925     to determine if there are any outliers. To allow for an extended test
1926     duration, the test should ideally run for 24 hours or, if this is not
1927     possible, for at least 6 hour. For this test, each frame size must be
1928     sent at the highest possible throughput with 0% packet loss, as
1929     determined in the prerequisite test.
1930
1931     **Expected Result**:
1932
1933     **Metrics Collected**:
1934
1935     The following are the metrics collected for this test:
1936
1937     -  The packet delay variation value for traffic passing through the DUT.
1938     -  The `RFC5481 <https://www.rfc-editor.org/rfc/rfc5481.txt>`__
1939        PDV form of delay variation on the traffic flow,
1940        using the 99th percentile, for each 60s interval during the test.
1941     -  CPU and memory utilization may also be collected as part of this
1942        test, to determine the vSwitch's performance footprint on the system.
1943
1944 .. 3.2.3.3
1945
1946 Scalability tests
1947 ------------------------
1948 The general aim of these tests is to understand the impact of large flow
1949 table size and flow lookups on throughput. The following list is not
1950 exhaustive but should indicate the type of tests that should be required.
1951 It is expected that more will be added.
1952
1953 .. 3.2.3.3.1
1954
1955 Test ID: LTD.Scalability.RFC2544.0PacketLoss
1956 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1957     **Title**: RFC 2544 0% loss Scalability throughput test
1958
1959     **Prerequisite Test**: LTD.Throughput.RFC2544.PacketLossRatio, IF the
1960     delta Throughput between the single-flow RFC2544 test and this test with
1961     a variable number of flows is desired.
1962
1963     **Priority**:
1964
1965     **Description**:
1966
1967     The aim of this test is to measure how throughput changes as the number
1968     of flows in the DUT increases. The test will measure the throughput
1969     through the fastpath, as such the flows need to be installed on the DUT
1970     before passing traffic.
1971
1972     For each frame size previously defined under `Default Test
1973     Parameters <#DefaultParams>`__ and for each of the following number of
1974     flows:
1975
1976     -  1,000
1977     -  2,000
1978     -  4,000
1979     -  8,000
1980     -  16,000
1981     -  32,000
1982     -  64,000
1983     -  Max supported number of flows.
1984
1985     This test will be conducted under two conditions following the
1986     establishment of all flows as required by RFC 2544, regarding the flow
1987     expiration time-out:
1988
1989     1) The time-out never expires during each trial.
1990
1991     2) The time-out expires for all flows periodically. This would require a
1992     short time-out compared with flow re-appearance for a small number of
1993     flows, and may not be possible for all flow conditions.
1994
1995     The maximum 0% packet loss Throughput should be determined in a manner
1996     identical to LTD.Throughput.RFC2544.PacketLossRatio.
1997
1998     **Expected Result**:
1999
2000     **Metrics Collected**:
2001
2002     The following are the metrics collected for this test:
2003
2004     -  The maximum number of frames per second that can be forwarded at the
2005        specified number of flows and the specified frame size, with zero
2006        packet loss.
2007
2008 .. 3.2.3.3.2
2009
2010 Test ID: LTD.MemoryBandwidth.RFC2544.0PacketLoss.Scalability
2011 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2012     **Title**: RFC 2544 0% loss Memory Bandwidth Scalability test
2013
2014     **Prerequisite Tests**: LTD.Throughput.RFC2544.PacketLossRatio, IF the
2015     delta Throughput between an undisturbed RFC2544 test and this test with
2016     the Throughput affected by cache and memory bandwidth contention is desired.
2017
2018     **Priority**:
2019
2020     **Description**:
2021
2022     The aim of this test is to understand how the DUT's performance is
2023     affected by cache sharing and memory bandwidth between processes.
2024
2025     During the test all cores not used by the vSwitch should be running a
2026     memory intensive application. This application should read and write
2027     random data to random addresses in unused physical memory. The random
2028     nature of the data and addresses is intended to consume cache, exercise
2029     main memory access (as opposed to cache) and exercise all memory buses
2030     equally. Furthermore:
2031
2032     - the ratio of reads to writes should be recorded. A ratio of 1:1
2033       SHOULD be used.
2034     - the reads and writes MUST be of cache-line size and be cache-line aligned.
2035     - in NUMA architectures memory access SHOULD be local to the core's node.
2036       Whether only local memory or a mix of local and remote memory is used
2037       MUST be recorded.
2038     - the memory bandwidth (reads plus writes) used per-core MUST be recorded;
2039       the test MUST be run with a per-core memory bandwidth equal to half the
2040       maximum system memory bandwidth divided by the number of cores. The test
2041       MAY be run with other values for the per-core memory bandwidth.
2042     - the test MAY also be run with the memory intensive application running
2043       on all cores.
2044
2045     Under these conditions the DUT's 0% packet loss throughput is determined
2046     as per LTD.Throughput.RFC2544.PacketLossRatio.
2047
2048     **Expected Result**:
2049
2050     **Metrics Collected**:
2051
2052     The following are the metrics collected for this test:
2053
2054     -  The DUT's 0% packet loss throughput in the presence of cache sharing and
2055        memory bandwidth between processes.
2056
2057 .. 3.2.3.4
2058
2059 Activation tests
2060 -----------------------
2061 The general aim of these tests is to understand the capacity of the
2062 and speed with which the vswitch can accommodate new flows.
2063
2064 .. 3.2.3.4.1
2065
2066 Test ID: LTD.Activation.RFC2889.AddressCachingCapacity
2067 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2068     **Title**: RFC2889 Address Caching Capacity Test
2069
2070     **Prerequisite Test**: N/A
2071
2072     **Priority**:
2073
2074     **Description**:
2075
2076     Please note this test is only applicable to virtual switches that are capable of
2077     MAC learning. The aim of this test is to determine the address caching
2078     capacity of the DUT for a constant load (fixed length frames at a fixed
2079     interval time). The selected frame sizes are those previously defined
2080     under `Default Test Parameters <#DefaultParams>`__.
2081
2082     In order to run this test the aging time, that is the maximum time the
2083     DUT will keep a learned address in its flow table, and a set of initial
2084     addresses, whose value should be >= 1 and <= the max number supported by
2085     the implementation must be known. Please note that if the aging time is
2086     configurable it must be longer than the time necessary to produce frames
2087     from the external source at the specified rate. If the aging time is
2088     fixed the frame rate must be brought down to a value that the external
2089     source can produce in a time that is less than the aging time.
2090
2091     Learning Frames should be sent from an external source to the DUT to
2092     install a number of flows. The Learning Frames must have a fixed
2093     destination address and must vary the source address of the frames. The
2094     DUT should install flows in its flow table based on the varying source
2095     addresses. Frames should then be transmitted from an external source at
2096     a suitable frame rate to see if the DUT has properly learned all of the
2097     addresses. If there is no frame loss and no flooding, the number of
2098     addresses sent to the DUT should be increased and the test is repeated
2099     until the max number of cached addresses supported by the DUT
2100     determined.
2101
2102     **Expected Result**:
2103
2104     **Metrics collected**:
2105
2106     The following are the metrics collected for this test:
2107
2108     -  Number of cached addresses supported by the DUT.
2109     -  CPU and memory utilization may also be collected as part of this
2110        test, to determine the vSwitch's performance footprint on the system.
2111
2112     **Deployment scenario**:
2113
2114     -  Physical → virtual switch → 2 x physical (one receiving, one listening).
2115
2116 .. 3.2.3.4.2
2117
2118 Test ID: LTD.Activation.RFC2889.AddressLearningRate
2119 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2120     **Title**: RFC2889 Address Learning Rate Test
2121
2122     **Prerequisite Test**: LTD.Memory.RFC2889.AddressCachingCapacity
2123
2124     **Priority**:
2125
2126     **Description**:
2127
2128     Please note this test is only applicable to virtual switches that are capable of
2129     MAC learning. The aim of this test is to determine the rate of address
2130     learning of the DUT for a constant load (fixed length frames at a fixed
2131     interval time). The selected frame sizes are those previously defined
2132     under `Default Test Parameters <#DefaultParams>`__, traffic should be
2133     sent with each IPv4/IPv6 address incremented by one. The rate at which
2134     the DUT learns a new address should be measured. The maximum caching
2135     capacity from LTD.Memory.RFC2889.AddressCachingCapacity should be taken
2136     into consideration as the maximum number of addresses for which the
2137     learning rate can be obtained.
2138
2139     **Expected Result**: It may be worthwhile to report the behaviour when
2140     operating beyond address capacity - some DUTs may be more friendly to
2141     new addresses than others.
2142
2143     **Metrics collected**:
2144
2145     The following are the metrics collected for this test:
2146
2147     -  The address learning rate of the DUT.
2148
2149     **Deployment scenario**:
2150
2151     -  Physical → virtual switch → 2 x physical (one receiving, one listening).
2152
2153 .. 3.2.3.5
2154
2155 Coupling between control path and datapath Tests
2156 -------------------------------------------------------
2157 The following tests aim to determine how tightly coupled the datapath
2158 and the control path are within a virtual switch. The following list
2159 is not exhaustive but should indicate the type of tests that should be
2160 required. It is expected that more will be added.
2161
2162 .. 3.2.3.5.1
2163
2164 Test ID: LTD.CPDPCouplingFlowAddition
2165 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2166     **Title**: Control Path and Datapath Coupling
2167
2168     **Prerequisite Test**:
2169
2170     **Priority**:
2171
2172     **Description**:
2173
2174     The aim of this test is to understand how exercising the DUT's control
2175     path affects datapath performance.
2176
2177     Initially a certain number of flow table entries are installed in the
2178     vSwitch. Then over the duration of an RFC2544 throughput test
2179     flow-entries are added and removed at the rates specified below. No
2180     traffic is 'hitting' these flow-entries, they are simply added and
2181     removed.
2182
2183     The test MUST be repeated with the following initial number of
2184     flow-entries installed: - < 10 - 1000 - 100,000 - 10,000,000 (or the
2185     maximum supported number of flow-entries)
2186
2187     The test MUST be repeated with the following rates of flow-entry
2188     addition and deletion per second: - 0 - 1 (i.e. 1 addition plus 1
2189     deletion) - 100 - 10,000
2190
2191     **Expected Result**:
2192
2193     **Metrics Collected**:
2194
2195     The following are the metrics collected for this test:
2196
2197     -  The maximum forwarding rate in Frames Per Second (FPS) and Mbps of
2198        the DUT.
2199     -  The average latency of the traffic flow when passing through the DUT
2200        (if testing for latency, note that this average is different from the
2201        test specified in Section 26.3 of
2202        `RFC2544 <https://www.rfc-editor.org/rfc/rfc2544.txt>`__).
2203     -  CPU and memory utilization may also be collected as part of this
2204        test, to determine the vSwitch's performance footprint on the system.
2205
2206     **Deployment scenario**:
2207
2208     -  Physical → virtual switch → physical.
2209
2210 .. 3.2.3.6
2211
2212 CPU and memory consumption
2213 ---------------------------------
2214 The following tests will profile a virtual switch's CPU and memory
2215 utilization under various loads and circumstances. The following
2216 list is not exhaustive but should indicate the type of tests that
2217 should be required. It is expected that more will be added.
2218
2219 .. 3.2.3.6.1
2220
2221 Test ID: LTD.CPU.RFC2544.0PacketLoss
2222 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2223     **Title**: RFC 2544 0% Loss Compute Test
2224
2225     **Prerequisite Test**:
2226
2227     **Priority**:
2228
2229     **Description**:
2230
2231     The aim of this test is to understand the overall performance of the
2232     system when a CPU intensive application is run on the same DUT as the
2233     Virtual Switch. For each frame size, an
2234     LTD.Throughput.RFC2544.PacketLossRatio (0% Packet Loss) test should be
2235     performed. Throughout the entire test a CPU intensive application should
2236     be run on all cores on the system not in use by the Virtual Switch. For
2237     NUMA system only cores on the same NUMA node are loaded.
2238
2239     It is recommended that stress-ng be used for loading the non-Virtual
2240     Switch cores but any stress tool MAY be used.
2241
2242     **Expected Result**:
2243
2244     **Metrics Collected**:
2245
2246     The following are the metrics collected for this test:
2247
2248     -  CPU utilization of the cores running the Virtual Switch.
2249     -  The number of identity of the cores allocated to the Virtual Switch.
2250     -  The configuration of the stress tool (for example the command line
2251        parameters used to start it.)
2252
2253 .. 3.2.3.7
2254
2255 Summary List of Tests
2256 ----------------------------
2257 1. Throughput tests
2258
2259   - Test ID: LTD.Throughput.RFC2544.PacketLossRatio
2260   - Test ID: LTD.Throughput.RFC2544.PacketLossRatioFrameModification
2261   - Test ID: LTD.Throughput.RFC2544.Profile
2262   - Test ID: LTD.Throughput.RFC2544.SystemRecoveryTime
2263   - Test ID: LTD.Throughput.RFC2544.BackToBackFrames
2264   - Test ID: LTD.Throughput.RFC2889.Soak
2265   - Test ID: LTD.Throughput.RFC2889.SoakFrameModification
2266   - Test ID: LTD.Throughput.RFC6201.ResetTime
2267   - Test ID: LTD.Throughput.RFC2889.MaxForwardingRate
2268   - Test ID: LTD.Throughput.RFC2889.ForwardPressure
2269   - Test ID: LTD.Throughput.RFC2889.ErrorFramesFiltering
2270   - Test ID: LTD.Throughput.RFC2889.BroadcastFrameForwarding
2271
2272 2. Packet Latency tests
2273
2274   - Test ID: LTD.PacketLatency.InitialPacketProcessingLatency
2275   - Test ID: LTD.PacketDelayVariation.RFC3393.Soak
2276
2277 3. Scalability tests
2278
2279   - Test ID: LTD.Scalability.RFC2544.0PacketLoss
2280   - Test ID: LTD.MemoryBandwidth.RFC2544.0PacketLoss.Scalability
2281
2282 4. Acivation tests
2283
2284   - Test ID: LTD.Activation.RFC2889.AddressCachingCapacity
2285   - Test ID: LTD.Activation.RFC2889.AddressLearningRate
2286
2287 5. Coupling between control path and datapath Tests
2288
2289   - Test ID: LTD.CPDPCouplingFlowAddition
2290
2291 6. CPU and memory consumption
2292
2293   - Test ID: LTD.CPU.RFC2544.0PacketLoss