get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/45300/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 45300,
    "url": "http://patches.dpdk.org/api/patches/45300/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1537859109-25659-13-git-send-email-amo@semihalf.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1537859109-25659-13-git-send-email-amo@semihalf.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1537859109-25659-13-git-send-email-amo@semihalf.com",
    "date": "2018-09-25T07:05:08",
    "name": "[v3,12/13] net/mvpp2: document MTR and TM usage",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e7bdfd981be5bfde0bf574959cb8e25cdd347f89",
    "submitter": {
        "id": 1112,
        "url": "http://patches.dpdk.org/api/people/1112/?format=api",
        "name": "Andrzej Ostruszka",
        "email": "amo@semihalf.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1537859109-25659-13-git-send-email-amo@semihalf.com/mbox/",
    "series": [
        {
            "id": 1482,
            "url": "http://patches.dpdk.org/api/series/1482/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1482",
            "date": "2018-09-25T07:04:56",
            "name": "net/mvpp2: add new features",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/1482/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/45300/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/45300/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 7D7535B2E;\n\tTue, 25 Sep 2018 09:06:02 +0200 (CEST)",
            "from mail-lj1-f175.google.com (mail-lj1-f175.google.com\n\t[209.85.208.175]) by dpdk.org (Postfix) with ESMTP id 5C8CF532C\n\tfor <dev@dpdk.org>; Tue, 25 Sep 2018 09:05:26 +0200 (CEST)",
            "by mail-lj1-f175.google.com with SMTP id r83-v6so2612505ljr.7\n\tfor <dev@dpdk.org>; Tue, 25 Sep 2018 00:05:26 -0700 (PDT)",
            "from amok.semihalf.local (31-172-191-173.noc.fibertech.net.pl.\n\t[31.172.191.173]) by smtp.googlemail.com with ESMTPSA id\n\t24-v6sm238306ljb.76.2018.09.25.00.05.24\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tTue, 25 Sep 2018 00:05:24 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=semihalf-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=CVIBrqVMNQjzvYK6JvLgcHm1biUzmsbKPscez2Xd+Uc=;\n\tb=aENAmkK8nVXMpu+e5jDpFQ2+gsPVBMEslr2J3cpGwWXggEdJIyDxtzrnZTK9KDuEwG\n\t81UEsFzOtNdP/vqTfa1axpoygFUEVDRssDxJgSJCnmyQbNxFB8CJ5YquOEX2WnHHTGpR\n\tuVtv7NQXsF5dx74PG6z1Q+CkV1Eb48r06fshZwXDOBLwq3coF2Jd+BXITumgDHxnq27h\n\t8s+HRISt+xoQEyDt3xNg0MGt3VyctmibnJv58EW9p1I+89NndkY5AlB4EoNfPC9C46BG\n\tfQnaqNwuOMkr5UVDa38zKCTyJvQWYPahMsBqfnWzfghxxGJAKBC5qqIRy3dDq5v2mYpm\n\tPHDw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=CVIBrqVMNQjzvYK6JvLgcHm1biUzmsbKPscez2Xd+Uc=;\n\tb=kKUiYCPTQZEYR8HJsOMjhpefoDGUnG6P+/jIWwWUyjyxOsEvl55WZv/itnWLO+iWcO\n\tOelhKD/8BB7CfRPnhMgJRUFXmZximelwLtfWE3Vt4PE2ervAm/EL+Cu8SfVW1jPQO9UY\n\tXtEZthHPc44rRzMH2r6FQP7XKlMnkfPcM/oY3f5Q5No3QbAygmrU6NZyffnu1QFY23Wl\n\tVrZCjYwrnrP1klgThn+GrsQe1ri881gmLAUN3biN8oPfzuQYl1iUiGV+dKdKsTw+PT9z\n\tMyRPcSkqWDhToSH7goFK+AZ5zcvFfOfnJcNj9NmxuPFrxi3vVnTE6YCbQg49vJ2CbPM/\n\tnxdg==",
        "X-Gm-Message-State": "ABuFfojBvVD53UTAh1op0zAJWM3+ubTYG350Gs0WqZxsM/auVfzJkV7c\n\tJddQ1xq15bq01x9yAs9PccuYwEPoGJBd1A==",
        "X-Google-Smtp-Source": "ACcGV61Jtvl9l5vLgmn082Oh2RghlHVQaxGg+RkmElRIfRp1z8dCG9lpo7qqa4NZaj+XBq4JW7LsIA==",
        "X-Received": "by 2002:a2e:94d5:: with SMTP id\n\tr21-v6mr1158944ljh.126.1537859125535; \n\tTue, 25 Sep 2018 00:05:25 -0700 (PDT)",
        "From": "Andrzej Ostruszka <amo@semihalf.com>",
        "To": "dev@dpdk.org",
        "Cc": "mw@semihalf.com, nadavh@marvell.com,\n\tNatalie Samsonov <nsamsono@marvell.com>",
        "Date": "Tue, 25 Sep 2018 09:05:08 +0200",
        "Message-Id": "<1537859109-25659-13-git-send-email-amo@semihalf.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1537859109-25659-1-git-send-email-amo@semihalf.com>",
        "References": "<1536068953-9352-1-git-send-email-tdu@semihalf.com>\n\t<1537859109-25659-1-git-send-email-amo@semihalf.com>",
        "Subject": "[dpdk-dev] [PATCH v3 12/13] net/mvpp2: document MTR and TM usage",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Natalie Samsonov <nsamsono@marvell.com>\n\nDocument MTR (metering) and TM (traffic management) usage plus\ndo some small updates here and there.\n\nSigned-off-by: Natalie Samsonov <nsamsono@marvell.com>\n---\n doc/guides/nics/img/mvpp2_tm.svg |  71 +++++++\n doc/guides/nics/mvpp2.rst        | 386 +++++++++++++++++++++++++++++++++------\n 2 files changed, 406 insertions(+), 51 deletions(-)\n create mode 100644 doc/guides/nics/img/mvpp2_tm.svg",
    "diff": "diff --git a/doc/guides/nics/img/mvpp2_tm.svg b/doc/guides/nics/img/mvpp2_tm.svg\nnew file mode 100644\nindex 0000000..4aa9272\n--- /dev/null\n+++ b/doc/guides/nics/img/mvpp2_tm.svg\n@@ -0,0 +1,71 @@\n+<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n+<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\" \"http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd\">\n+<svg width=\"16cm\" height=\"4cm\" viewBox=\"-1 -1 309 75\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n+  <g>\n+    <polyline style=\"fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000\" points=\"159.661,12.6759 141.655,12.6759 141.655,35.5606 88.1561,35.5606 88.1561,44.9245 \"/>\n+    <polygon style=\"fill: #000000\" points=\"88.1561,49.4245 85.1561,43.4245 88.1561,44.9245 91.1561,43.4245 \"/>\n+    <polygon style=\"fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000\" points=\"88.1561,49.4245 85.1561,43.4245 88.1561,44.9245 91.1561,43.4245 \"/>\n+  </g>\n+  <g>\n+    <polyline style=\"fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000\" points=\"159.661,12.6759 176.28,12.6759 176.28,35.5606 281.681,35.5606 281.681,44.9245 \"/>\n+    <polygon style=\"fill: #000000\" points=\"281.681,49.4245 278.681,43.4245 281.681,44.9245 284.681,43.4245 \"/>\n+    <polygon style=\"fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000\" points=\"281.681,49.4245 278.681,43.4245 281.681,44.9245 284.681,43.4245 \"/>\n+  </g>\n+  <g>\n+    <rect style=\"fill: #ffffff\" x=\"126.066\" y=\"0.98102\" width=\"67.1901\" height=\"23.3899\"/>\n+    <rect style=\"fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000\" x=\"126.066\" y=\"0.98102\" width=\"67.1901\" height=\"23.3899\"/>\n+  </g>\n+  <text font-size=\"12.7998\" style=\"fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal\" x=\"159.661\" y=\"17.1259\">\n+    <tspan x=\"159.661\" y=\"17.1259\">Port N</tspan>\n+  </text>\n+  <text font-size=\"12.7998\" style=\"fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal\" x=\"304.581\" y=\"68.168\">\n+    <tspan x=\"304.581\" y=\"68.168\"></tspan>\n+  </text>\n+  <g>\n+    <rect style=\"fill: #ffffff\" x=\"62.5504\" y=\"51.5478\" width=\"51.2114\" height=\"22.0925\"/>\n+    <rect style=\"fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000\" x=\"62.5504\" y=\"51.5478\" width=\"51.2114\" height=\"22.0925\"/>\n+  </g>\n+  <text font-size=\"12.7998\" style=\"fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal\" x=\"88.1561\" y=\"67.044\">\n+    <tspan x=\"88.1561\" y=\"67.044\">Txq 0</tspan>\n+  </text>\n+  <g>\n+    <rect style=\"fill: #ffffff\" x=\"134.1\" y=\"51.355\" width=\"51.1213\" height=\"22.478\"/>\n+    <rect style=\"fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000\" x=\"134.1\" y=\"51.355\" width=\"51.1213\" height=\"22.478\"/>\n+  </g>\n+  <text font-size=\"12.7998\" style=\"fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal\" x=\"159.661\" y=\"67.044\">\n+    <tspan x=\"159.661\" y=\"67.044\">Txq 1</tspan>\n+  </text>\n+  <g>\n+    <rect style=\"fill: #ffffff\" x=\"256.416\" y=\"51.5478\" width=\"50.5306\" height=\"22.0925\"/>\n+    <rect style=\"fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000\" x=\"256.416\" y=\"51.5478\" width=\"50.5306\" height=\"22.0925\"/>\n+  </g>\n+  <text font-size=\"12.7998\" style=\"fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal\" x=\"281.681\" y=\"67.044\">\n+    <tspan x=\"281.681\" y=\"67.044\">Txq M</tspan>\n+  </text>\n+  <text font-size=\"12.7998\" style=\"fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal\" x=\"101.822\" y=\"67.044\">\n+    <tspan x=\"101.822\" y=\"67.044\"></tspan>\n+  </text>\n+  <text font-size=\"12.7998\" style=\"fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal\" x=\"-0.537645\" y=\"17.1259\">\n+    <tspan x=\"-0.537645\" y=\"17.1259\">Level 0:</tspan>\n+  </text>\n+  <text font-size=\"12.7998\" style=\"fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal\" x=\"-0.746688\" y=\"67.044\">\n+    <tspan x=\"-0.746688\" y=\"67.044\">Level 1:</tspan>\n+  </text>\n+  <g>\n+    <ellipse style=\"fill: #000000\" cx=\"207.645\" cy=\"62.594\" rx=\"0.425344\" ry=\"0.425344\"/>\n+    <ellipse style=\"fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000\" cx=\"207.645\" cy=\"62.594\" rx=\"0.425344\" ry=\"0.425344\"/>\n+  </g>\n+  <g>\n+    <ellipse style=\"fill: #000000\" cx=\"219.525\" cy=\"62.594\" rx=\"0.425344\" ry=\"0.425344\"/>\n+    <ellipse style=\"fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000\" cx=\"219.525\" cy=\"62.594\" rx=\"0.425344\" ry=\"0.425344\"/>\n+  </g>\n+  <g>\n+    <ellipse style=\"fill: #000000\" cx=\"231.405\" cy=\"62.594\" rx=\"0.425345\" ry=\"0.425345\"/>\n+    <ellipse style=\"fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000\" cx=\"231.405\" cy=\"62.594\" rx=\"0.425345\" ry=\"0.425345\"/>\n+  </g>\n+  <g>\n+    <line style=\"fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000\" x1=\"159.661\" y1=\"24.3709\" x2=\"159.661\" y2=\"45.737\"/>\n+    <polygon style=\"fill: #000000\" points=\"159.661,50.237 156.661,44.237 159.661,45.737 162.661,44.237 \"/>\n+    <polygon style=\"fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000\" points=\"159.661,50.237 156.661,44.237 159.661,45.737 162.661,44.237 \"/>\n+  </g>\n+</svg>\ndiff --git a/doc/guides/nics/mvpp2.rst b/doc/guides/nics/mvpp2.rst\nindex 3b3f8c6..59fa0e1 100644\n--- a/doc/guides/nics/mvpp2.rst\n+++ b/doc/guides/nics/mvpp2.rst\n@@ -56,7 +56,7 @@ Features of the MVPP2 PMD are:\n \n - Speed capabilities\n - Link status\n-- Queue start/stop\n+- Tx Queue start/stop\n - MTU update\n - Jumbo frame\n - Promiscuous mode\n@@ -70,12 +70,13 @@ Features of the MVPP2 PMD are:\n - L4 checksum offload\n - Packet type parsing\n - Basic stats\n-- Extended stats\n-- QoS\n+- :ref:`Extended stats <extstats>`\n - RX flow control\n-- TX queue start/stop\n - Scattered TX frames\n-\n+- :ref:`QoS <qossupport>`\n+- :ref:`Flow API <flowapi>`\n+- :ref:`Traffic metering and policing <mtrapi>`\n+- :ref:`Traffic Management API <tmapi>`\n \n Limitations\n -----------\n@@ -89,6 +90,20 @@ Limitations\n   functionality. Current workaround is to reset board so that PPv2 has a\n   chance to start in a sane state.\n \n+- MUSDK architecture does not support changing configuration in run time.\n+  All nessesary configurations should be done before first dev_start().\n+\n+- RX queue start/stop is not supported.\n+\n+- Current implementation does not support replacement of buffers in the HW buffer pool\n+  at run time, so it is responsibility of the application to ensure that MTU does not exceed the configured buffer size.\n+\n+- Configuring TX flow control currently is not supported.\n+\n+- In current implementation, mechanism for acknowledging transmitted packets (``tx_done_cleanup``) is not supported.\n+\n+- Running more than one DPDK-MUSDK application simultaneously is not supported.\n+\n \n Prerequisites\n -------------\n@@ -139,6 +154,92 @@ The following options can be modified in the ``config`` file.\n \n        When MVPP2 PMD is enabled ``CONFIG_RTE_LIBRTE_MVNETA_PMD`` must be disabled\n \n+\n+Building DPDK\n+-------------\n+\n+Driver needs precompiled MUSDK library during compilation.\n+\n+.. code-block:: console\n+\n+   export CROSS_COMPILE=<toolchain>/bin/aarch64-linux-gnu-\n+   ./bootstrap\n+   ./configure --host=aarch64-linux-gnu\n+   make install\n+\n+MUSDK will be installed to `usr/local` under current directory.\n+For the detailed build instructions please consult ``doc/musdk_get_started.txt``.\n+\n+Before the DPDK build process the environmental variable ``LIBMUSDK_PATH`` with\n+the path to the MUSDK installation directory needs to be exported.\n+\n+For additional instructions regarding DPDK cross compilation please refer to :doc:`Cross compile DPDK for ARM64 <../linux_gsg/cross_build_dpdk_for_arm64>`.\n+\n+.. code-block:: console\n+\n+   export LIBMUSDK_PATH=<musdk>/usr/local\n+   export CROSS=<toolchain>/bin/aarch64-linux-gnu-\n+   export RTE_KERNELDIR=<kernel-dir>\n+   export RTE_TARGET=arm64-armv8a-linuxapp-gcc\n+\n+   make config T=arm64-armv8a-linuxapp-gcc\n+   sed -i \"s/MVNETA_PMD=y/MVNETA_PMD=n/\" build/.config\n+   sed -i \"s/MVPP2_PMD=n/MVPP2_PMD=y/\" build/.config\n+   make\n+\n+Usage Example\n+-------------\n+\n+MVPP2 PMD requires extra out of tree kernel modules to function properly.\n+`musdk_cma` sources are part of the MUSDK. Please consult\n+``doc/musdk_get_started.txt`` for the detailed build instructions.\n+For `mvpp2x_sysfs` please consult ``Documentation/pp22_sysfs.txt`` for the\n+detailed build instructions.\n+\n+.. code-block:: console\n+\n+   insmod musdk_cma.ko\n+   insmod mvpp2x_sysfs.ko\n+\n+Additionally interfaces used by DPDK application need to be put up:\n+\n+.. code-block:: console\n+\n+   ip link set eth0 up\n+   ip link set eth2 up\n+\n+In order to run testpmd example application following command can be used:\n+\n+.. code-block:: console\n+\n+   ./testpmd --vdev=eth_mvpp2,iface=eth0,iface=eth2 -c 7 -- \\\n+     --burst=128 --txd=2048 --rxd=1024 --rxq=2 --txq=2  --nb-cores=2 \\\n+     -i -a --rss-udp\n+\n+.. _extstats:\n+\n+Extended stats\n+--------------\n+\n+MVPP2 PMD supports the following extended statistics:\n+\n+\t- ``rx_bytes``:\tnumber of RX bytes\n+\t- ``rx_packets``: number of RX packets\n+\t- ``rx_unicast_packets``: number of RX unicast packets\n+\t- ``rx_errors``: number of RX MAC errors\n+\t- ``rx_fullq_dropped``: number of RX packets dropped due to full RX queue\n+\t- ``rx_bm_dropped``: number of RX packets dropped due to no available buffers in the HW pool\n+\t- ``rx_early_dropped``: number of RX packets that were early dropped\n+\t- ``rx_fifo_dropped``: number of RX packets dropped due to RX fifo overrun\n+\t- ``rx_cls_dropped``: number of RX packets dropped by classifier\n+\t- ``tx_bytes``: number of TX bytes\n+\t- ``tx_packets``: number of TX packets\n+\t- ``tx_unicast_packets``: number of TX unicast packets\n+\t- ``tx_errors``: number of TX MAC errors\n+\n+\n+.. _qossupport:\n+\n QoS Configuration\n -----------------\n \n@@ -302,39 +403,14 @@ Usage example\n    ./testpmd --vdev=eth_mvpp2,iface=eth0,iface=eth2,cfg=/home/user/mrvl.conf \\\n      -c 7 -- -i -a --disable-hw-vlan-strip --rxq=3 --txq=3\n \n-\n-Building DPDK\n--------------\n-\n-Driver needs precompiled MUSDK library during compilation.\n-\n-.. code-block:: console\n-\n-   export CROSS_COMPILE=<toolchain>/bin/aarch64-linux-gnu-\n-   ./bootstrap\n-   ./configure --host=aarch64-linux-gnu\n-   make install\n-\n-MUSDK will be installed to `usr/local` under current directory.\n-For the detailed build instructions please consult ``doc/musdk_get_started.txt``.\n-\n-Before the DPDK build process the environmental variable ``LIBMUSDK_PATH`` with\n-the path to the MUSDK installation directory needs to be exported.\n-\n-.. code-block:: console\n-\n-   export LIBMUSDK_PATH=<musdk>/usr/local\n-   export CROSS=aarch64-linux-gnu-\n-   make config T=arm64-armv8a-linuxapp-gcc\n-   sed -i \"s/MVNETA_PMD=y/MVNETA_PMD=n/\" build/.config\n-   sed -i \"s/MVPP2_PMD=n/MVPP2_PMD=y/\" build/.config\n-   make\n+.. _flowapi:\n \n Flow API\n --------\n \n PPv2 offers packet classification capabilities via classifier engine which\n can be configured via generic flow API offered by DPDK.\n+For an additional description please refer to DPDK :ref:`Generic flow API <Generic_flow_API>`.\n \n Supported flow actions\n ~~~~~~~~~~~~~~~~~~~~~~\n@@ -495,31 +571,239 @@ Following limitations need to be taken into account while creating flow rules:\n For additional information about classifier please consult\n ``doc/musdk_cls_user_guide.txt``.\n \n-Usage Example\n--------------\n+.. _mtrapi:\n \n-MVPP2 PMD requires extra out of tree kernel modules to function properly.\n-`musdk_cma` sources are part of the MUSDK. Please consult\n-``doc/musdk_get_started.txt`` for the detailed build instructions.\n-For `mvpp2x_sysfs` please consult ``Documentation/pp22_sysfs.txt`` for the\n-detailed build instructions.\n+Traffic metering and policing\n+-----------------------------\n \n-.. code-block:: console\n+MVPP2 PMD supports DPDK traffic metering and policing that allows the following:\n \n-   insmod musdk_cma.ko\n-   insmod mvpp2x_sysfs.ko\n+1. Meter ingress traffic.\n+2. Do policing.\n+3. Gather statistics.\n \n-Additionally interfaces used by DPDK application need to be put up:\n+For an additional description please refer to DPDK :doc:`Traffic Metering and Policing API <../prog_guide/traffic_metering_and_policing>`.\n \n-.. code-block:: console\n+The policer objects defined by this feature can work with the default policer defined via config file as discribed in :ref:`QoS Support <qossupport>`.\n \n-   ip link set eth0 up\n-   ip link set eth2 up\n+Limitations\n+~~~~~~~~~~~\n \n-In order to run testpmd example application following command can be used:\n+The following capabilities are not supported:\n \n-.. code-block:: console\n+- MTR object meter DSCP table update\n+- MTR object policer action update\n+- MTR object enabled statistics\n \n-   ./testpmd --vdev=eth_mvpp2,iface=eth0,iface=eth2 -c 7 -- \\\n-     --burst=128 --txd=2048 --rxd=1024 --rxq=2 --txq=2  --nb-cores=2 \\\n-     -i -a --rss-udp\n+Usage example\n+~~~~~~~~~~~~~\n+\n+1. Run testpmd user app:\n+\n+   .. code-block:: console\n+\n+\t\t./testpmd --vdev=eth_mvpp2,iface=eth0,iface=eth2 -c 6 -- -i -p 3 -a --txd 1024 --rxd 1024\n+\n+2. Create meter profile:\n+\n+   .. code-block:: console\n+\n+\t\ttestpmd> add port meter profile 0 0 srtcm_rfc2697 2000 256 256\n+\n+3. Create meter:\n+\n+   .. code-block:: console\n+\n+\t\ttestpmd> create port meter 0 0 0 yes d d d 0 1 0\n+\n+4. Create flow rule witch meter attached:\n+\n+   .. code-block:: console\n+\n+\t\ttestpmd> flow create 0 ingress pattern ipv4 src is 10.10.10.1 / end actions meter mtr_id 0 / end\n+\n+For a detailed usage description please refer to \"Traffic Metering and Policing\" section in DPDK :doc:`Testpmd Runtime Functions <../testpmd_app_ug/testpmd_funcs>`.\n+\n+\n+\n+.. _tmapi:\n+\n+Traffic Management API\n+----------------------\n+\n+MVPP2 PMD supports generic DPDK Traffic Management API which allows to\n+configure the following features:\n+\n+1. Hierarchical scheduling\n+2. Traffic shaping\n+3. Congestion management\n+4. Packet marking\n+\n+Internally TM is represented by a hierarchy (tree) of nodes.\n+Node which has a parent is called a leaf whereas node without\n+parent is called a non-leaf (root).\n+MVPP2 PMD supports two level hierarchy where level 0 represents ports and level 1 represents tx queues of a given port.\n+\n+.. figure:: img/mvpp2_tm.svg\n+\n+Nodes hold following types of settings:\n+\n+- for egress scheduler configuration: weight\n+- for egress rate limiter: private shaper\n+- bitmask indicating which statistics counters will be read\n+\n+Hierarchy is always constructed from the top, i.e first a root node is added\n+then some number of leaf nodes. Number of leaf nodes cannot exceed number\n+of configured tx queues.\n+\n+After hierarchy is complete it can be committed.\n+\n+\n+For an additional description please refer to DPDK :doc:`Traffic Management API <../prog_guide/traffic_management>`.\n+\n+Limitations\n+~~~~~~~~~~~\n+\n+The following capabilities are not supported:\n+\n+- Traffic manager WRED profile and WRED context\n+- Traffic manager shared shaper update\n+- Traffic manager packet marking\n+- Maximum number of levels in hierarchy is 2\n+- Currently dynamic change of a hierarchy is not supported\n+\n+Usage example\n+~~~~~~~~~~~~~\n+\n+For a detailed usage description please refer to \"Traffic Management\" section in DPDK :doc:`Testpmd Runtime Functions <../testpmd_app_ug/testpmd_funcs>`.\n+\n+1. Run testpmd as follows:\n+\n+   .. code-block:: console\n+\n+\t\t./testpmd --vdev=net_mrvl,iface=eth0,iface=eth2,cfg=./qos_config -c 7 -- \\\n+\t\t-i -p 3 --disable-hw-vlan-strip --rxq 3 --txq 3 --txd 1024 --rxd 1024\n+\n+2. Stop all ports:\n+\n+   .. code-block:: console\n+\n+\t\ttestpmd> port stop all\n+\n+3. Add shaper profile:\n+\n+   .. code-block:: console\n+\n+\t\ttestpmd> add port tm node shaper profile 0 0 900000 70000 0\n+\n+   Parameters have following meaning::\n+\n+\t\t0       - Id of a port.\n+\t\t0       - Id of a new shaper profile.\n+\t\t900000  - Shaper rate in bytes/s.\n+\t\t70000   - Bucket size in bytes.\n+\t\t0       - Packet length adjustment - ignored.\n+\n+4. Add non-leaf node for port 0:\n+\n+   .. code-block:: console\n+\n+\t\ttestpmd> add port tm nonleaf node 0 3 -1 0 0 0 0 0 1 3 0\n+\n+   Parameters have following meaning::\n+\n+\t\t 0  - Id of a port\n+\t\t 3  - Id of a new node.\n+\t\t-1  - Indicate that root does not have a parent.\n+\t\t 0  - Priority of the node.\n+\t\t 0  - Weight of the node.\n+\t\t 0  - Id of a level. Since this is a root 0 is passed.\n+\t\t 0  - Id of the shaper profile.\n+\t\t 0  - Number of SP priorities.\n+\t\t 3  - Enable statistics for both number of transmitted packets and bytes.\n+\t\t 0  - Number of shared shapers.\n+\n+5. Add leaf node for tx queue 0:\n+\n+   .. code-block:: console\n+\n+\t\ttestpmd> add port tm leaf node 0 0 3 0 30 1 -1 0 0 1 0\n+\n+   Parameters have following meaning::\n+\n+\t\t 0  - Id of a port.\n+\t\t 0  - Id of a new node.\n+\t\t 3  - Id of the parent node.\n+\t\t 0  - Priority of a node.\n+\t\t 30 - WRR weight.\n+\t\t 1  - Id of a level. Since this is a leaf node 1 is passed.\n+\t\t-1  - Id of a shaper. -1 indicates that shaper is not attached.\n+\t\t 0  - Congestion management is not supported.\n+\t\t 0  - Congestion management is not supported.\n+\t\t 1  - Enable statistics counter for number of transmitted packets.\n+\t\t 0  - Number of shared shapers.\n+\n+6. Add leaf node for tx queue 1:\n+\n+   .. code-block:: console\n+\n+\ttestpmd> add port tm leaf node 0 1 3 0 60 1 -1 0 0 1 0\n+\n+   Parameters have following meaning::\n+\n+\t\t 0  - Id of a port.\n+\t\t 1  - Id of a new node.\n+\t\t 3  - Id of the parent node.\n+\t\t 0  - Priority of a node.\n+\t\t 60 - WRR weight.\n+\t\t 1  - Id of a level. Since this is a leaf node 1 is passed.\n+\t\t-1  - Id of a shaper. -1 indicates that shaper is not attached.\n+\t\t 0  - Congestion management is not supported.\n+\t\t 0  - Congestion management is not supported.\n+\t\t 1  - Enable statistics counter for number of transmitted packets.\n+\t\t 0  - Number of shared shapers.\n+\n+7. Add leaf node for tx queue 2:\n+\n+   .. code-block:: console\n+\n+\t\ttestpmd> add port tm leaf node 0 2 3 0 99 1 -1 0 0 1 0\n+\n+   Parameters have following meaning::\n+\n+\t\t 0  - Id of a port.\n+\t\t 2  - Id of a new node.\n+\t\t 3  - Id of the parent node.\n+\t\t 0  - Priority of a node.\n+\t\t 99 - WRR weight.\n+\t\t 1  - Id of a level. Since this is a leaf node 1 is passed.\n+\t\t-1  - Id of a shaper. -1 indicates that shaper is not attached.\n+\t\t 0  - Congestion management is not supported.\n+\t\t 0  - Congestion management is not supported.\n+\t\t 1  - Enable statistics counter for number of transmitted packets.\n+\t\t 0  - Number of shared shapers.\n+\n+8. Commit hierarchy:\n+\n+   .. code-block:: console\n+\n+\t\ttestpmd> port tm hierarchy commit 0 no\n+\n+  Parameters have following meaning::\n+\n+\t\t0  - Id of a port.\n+\t\tno - Do not flush TM hierarchy if commit fails.\n+\n+9. Start all ports\n+\n+   .. code-block:: console\n+\n+\t\ttestpmd> port start all\n+\n+\n+\n+10. Enable forwarding\n+\n+   .. code-block:: console\n+\n+\t\ttestpmd> start\n",
    "prefixes": [
        "v3",
        "12/13"
    ]
}