From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) by dpdk.org (Postfix) with ESMTP id F24CB58CB for ; Tue, 4 Sep 2018 15:49:35 +0200 (CEST) Received: by mail-lj1-f177.google.com with SMTP id l15-v6so3211189lji.6 for ; Tue, 04 Sep 2018 06:49:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gXu7oWUNC8RzkdIcHwLyaka0ZDKRmxy258w/vT6PZRU=; b=fM76xGmZveJUxdw5FoE4MXuqAcDf6LqzyB7pE8UB6SsYb0Fuyla/HpZvz9d1VyFHxS t28S7RKHBr1xORw6UcmixnJt0frIEKtB5CEG2k68TWlYaUqcF6og9OTR/jcM0+00LRkn NIYcnYslV/DbZuUTmOdIlVRXFB8Yits3rLFjfUXnzTY+Nj2wTcv1mX6ksX6JQ0zUEIRC tWiOFyZ82ZEkOKRrRJOiMFEQ/xSKOOX6X8bSKaWhSD75wRJCDsVGySP0Qqkuk74V21m1 v+crEHl2mQDEKaBQwC4rtX9uXWklIEsdkQCX5Hrz8kDKh4cx0xkbpjx41I8+mcIJeIxP JONQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gXu7oWUNC8RzkdIcHwLyaka0ZDKRmxy258w/vT6PZRU=; b=QYZgEA6RsRf7ugsqSwh209epfX0rkqDhE6x3Ru2phUAxvVK6PY0akz+jHOGY5vzd2x FXBOwga19bEcjGrruQzaf2Mym1ebZ68WbCtj7Y8z0ZTVdq/zCXl26BLSSXPWOw4xS4C3 hwvb6KHlvwM821l1FZ5/mSLK34ThIecIWPFlrXPukcF879xY9NvKWnFXCYXCfcasvlI8 YHY5ckiHt3TWjPuke5mcmip8vLoTKIzFl5EtDMSVJDd8T9z7bE7gKdZdMldUIiF66jmF f7zIMGGHs1E/zkbqAHrJTNcoPEFuo5rGOWoGJw0DSOevtP0BVBm+c7UNKWPgkKqxOn0R tY8g== X-Gm-Message-State: APzg51Dnk95kq2HaaQ08i1c+MzOTEKMXfZ8k8ClklDuKSKY0KzOsarzA Gx3Ciupfd0HIpT999pf9II0W/cRr4PND/A== X-Google-Smtp-Source: ANB0VdZsYjRh10nMPbqg5Qzx6a0sRdx2gKZkfssipqz3nmzNgX0PKgXbsxpz5W/hTVZ+OhSSC39smA== X-Received: by 2002:a2e:9599:: with SMTP id w25-v6mr10866637ljh.6.1536068974906; Tue, 04 Sep 2018 06:49:34 -0700 (PDT) Received: from sh.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id q22-v6sm4057225lff.10.2018.09.04.06.49.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Sep 2018 06:49:34 -0700 (PDT) From: Tomasz Duszynski To: dev@dpdk.org Cc: nsamsono@marvell.com, mw@semihalf.com Date: Tue, 4 Sep 2018 15:49:12 +0200 Message-Id: <1536068953-9352-12-git-send-email-tdu@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536068953-9352-1-git-send-email-tdu@semihalf.com> References: <1536045016-32008-1-git-send-email-tdu@semihalf.com> <1536068953-9352-1-git-send-email-tdu@semihalf.com> Subject: [dpdk-dev] [PATCH v2 11/12] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2018 13:49:36 -0000 From: Natalie Samsonov Document MTR (metering) and TM (traffic management) usage plus do some small updates here and there. Signed-off-by: Natalie Samsonov --- doc/guides/nics/img/mvpp2_tm.png | Bin 0 -> 5355 bytes doc/guides/nics/mvpp2.rst | 386 +++++++++++++++++++++++++++++++++------ 2 files changed, 335 insertions(+), 51 deletions(-) create mode 100644 doc/guides/nics/img/mvpp2_tm.png diff --git a/doc/guides/nics/img/mvpp2_tm.png b/doc/guides/nics/img/mvpp2_tm.png new file mode 100644 index 0000000000000000000000000000000000000000..3c709bab43950c39578a6726ab570008bc722e2f GIT binary patch literal 5355 zcmeHL=U-FX(%vBudXXkgk$yk~Q3z53C{4tG2UHXUA}B>dITY!TXatcaBA^CDq^Ssr zCm^CUrK6#X3B82Sh0sfYyYXJ{?|ttda6jD-N!EJy+B5T;HS^3&;x1U3^KwaW0RX^j zan{5J03dj9oy`FQzty7x?ZF>NfQ|VXprlP|8r-nDpGKYrfOpB<%Y8zcaP zDFOfn2LM|jgqZ?>pyL2Ag8~5ECjfBJFZ1J{`T!v8X<>5uVu;gxmWHpCwopu(RsOlO zTRdWBT=}-w#kM&8XB8m>H1-e8(tgE_MyK7NFETZ_#dTX7dceJvyv!n4WfgP@VK0ZDLsi{Kr==N21k2U?z zh;Odm{jBgv8E*7eTXazv8@$#ngcrb9yRn0SArZn-XZ+&Qf!{!Mk#1cFrf*RKfJc(~ zC@WdfC@5=8tWlBdZ(#3oP)rV_Y*Y(CZ#_FioYvc`g>mrkV=tTj8z`RPF^1l%^8zR< zT6(DN;9V@QfY@P{;s^f*9KMUkzA^7TLel(_bQNZI8>u+HAP1|wJ z7w}3L2I)+K!Xqc8DFAjYN{<@(BvW>q6N*HmjqQ`NEc zh1S`Rut$KW-A~TUfg;xlU)L~+hKQd<=76v+epG8j1n#0MBfx6HA{5$e@O8GU`0RSF z<3ppHe5d-TI08h{s9O+SCyD&p;^trw-!FuAstODG;oWSUUe7AnmB``YR2>n@E*5%> z8Of38ot0Q==k#Mj6E$v|ygegS8`B2fZpa;ENVQq*i%AqK=1Ba0U@0$dqG=_t7o zn+p(0)PE>A;qKw^7R>FD#yx*o}`^4G8lk9kP z=W6D#DN7d_r>Mx_=#uH^KsJfY4clk`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i4ted4(KbUTWh;xRwH^fatgt;iy>&CyY`{w9Zl^D0Y0|PmYU$EytdRRNX>>$|6wx(stD*RB3ZO}74JU< z@DC)2A66WFTDK~4_H{TXGNVpLAQCRDH8U&B` z?Y4Cq5nae9fn8?2ltcXuaq?9e2l-I426&8-=d6qO?_iNcjc-N3_FKk+fe{4x(Eh6N zHSB`~IlBcU*-2K)DJ=sy1&Rwq^bb3}{%8arj}KXy#o ti<%uDA3wda5=aON0EaxVnuTof6LM+ivt4^5!G9wG3sWnTk~63~{{Y^!D~|vG literal 0 HcmV?d00001 diff --git a/doc/guides/nics/mvpp2.rst b/doc/guides/nics/mvpp2.rst index 3b3f8c6..e7f45c3 100644 --- a/doc/guides/nics/mvpp2.rst +++ b/doc/guides/nics/mvpp2.rst @@ -56,7 +56,7 @@ Features of the MVPP2 PMD are: - Speed capabilities - Link status -- Queue start/stop +- Tx Queue start/stop - MTU update - Jumbo frame - Promiscuous mode @@ -70,12 +70,13 @@ Features of the MVPP2 PMD are: - L4 checksum offload - Packet type parsing - Basic stats -- Extended stats -- QoS +- :ref:`Extended stats ` - RX flow control -- TX queue start/stop - Scattered TX frames - +- :ref:`QoS ` +- :ref:`Flow API ` +- :ref:`Traffic metering and policing ` +- :ref:`Traffic Management API ` Limitations ----------- @@ -89,6 +90,20 @@ Limitations functionality. Current workaround is to reset board so that PPv2 has a chance to start in a sane state. +- MUSDK architecture does not support changing configuration in run time. + All nessesary configurations should be done before first dev_start(). + +- RX queue start/stop is not supported. + +- Current implementation does not support replacement of buffers in the HW buffer pool + at run time, so it is responsibility of the application to ensure that MTU does not exceed the configured buffer size. + +- Configuring TX flow control currently is not supported. + +- In current implementation, mechanism for acknowledging transmitted packets (``tx_done_cleanup``) is not supported. + +- Running more than one DPDK-MUSDK application simultaneously is not supported. + Prerequisites ------------- @@ -139,6 +154,92 @@ The following options can be modified in the ``config`` file. When MVPP2 PMD is enabled ``CONFIG_RTE_LIBRTE_MVNETA_PMD`` must be disabled + +Building DPDK +------------- + +Driver needs precompiled MUSDK library during compilation. + +.. code-block:: console + + export CROSS_COMPILE=/bin/aarch64-linux-gnu- + ./bootstrap + ./configure --host=aarch64-linux-gnu + make install + +MUSDK will be installed to `usr/local` under current directory. +For the detailed build instructions please consult ``doc/musdk_get_started.txt``. + +Before the DPDK build process the environmental variable ``LIBMUSDK_PATH`` with +the path to the MUSDK installation directory needs to be exported. + +For additional instructions regarding DPDK cross compilation please refer to :doc:`Cross compile DPDK for ARM64 <../linux_gsg/cross_build_dpdk_for_arm64>`. + +.. code-block:: console + + export LIBMUSDK_PATH=/usr/local + export CROSS=/bin/aarch64-linux-gnu- + export RTE_KERNELDIR= + export RTE_TARGET=arm64-armv8a-linuxapp-gcc + + make config T=arm64-armv8a-linuxapp-gcc + sed -i "s/MVNETA_PMD=y/MVNETA_PMD=n/" build/.config + sed -i "s/MVPP2_PMD=n/MVPP2_PMD=y/" build/.config + make + +Usage Example +------------- + +MVPP2 PMD requires extra out of tree kernel modules to function properly. +`musdk_cma` sources are part of the MUSDK. Please consult +``doc/musdk_get_started.txt`` for the detailed build instructions. +For `mvpp2x_sysfs` please consult ``Documentation/pp22_sysfs.txt`` for the +detailed build instructions. + +.. code-block:: console + + insmod musdk_cma.ko + insmod mvpp2x_sysfs.ko + +Additionally interfaces used by DPDK application need to be put up: + +.. code-block:: console + + ip link set eth0 up + ip link set eth2 up + +In order to run testpmd example application following command can be used: + +.. code-block:: console + + ./testpmd --vdev=eth_mvpp2,iface=eth0,iface=eth2 -c 7 -- \ + --burst=128 --txd=2048 --rxd=1024 --rxq=2 --txq=2 --nb-cores=2 \ + -i -a --rss-udp + +.. _extstats: + +Extended stats +-------------- + +MVPP2 PMD supports the following extended statistics: + + - ``rx_bytes``: number of RX bytes + - ``rx_packets``: number of RX packets + - ``rx_unicast_packets``: number of RX unicast packets + - ``rx_errors``: number of RX MAC errors + - ``rx_fullq_dropped``: number of RX packets dropped due to full RX queue + - ``rx_bm_dropped``: number of RX packets dropped due to no available buffers in the HW pool + - ``rx_early_dropped``: number of RX packets that were early dropped + - ``rx_fifo_dropped``: number of RX packets dropped due to RX fifo overrun + - ``rx_cls_dropped``: number of RX packets dropped by classifier + - ``tx_bytes``: number of TX bytes + - ``tx_packets``: number of TX packets + - ``tx_unicast_packets``: number of TX unicast packets + - ``tx_errors``: number of TX MAC errors + + +.. _qossupport: + QoS Configuration ----------------- @@ -302,39 +403,14 @@ Usage example ./testpmd --vdev=eth_mvpp2,iface=eth0,iface=eth2,cfg=/home/user/mrvl.conf \ -c 7 -- -i -a --disable-hw-vlan-strip --rxq=3 --txq=3 - -Building DPDK -------------- - -Driver needs precompiled MUSDK library during compilation. - -.. code-block:: console - - export CROSS_COMPILE=/bin/aarch64-linux-gnu- - ./bootstrap - ./configure --host=aarch64-linux-gnu - make install - -MUSDK will be installed to `usr/local` under current directory. -For the detailed build instructions please consult ``doc/musdk_get_started.txt``. - -Before the DPDK build process the environmental variable ``LIBMUSDK_PATH`` with -the path to the MUSDK installation directory needs to be exported. - -.. code-block:: console - - export LIBMUSDK_PATH=/usr/local - export CROSS=aarch64-linux-gnu- - make config T=arm64-armv8a-linuxapp-gcc - sed -i "s/MVNETA_PMD=y/MVNETA_PMD=n/" build/.config - sed -i "s/MVPP2_PMD=n/MVPP2_PMD=y/" build/.config - make +.. _flowapi: Flow API -------- PPv2 offers packet classification capabilities via classifier engine which can be configured via generic flow API offered by DPDK. +For an additional description please refer to DPDK :ref:`Generic flow API `. Supported flow actions ~~~~~~~~~~~~~~~~~~~~~~ @@ -495,31 +571,239 @@ Following limitations need to be taken into account while creating flow rules: For additional information about classifier please consult ``doc/musdk_cls_user_guide.txt``. -Usage Example -------------- +.. _mtrapi: -MVPP2 PMD requires extra out of tree kernel modules to function properly. -`musdk_cma` sources are part of the MUSDK. Please consult -``doc/musdk_get_started.txt`` for the detailed build instructions. -For `mvpp2x_sysfs` please consult ``Documentation/pp22_sysfs.txt`` for the -detailed build instructions. +Traffic metering and policing +----------------------------- -.. code-block:: console +MVPP2 PMD supports DPDK traffic metering and policing that allows the following: - insmod musdk_cma.ko - insmod mvpp2x_sysfs.ko +1. Meter ingress traffic. +2. Do policing. +3. Gather statistics. -Additionally interfaces used by DPDK application need to be put up: +For an additional description please refer to DPDK :doc:`Traffic Metering and Policing API <../prog_guide/traffic_metering_and_policing>`. -.. code-block:: console +The policer objects defined by this feature can work with the default policer defined via config file as discribed in :ref:`QoS Support `. - ip link set eth0 up - ip link set eth2 up +Limitations +~~~~~~~~~~~ -In order to run testpmd example application following command can be used: +The following capabilities are not supported: -.. code-block:: console +- MTR object meter DSCP table update +- MTR object policer action update +- MTR object enabled statistics - ./testpmd --vdev=eth_mvpp2,iface=eth0,iface=eth2 -c 7 -- \ - --burst=128 --txd=2048 --rxd=1024 --rxq=2 --txq=2 --nb-cores=2 \ - -i -a --rss-udp +Usage example +~~~~~~~~~~~~~ + +1. Run testpmd user app: + + .. code-block:: console + + ./testpmd --vdev=eth_mvpp2,iface=eth0,iface=eth2 -c 6 -- -i -p 3 -a --txd 1024 --rxd 1024 + +2. Create meter profile: + + .. code-block:: console + + testpmd> add port meter profile 0 0 srtcm_rfc2697 2000 256 256 + +3. Create meter: + + .. code-block:: console + + testpmd> create port meter 0 0 0 yes d d d 0 1 0 + +4. Create flow rule witch meter attached: + + .. code-block:: console + + testpmd> flow create 0 ingress pattern ipv4 src is 10.10.10.1 / end actions meter mtr_id 0 / end + +For a detailed usage description please refer to "Traffic Metering and Policing" section in DPDK :doc:`Testpmd Runtime Functions <../testpmd_app_ug/testpmd_funcs>`. + + + +.. _tmapi: + +Traffic Management API +---------------------- + +MVPP2 PMD supports generic DPDK Traffic Management API which allows to +configure the following features: + +1. Hierarchical scheduling +2. Traffic shaping +3. Congestion management +4. Packet marking + +Internally TM is represented by a hierarchy (tree) of nodes. +Node which has a parent is called a leaf whereas node without +parent is called a non-leaf (root). +MVPP2 PMD supports two level hierarchy where level 0 represents ports and level 1 represents tx queues of a given port. + +.. figure:: img/mvpp2_tm.png + +Nodes hold following types of settings: + +- for egress scheduler configuration: weight +- for egress rate limiter: private shaper +- bitmask indicating which statistics counters will be read + +Hierarchy is always constructed from the top, i.e first a root node is added +then some number of leaf nodes. Number of leaf nodes cannot exceed number +of configured tx queues. + +After hierarchy is complete it can be committed. + + +For an additional description please refer to DPDK :doc:`Traffic Management API <../prog_guide/traffic_management>`. + +Limitations +~~~~~~~~~~~ + +The following capabilities are not supported: + +- Traffic manager WRED profile and WRED context +- Traffic manager shared shaper update +- Traffic manager packet marking +- Maximum number of levels in hierarchy is 2 +- Currently dynamic change of a hierarchy is not supported + +Usage example +~~~~~~~~~~~~~ + +For a detailed usage description please refer to "Traffic Management" section in DPDK :doc:`Testpmd Runtime Functions <../testpmd_app_ug/testpmd_funcs>`. + +1. Run testpmd as follows: + + .. code-block:: console + + ./testpmd --vdev=net_mrvl,iface=eth0,iface=eth2,cfg=./qos_config -c 7 -- \ + -i -p 3 --disable-hw-vlan-strip --rxq 3 --txq 3 --txd 1024 --rxd 1024 + +2. Stop all ports: + + .. code-block:: console + + testpmd> port stop all + +3. Add shaper profile: + + .. code-block:: console + + testpmd> add port tm node shaper profile 0 0 900000 70000 0 + + Parameters have following meaning:: + + 0 - Id of a port. + 0 - Id of a new shaper profile. + 900000 - Shaper rate in bytes/s. + 70000 - Bucket size in bytes. + 0 - Packet length adjustment - ignored. + +4. Add non-leaf node for port 0: + + .. code-block:: console + + testpmd> add port tm nonleaf node 0 3 -1 0 0 0 0 0 1 3 0 + + Parameters have following meaning:: + + 0 - Id of a port + 3 - Id of a new node. + -1 - Indicate that root does not have a parent. + 0 - Priority of the node. + 0 - Weight of the node. + 0 - Id of a level. Since this is a root 0 is passed. + 0 - Id of the shaper profile. + 0 - Number of SP priorities. + 3 - Enable statistics for both number of transmitted packets and bytes. + 0 - Number of shared shapers. + +5. Add leaf node for tx queue 0: + + .. code-block:: console + + testpmd> add port tm leaf node 0 0 3 0 30 1 -1 0 0 1 0 + + Parameters have following meaning:: + + 0 - Id of a port. + 0 - Id of a new node. + 3 - Id of the parent node. + 0 - Priority of a node. + 30 - WRR weight. + 1 - Id of a level. Since this is a leaf node 1 is passed. + -1 - Id of a shaper. -1 indicates that shaper is not attached. + 0 - Congestion management is not supported. + 0 - Congestion management is not supported. + 1 - Enable statistics counter for number of transmitted packets. + 0 - Number of shared shapers. + +6. Add leaf node for tx queue 1: + + .. code-block:: console + + testpmd> add port tm leaf node 0 1 3 0 60 1 -1 0 0 1 0 + + Parameters have following meaning:: + + 0 - Id of a port. + 1 - Id of a new node. + 3 - Id of the parent node. + 0 - Priority of a node. + 60 - WRR weight. + 1 - Id of a level. Since this is a leaf node 1 is passed. + -1 - Id of a shaper. -1 indicates that shaper is not attached. + 0 - Congestion management is not supported. + 0 - Congestion management is not supported. + 1 - Enable statistics counter for number of transmitted packets. + 0 - Number of shared shapers. + +7. Add leaf node for tx queue 2: + + .. code-block:: console + + testpmd> add port tm leaf node 0 2 3 0 99 1 -1 0 0 1 0 + + Parameters have following meaning:: + + 0 - Id of a port. + 2 - Id of a new node. + 3 - Id of the parent node. + 0 - Priority of a node. + 99 - WRR weight. + 1 - Id of a level. Since this is a leaf node 1 is passed. + -1 - Id of a shaper. -1 indicates that shaper is not attached. + 0 - Congestion management is not supported. + 0 - Congestion management is not supported. + 1 - Enable statistics counter for number of transmitted packets. + 0 - Number of shared shapers. + +8. Commit hierarchy: + + .. code-block:: console + + testpmd> port tm hierarchy commit 0 no + + Parameters have following meaning:: + + 0 - Id of a port. + no - Do not flush TM hierarchy if commit fails. + +9. Start all ports + + .. code-block:: console + + testpmd> port start all + + + +10. Enable forwarding + + .. code-block:: console + + testpmd> start -- 2.7.4