test suite reviews and discussions
 help / color / mirror / Atom feed
From: yufengmx <yufengx.mo@intel.com>
To: dts@dpdk.org, yinan.wang@intel.com
Cc: yufengmx <yufengx.mo@intel.com>
Subject: [dts] [PATCH V2 3/4] test_plans/metrics: upload test plan
Date: Fri, 13 Dec 2019 16:51:39 +0800	[thread overview]
Message-ID: <20191213085140.13231-4-yufengx.mo@intel.com> (raw)
In-Reply-To: <20191213085140.13231-1-yufengx.mo@intel.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 8017 bytes --]


The Metrics implements a mechanism by which producers can publish numeric
information for later querying by consumers. Here dpdk-procinfo process is the
consumers. latency stats and bit rate are the two implements based on metrics lib.

Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
 test_plans/metrics_test_plan.rst | 236 +++++++++++++++++++++++++++++++
 1 file changed, 236 insertions(+)
 create mode 100644 test_plans/metrics_test_plan.rst

diff --git a/test_plans/metrics_test_plan.rst b/test_plans/metrics_test_plan.rst
new file mode 100644
index 0000000..6dc051e
--- /dev/null
+++ b/test_plans/metrics_test_plan.rst
@@ -0,0 +1,236 @@
+.. Copyright (c) 2010-2019 Intel Corporation
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+
+   - Neither the name of Intel Corporation nor the names of its
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+   OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=======
+metrics
+=======
+
+The Metrics implements a mechanism by which *producers* can publish numeric
+information for later querying by *consumers*. Here dpdk-procinfo process is the
+*consumers*. ``latency stats`` and ``bit rate`` are the two implements based
+on metrics lib.
+
+The dpdk-procinfo process use new command line option "--metrics" to display
+metrics statistics.
+
+Functionality:
+
+* The library will register ethdev Rx/Tx callbacks for each active port,
+  queue combinations.
+* The library will register latency stats names with new metrics library.
+* Rx packets will be marked with time stamp on each sampling interval.
+* On Tx side, packets with time stamp will be considered for calculating
+  the minimum, maximum, average latencies and also jitter.
+* Average latency is calculated using exponential weighted moving average
+  method.
+* Minimum and maximum latencies will be low and high latency values
+  observed so far.
+* Jitter calculation is done based on inter packet delay variation.
+
+note: DPDK technical document refer to ``doc/guides/prog_guide/metrics_lib.rst``
+
+latency stats
+=============
+
+Latency stats measures minimum, average and maximum latencies, and jitter in
+nano seconds.
+
+bit rate
+========
+
+Calculates peak and average bit-rate statistics.
+
+Prerequisites
+=============
+
+2x Intel® 82599 (Niantic) NICs (2x 10GbE full duplex optical ports per NIC)
+plugged into the available PCIe Gen2 8-lane slots in two different configurations.
+
+port topology diagram::
+
+       packet generator                         DUT
+        .-----------.                      .-----------.
+        | .-------. |                      | .-------. |
+        | | portA | | <------------------> | | port0 | |
+        | | portB | | <------------------> | | port1 | |
+        | '-------' |                      | '-------' |
+        |           |                      |    nic    |
+        '-----------'                      '-----------'
+
+Test content
+============
+
+latency stats
+-------------
+
+The idea behind the testing process is to send different frames number of
+different packets from packet generator to the DUT while these are being
+forwarded back by the app and measure some of statistics. These data are queried
+by the dpdk-proc app.
+
+- min_latencyy_ns
+
+  - Minimum latency in nano seconds
+
+- max_latencyy_ns
+
+  - Maximum latency in nano seconds
+
+- avg_latencyy_ns
+
+  - Average latency in nano seconds
+
+- jittery_ns
+
+  - Latency variation
+
+bit rate
+--------
+
+The idea behind the testing process is to send different frames number of
+different packets from packet generator to the DUT while these are being
+forwarded back by the app and measure some of statistics. These data are queried
+by the dpdk-proc app.
+
+- mean_bits_in
+
+  - Average rx bits rate
+
+- mean_bits_out
+
+  - Average tx bits rate
+
+- peak_bits_in
+
+  - peak rx bits rate
+
+- peak_bits_out
+
+  - peak tx bits rate
+
+- ewma_bits_in
+
+  - Average inbound bit-rate (EWMA smoothed)
+
+- ewma_bits_out
+
+  - Average outbound bit-rate (EWMA smoothed)
+
+transmission packet format
+--------------------------
+UDP format::
+
+    [Ether()/IP()/UDP()/Raw('\0'*60)]
+
+transmission Frames size
+------------------------
+Then measure the forwarding throughput for different frame sizes.
+
+Frame size(64/128/256/512/1024)
+
+Test Case : test latency stats
+==============================
+#. Connect two physical ports to traffic generator.
+
+#. bind two ports to igb_uio driver::
+
+    ./tools/dpdk_nic_bind.py --bind=igb_uio 0000:xx:00.0 0000:xx:00.1
+
+#. Start testpmd, set it in io fwd mode::
+
+    ./testpmd -c 0x30 -n 4  -- -i --latencystats=2
+    testpmd> set fwd io
+    testpmd> start
+
+#. Configure packet flow in packet generator.
+
+#. Use packet generator to send packets, continue traffic lasting several minitues.
+
+#. run dpdk-proc to get latency stats data, query data at a average interval and
+   get 5 times data::
+
+   ./app/dpdk-procinfo -- --metrics
+
+#. latency stats has no reference standard data, only check non-zero and logic reasonable value.
+
+Test Case : test bit rate
+=========================
+#. Connect two physical ports to traffic generator.
+
+#. bind two ports to igb_uio driver.
+
+    ./tools/dpdk_nic_bind.py --bind=igb_uio 00:08.0 00:08.1
+
+#. Start testpmd, set it in io fwd mode::
+
+    ./testpmd -c 0x30 -n 4  -- -i --bitrate-stats=2
+    testpmd> set fwd io
+    testpmd> start
+
+#. Configure packet flow in packet generator.
+
+#. Use packet generator to send packets, continue traffic lasting several minitues.
+
+#. run dpdk-proc to get latency stats data, query data at a average interval and
+   get 5 times data::
+
+   ./app/dpdk-procinfo -- --metrics
+
+#. Compare dpdk statistics data with packet generator statistics data.
+
+Test Case : test bit rate peak value
+====================================
+#. Connect two physical ports to traffic generator.
+
+#. bind two ports to igb_uio driver::
+
+    ./tools/dpdk_nic_bind.py --bind=igb_uio 00:08.0 00:08.1
+
+#. Start testpmd, set it in io fwd mode::
+
+    ./testpmd -c 0x30 -n 4  -- -i --bitrate-stats=2
+    testpmd> set fwd io
+    testpmd> start
+
+#. Configure packet flow in packet generator.
+
+#. Use packet generator to send packets, continue traffic lasting several minitues.
+
+#. run dpdk-proc to get latency stats data, query data at a average interval and
+   get 5 times data::
+
+   ./app/dpdk-procinfo -- --metrics
+
+#. decline packet generator rate percent from 100%/80%/60%/20%, loop step 5/6.
+
+#. check peak_bits_out/peak_bits_in should keep the first max value when packet
+   generator work with decreasing traffic rate percent.
-- 
2.21.0


  parent reply	other threads:[~2019-12-13  8:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-13  8:51 [dts] [PATCH V2 0/4] metrics: upload suite test plan and script yufengmx
2019-12-13  8:51 ` [dts] [PATCH V2 1/4] conf/metrics: test configuration yufengmx
2019-12-27  8:32   ` Wang, Yinan
2019-12-13  8:51 ` [dts] [PATCH V2 2/4] test_plans/metrics: add test plan index yufengmx
2019-12-27  8:32   ` Wang, Yinan
2019-12-13  8:51 ` yufengmx [this message]
2019-12-27  8:32   ` [dts] [PATCH V2 3/4] test_plans/metrics: upload test plan Wang, Yinan
2019-12-13  8:51 ` [dts] [PATCH V2 4/4] tests/metrics: upload automation script yufengmx
2019-12-27  8:32   ` Wang, Yinan
2019-12-27  8:32 ` [dts] [PATCH V2 0/4] metrics: upload suite test plan and script Wang, Yinan
2020-01-02  3:19 ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191213085140.13231-4-yufengx.mo@intel.com \
    --to=yufengx.mo@intel.com \
    --cc=dts@dpdk.org \
    --cc=yinan.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).