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