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