324a1702aab2227c52f0f25d031efaeca0991a72
[dpdk.git] / doc / guides / nics / mvpp2.rst
1 ..  SPDX-License-Identifier: BSD-3-Clause
2     Copyright(c) 2017 Marvell International Ltd.
3     Copyright(c) 2017 Semihalf.
4
5 .. _mvpp2_poll_mode_driver:
6
7 MVPP2 Poll Mode Driver
8 ======================
9
10 The MVPP2 PMD (**librte_net_mvpp2**) provides poll mode driver support
11 for the Marvell PPv2 (Packet Processor v2) 1/10 Gbps adapter.
12
13 Detailed information about SoCs that use PPv2 can be obtained here:
14
15 * https://www.marvell.com/embedded-processors/armada-70xx/
16 * https://www.marvell.com/embedded-processors/armada-80xx/
17
18
19 Features
20 --------
21
22 Features of the MVPP2 PMD are:
23
24 - Speed capabilities
25 - Link status
26 - Tx Queue start/stop
27 - MTU update
28 - Jumbo frame
29 - Promiscuous mode
30 - Allmulticast mode
31 - Unicast MAC filter
32 - Multicast MAC filter
33 - RSS hash
34 - VLAN filter
35 - CRC offload
36 - L3 checksum offload
37 - L4 checksum offload
38 - Packet type parsing
39 - Basic stats
40 - :ref:`Extended stats <extstats>`
41 - RX flow control
42 - Scattered TX frames
43 - :ref:`QoS <extconf>`
44 - :ref:`Flow API <flowapi>`
45 - :ref:`Traffic metering and policing <mtrapi>`
46 - :ref:`Traffic Management API <tmapi>`
47
48 Limitations
49 -----------
50
51 - Number of lcores is limited to 9 by MUSDK internal design. If more lcores
52   need to be allocated, locking will have to be considered. Number of available
53   lcores can be changed via ``MRVL_MUSDK_HIFS_RESERVED`` define in
54   ``mrvl_ethdev.c`` source file.
55
56 - Flushing vlans added for filtering is not possible due to MUSDK missing
57   functionality. Current workaround is to reset board so that PPv2 has a
58   chance to start in a sane state.
59
60 - MUSDK architecture does not support changing configuration in run time.
61   All necessary configurations should be done before first dev_start().
62
63 - RX queue start/stop is not supported.
64
65 - Current implementation does not support replacement of buffers in the HW buffer pool
66   at run time, so it is responsibility of the application to ensure that MTU does not exceed the configured buffer size.
67
68 - Configuring TX flow control currently is not supported.
69
70 - In current implementation, mechanism for acknowledging transmitted packets (``tx_done_cleanup``) is not supported.
71
72 - Running more than one DPDK-MUSDK application simultaneously is not supported.
73
74
75 Prerequisites
76 -------------
77
78 - Custom Linux Kernel sources
79
80   .. code-block:: console
81
82      git clone https://github.com/MarvellEmbeddedProcessors/linux-marvell.git -b linux-4.4.120-armada-18.09
83
84 - Out of tree `mvpp2x_sysfs` kernel module sources
85
86   .. code-block:: console
87
88      git clone https://github.com/MarvellEmbeddedProcessors/mvpp2x-marvell.git -b mvpp2x-armada-18.09
89
90 - MUSDK (Marvell User-Space SDK) sources
91
92   .. code-block:: console
93
94      git clone https://github.com/MarvellEmbeddedProcessors/musdk-marvell.git -b musdk-release-SDK-10.3.5.0-PR2
95
96   MUSDK is a light-weight library that provides direct access to Marvell's
97   PPv2 (Packet Processor v2). Alternatively prebuilt MUSDK library can be
98   requested from `Marvell Extranet <https://extranet.marvell.com>`_. Once
99   approval has been granted, library can be found by typing ``musdk`` in
100   the search box.
101
102   To get better understanding of the library one can consult documentation
103   available in the ``doc`` top level directory of the MUSDK sources.
104
105 - DPDK environment
106
107   Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>` to setup
108   DPDK environment.
109
110
111 Building MUSDK
112 --------------
113
114 Driver needs precompiled MUSDK library during compilation.
115
116 .. code-block:: console
117
118    export CROSS_COMPILE=<toolchain>/bin/aarch64-linux-gnu-
119    ./bootstrap
120    ./configure --host=aarch64-linux-gnu
121    make install
122
123 MUSDK will be installed to `usr/local` under current directory.
124 For the detailed build instructions please consult ``doc/musdk_get_started.txt``.
125
126
127 Building DPDK
128 -------------
129
130 Add path to libmusdk.pc in PKG_CONFIG_PATH environment variable.
131
132 .. code-block:: console
133
134    export PKG_CONFIG_PATH=$<musdk_install_dir>/lib/pkgconfig/:$PKG_CONFIG_PATH
135
136    meson build --cross-file config/arm/arm64_armada_linux_gcc
137    ninja -C build
138
139
140 Usage Example
141 -------------
142
143 MVPP2 PMD requires extra out of tree kernel modules to function properly.
144 `musdk_cma` sources are part of the MUSDK. Please consult
145 ``doc/musdk_get_started.txt`` for the detailed build instructions.
146 For `mvpp2x_sysfs` please consult ``Documentation/pp22_sysfs.txt`` for the
147 detailed build instructions.
148
149 .. code-block:: console
150
151    insmod musdk_cma.ko
152    insmod mvpp2x_sysfs.ko
153
154 Additionally interfaces used by DPDK application need to be put up:
155
156 .. code-block:: console
157
158    ip link set eth0 up
159    ip link set eth2 up
160
161 In order to run testpmd example application following command can be used:
162
163 .. code-block:: console
164
165    ./dpdk-testpmd --vdev=eth_mvpp2,iface=eth0,iface=eth2 -c 7 -- \
166      --burst=128 --txd=2048 --rxd=1024 --rxq=2 --txq=2  --nb-cores=2 \
167      -i -a --rss-udp
168
169 .. _extstats:
170
171 Extended stats
172 --------------
173
174 MVPP2 PMD supports the following extended statistics:
175
176         - ``rx_bytes``: number of RX bytes
177         - ``rx_packets``: number of RX packets
178         - ``rx_unicast_packets``: number of RX unicast packets
179         - ``rx_errors``: number of RX MAC errors
180         - ``rx_fullq_dropped``: number of RX packets dropped due to full RX queue
181         - ``rx_bm_dropped``: number of RX packets dropped due to no available buffers in the HW pool
182         - ``rx_early_dropped``: number of RX packets that were early dropped
183         - ``rx_fifo_dropped``: number of RX packets dropped due to RX fifo overrun
184         - ``rx_cls_dropped``: number of RX packets dropped by classifier
185         - ``tx_bytes``: number of TX bytes
186         - ``tx_packets``: number of TX packets
187         - ``tx_unicast_packets``: number of TX unicast packets
188         - ``tx_errors``: number of TX MAC errors
189
190
191 .. _extconf:
192
193 External Configuration
194 ----------------------
195
196 Several driver configuration (e.g. QoS) can be done through external configuration file. Path to the
197 file must be given as `cfg` in driver's vdev parameter list.
198
199 Configuration syntax
200 ~~~~~~~~~~~~~~~~~~~~
201
202 .. code-block:: console
203
204    [policer <policer_id>]
205    token_unit = <token_unit>
206    color = <color_mode>
207    cir = <cir>
208    ebs = <ebs>
209    cbs = <cbs>
210
211    [port <portnum> default]
212    dsa_mode = <dsa_mode>
213    default_tc = <default_tc>
214    mapping_priority = <mapping_priority>
215
216    rate_limit_enable = <rate_limit_enable>
217    rate_limit = <rate_limit>
218    burst_size = <burst_size>
219
220    default_policer = <policer_id>
221
222    [port <portnum> tc <traffic_class>]
223    rxq = <rx_queue_list>
224    pcp = <pcp_list>
225    dscp = <dscp_list>
226    default_color = <default_color>
227
228    [port <portnum> tc <traffic_class>]
229    rxq = <rx_queue_list>
230    pcp = <pcp_list>
231    dscp = <dscp_list>
232
233    [port <portnum> txq <txqnum>]
234    sched_mode = <sched_mode>
235    wrr_weight = <wrr_weight>
236
237    rate_limit_enable = <rate_limit_enable>
238    rate_limit = <rate_limit>
239    burst_size = <burst_size>
240
241 Where:
242
243 - ``<portnum>``: DPDK Port number (0..n).
244
245 - ``<dsa_mode>``: Indicate what is the dsa header mode (`none`, `dsa`, or `ext_dsa`).
246
247 - ``<default_tc>``: Default traffic class (e.g. 0)
248
249 - ``<mapping_priority>``: QoS priority for mapping (`ip`, `vlan`, `ip/vlan` or `vlan/ip`).
250
251 - ``<traffic_class>``: Traffic Class to be configured.
252
253 - ``<rx_queue_list>``: List of DPDK RX queues (e.g. 0 1 3-4)
254
255 - ``<pcp_list>``: List of PCP values to handle in particular TC (e.g. 0 1 3-4 7).
256
257 - ``<dscp_list>``: List of DSCP values to handle in particular TC (e.g. 0-12 32-48 63).
258
259 - ``<default_policer>``: Id of the policer configuration section to be used as default.
260
261 - ``<policer_id>``: Id of the policer configuration section (0..31).
262
263 - ``<token_unit>``: Policer token unit (`bytes` or `packets`).
264
265 - ``<color_mode>``: Policer color mode (`aware` or `blind`).
266
267 - ``<cir>``: Committed information rate in unit of kilo bits per second (data rate) or packets per second.
268
269 - ``<cbs>``: Committed burst size in unit of kilo bytes or number of packets.
270
271 - ``<ebs>``: Excess burst size in unit of kilo bytes or number of packets.
272
273 - ``<default_color>``: Default color for specific tc.
274
275 - ``<rate_limit_enable>``: Enables per port or per txq rate limiting (`0`/`1` to disable/enable).
276
277 - ``<rate_limit>``: Committed information rate, in kilo bits per second.
278
279 - ``<burst_size>``: Committed burst size, in kilo bytes.
280
281 - ``<sched_mode>``: Egress scheduler mode (`wrr` or `sp`).
282
283 - ``<wrr_weight>``: Txq weight.
284
285 Setting PCP/DSCP values for the default TC is not required. All PCP/DSCP
286 values not assigned explicitly to particular TC will be handled by the
287 default TC.
288
289 Configuration file example
290 ^^^^^^^^^^^^^^^^^^^^^^^^^^
291
292 .. code-block:: console
293
294    [policer 0]
295    token_unit = bytes
296    color = blind
297    cir = 100000
298    ebs = 64
299    cbs = 64
300
301    [port 0 default]
302    default_tc = 0
303    mapping_priority = ip
304
305    rate_limit_enable = 1
306    rate_limit = 1000
307    burst_size = 2000
308
309    [port 0 tc 0]
310    rxq = 0 1
311
312    [port 0 txq 0]
313    sched_mode = wrr
314    wrr_weight = 10
315
316    [port 0 txq 1]
317    sched_mode = wrr
318    wrr_weight = 100
319
320    [port 0 txq 2]
321    sched_mode = sp
322
323    [port 0 tc 1]
324    rxq = 2
325    pcp = 5 6 7
326    dscp = 26-38
327
328    [port 1 default]
329    default_tc = 0
330    mapping_priority = vlan/ip
331
332    default_policer = 0
333
334    [port 1 tc 0]
335    rxq = 0
336    dscp = 10
337
338    [port 1 tc 1]
339    rxq = 1
340    dscp = 11-20
341
342    [port 1 tc 2]
343    rxq = 2
344    dscp = 30
345
346    [port 1 txq 0]
347    rate_limit_enable = 1
348    rate_limit = 10000
349    burst_size = 2000
350
351 Usage example
352 ^^^^^^^^^^^^^
353
354 .. code-block:: console
355
356    ./dpdk-testpmd --vdev=eth_mvpp2,iface=eth0,iface=eth2,cfg=/home/user/mrvl.conf \
357      -c 7 -- -i -a --disable-hw-vlan-strip --rxq=3 --txq=3
358
359 .. _flowapi:
360
361 Flow API
362 --------
363
364 PPv2 offers packet classification capabilities via classifier engine which
365 can be configured via generic flow API offered by DPDK.
366
367 The :ref:`flow_isolated_mode` is supported.
368
369 For an additional description please refer to DPDK :doc:`../prog_guide/rte_flow`.
370
371 Supported flow actions
372 ~~~~~~~~~~~~~~~~~~~~~~
373
374 Following flow action items are supported by the driver:
375
376 * DROP
377 * QUEUE
378
379 Supported flow items
380 ~~~~~~~~~~~~~~~~~~~~
381
382 Following flow items and their respective fields are supported by the driver:
383
384 * ETH
385
386   * source MAC
387   * destination MAC
388   * ethertype
389
390 * VLAN
391
392   * PCP
393   * VID
394
395 * IPV4
396
397   * DSCP
398   * protocol
399   * source address
400   * destination address
401
402 * IPV6
403
404   * flow label
405   * next header
406   * source address
407   * destination address
408
409 * UDP
410
411   * source port
412   * destination port
413
414 * TCP
415
416   * source port
417   * destination port
418
419 Classifier match engine
420 ~~~~~~~~~~~~~~~~~~~~~~~
421
422 Classifier has an internal match engine which can be configured to
423 operate in either exact or maskable mode.
424
425 Mode is selected upon creation of the first unique flow rule as follows:
426
427 * maskable, if key size is up to 8 bytes.
428 * exact, otherwise, i.e for keys bigger than 8 bytes.
429
430 Where the key size equals the number of bytes of all fields specified
431 in the flow items.
432
433 .. table:: Examples of key size calculation
434
435    +----------------------------------------------------------------------------+-------------------+-------------+
436    | Flow pattern                                                               | Key size in bytes | Used engine |
437    +============================================================================+===================+=============+
438    | ETH (destination MAC) / VLAN (VID)                                         | 6 + 2 = 8         | Maskable    |
439    +----------------------------------------------------------------------------+-------------------+-------------+
440    | VLAN (VID) / IPV4 (source address)                                         | 2 + 4 = 6         | Maskable    |
441    +----------------------------------------------------------------------------+-------------------+-------------+
442    | TCP (source port, destination port)                                        | 2 + 2 = 4         | Maskable    |
443    +----------------------------------------------------------------------------+-------------------+-------------+
444    | VLAN (priority) / IPV4 (source address)                                    | 1 + 4 = 5         | Maskable    |
445    +----------------------------------------------------------------------------+-------------------+-------------+
446    | IPV4 (destination address) / UDP (source port, destination port)           | 6 + 2 + 2 = 10    | Exact       |
447    +----------------------------------------------------------------------------+-------------------+-------------+
448    | VLAN (VID) / IPV6 (flow label, destination address)                        | 2 + 3 + 16 = 21   | Exact       |
449    +----------------------------------------------------------------------------+-------------------+-------------+
450    | IPV4 (DSCP, source address, destination address)                           | 1 + 4 + 4 = 9     | Exact       |
451    +----------------------------------------------------------------------------+-------------------+-------------+
452    | IPV6 (flow label, source address, destination address)                     | 3 + 16 + 16 = 35  | Exact       |
453    +----------------------------------------------------------------------------+-------------------+-------------+
454
455 From the user perspective maskable mode means that masks specified
456 via flow rules are respected. In case of exact match mode, masks
457 which do not provide exact matching (all bits masked) are ignored.
458
459 If the flow matches more than one classifier rule the first
460 (with the lowest index) matched takes precedence.
461
462 Flow rules usage example
463 ~~~~~~~~~~~~~~~~~~~~~~~~
464
465 Before proceeding run testpmd user application:
466
467 .. code-block:: console
468
469    ./dpdk-testpmd --vdev=eth_mvpp2,iface=eth0,iface=eth2 -c 3 -- -i --p 3 -a --disable-hw-vlan-strip
470
471 Example #1
472 ^^^^^^^^^^
473
474 .. code-block:: console
475
476    testpmd> flow create 0 ingress pattern eth src is 10:11:12:13:14:15 / end actions drop / end
477
478 In this case key size is 6 bytes thus maskable type is selected. Testpmd
479 will set mask to ff:ff:ff:ff:ff:ff i.e traffic explicitly matching
480 above rule will be dropped.
481
482 Example #2
483 ^^^^^^^^^^
484
485 .. code-block:: console
486
487    testpmd> flow create 0 ingress pattern ipv4 src spec 10.10.10.0 src mask 255.255.255.0 / tcp src spec 0x10 src mask 0x10 / end action drop / end
488
489 In this case key size is 8 bytes thus maskable type is selected.
490 Flows which have IPv4 source addresses ranging from 10.10.10.0 to 10.10.10.255
491 and tcp source port set to 16 will be dropped.
492
493 Example #3
494 ^^^^^^^^^^
495
496 .. code-block:: console
497
498    testpmd> flow create 0 ingress pattern vlan vid spec 0x10 vid mask 0x10 / ipv4 src spec 10.10.1.1 src mask 255.255.0.0 dst spec 11.11.11.1 dst mask 255.255.255.0 / end actions drop / end
499
500 In this case key size is 10 bytes thus exact type is selected.
501 Even though each item has partial mask set, masks will be ignored.
502 As a result only flows with VID set to 16 and IPv4 source and destination
503 addresses set to 10.10.1.1 and 11.11.11.1 respectively will be dropped.
504
505 Limitations
506 ~~~~~~~~~~~
507
508 Following limitations need to be taken into account while creating flow rules:
509
510 * For IPv4 exact match type the key size must be up to 12 bytes.
511 * For IPv6 exact match type the key size must be up to 36 bytes.
512 * Following fields cannot be partially masked (all masks are treated as
513   if they were exact):
514
515   * ETH: ethertype
516   * VLAN: PCP, VID
517   * IPv4: protocol
518   * IPv6: next header
519   * TCP/UDP: source port, destination port
520
521 * Only one classifier table can be created thus all rules in the table
522   have to match table format. Table format is set during creation of
523   the first unique flow rule.
524 * Up to 5 fields can be specified per flow rule.
525 * Up to 20 flow rules can be added.
526
527 For additional information about classifier please consult
528 ``doc/musdk_cls_user_guide.txt``.
529
530 .. _mtrapi:
531
532 Traffic metering and policing
533 -----------------------------
534
535 MVPP2 PMD supports DPDK traffic metering and policing that allows the following:
536
537 1. Meter ingress traffic.
538 2. Do policing.
539 3. Gather statistics.
540
541 For an additional description please refer to DPDK :doc:`Traffic Metering and Policing API <../prog_guide/traffic_metering_and_policing>`.
542
543 The policer objects defined by this feature can work with the default policer defined via config file as described in :ref:`QoS Support <extconf>`.
544
545 Limitations
546 ~~~~~~~~~~~
547
548 The following capabilities are not supported:
549
550 - MTR object meter DSCP table update
551 - MTR object policer action update
552 - MTR object enabled statistics
553
554 Usage example
555 ~~~~~~~~~~~~~
556
557 1. Run testpmd user app:
558
559    .. code-block:: console
560
561                 ./dpdk-testpmd --vdev=eth_mvpp2,iface=eth0,iface=eth2 -c 6 -- -i -p 3 -a --txd 1024 --rxd 1024
562
563 2. Create meter profile:
564
565    .. code-block:: console
566
567                 testpmd> add port meter profile 0 0 srtcm_rfc2697 2000 256 256
568
569 3. Create meter:
570
571    .. code-block:: console
572
573                 testpmd> create port meter 0 0 0 yes d d d 0 1 0
574
575 4. Create flow rule witch meter attached:
576
577    .. code-block:: console
578
579                 testpmd> flow create 0 ingress pattern ipv4 src is 10.10.10.1 / end actions meter mtr_id 0 / end
580
581 For a detailed usage description please refer to "Traffic Metering and Policing" section in DPDK :doc:`Testpmd Runtime Functions <../testpmd_app_ug/testpmd_funcs>`.
582
583
584
585 .. _tmapi:
586
587 Traffic Management API
588 ----------------------
589
590 MVPP2 PMD supports generic DPDK Traffic Management API which allows to
591 configure the following features:
592
593 1. Hierarchical scheduling
594 2. Traffic shaping
595 3. Congestion management
596 4. Packet marking
597
598 Internally TM is represented by a hierarchy (tree) of nodes.
599 Node which has a parent is called a leaf whereas node without
600 parent is called a non-leaf (root).
601 MVPP2 PMD supports two level hierarchy where level 0 represents ports and level 1 represents tx queues of a given port.
602
603 .. figure:: img/mvpp2_tm.*
604
605 Nodes hold following types of settings:
606
607 - for egress scheduler configuration: weight
608 - for egress rate limiter: private shaper
609 - bitmask indicating which statistics counters will be read
610
611 Hierarchy is always constructed from the top, i.e first a root node is added
612 then some number of leaf nodes. Number of leaf nodes cannot exceed number
613 of configured tx queues.
614
615 After hierarchy is complete it can be committed.
616
617
618 For an additional description please refer to DPDK :doc:`Traffic Management API <../prog_guide/traffic_management>`.
619
620 Limitations
621 ~~~~~~~~~~~
622
623 The following capabilities are not supported:
624
625 - Traffic manager WRED profile and WRED context
626 - Traffic manager shared shaper update
627 - Traffic manager packet marking
628 - Maximum number of levels in hierarchy is 2
629 - Currently dynamic change of a hierarchy is not supported
630
631 Usage example
632 ~~~~~~~~~~~~~
633
634 For a detailed usage description please refer to "Traffic Management" section in DPDK :doc:`Testpmd Runtime Functions <../testpmd_app_ug/testpmd_funcs>`.
635
636 1. Run testpmd as follows:
637
638    .. code-block:: console
639
640                 ./dpdk-testpmd --vdev=net_mrvl,iface=eth0,iface=eth2,cfg=./qos_config -c 7 -- \
641                 -i -p 3 --disable-hw-vlan-strip --rxq 3 --txq 3 --txd 1024 --rxd 1024
642
643 2. Stop all ports:
644
645    .. code-block:: console
646
647                 testpmd> port stop all
648
649 3. Add shaper profile:
650
651    .. code-block:: console
652
653                 testpmd> add port tm node shaper profile 0 0 900000 70000 0
654
655    Parameters have following meaning::
656
657                 0       - Id of a port.
658                 0       - Id of a new shaper profile.
659                 900000  - Shaper rate in bytes/s.
660                 70000   - Bucket size in bytes.
661                 0       - Packet length adjustment - ignored.
662
663 4. Add non-leaf node for port 0:
664
665    .. code-block:: console
666
667                 testpmd> add port tm nonleaf node 0 3 -1 0 0 0 0 0 1 3 0
668
669    Parameters have following meaning::
670
671                  0  - Id of a port
672                  3  - Id of a new node.
673                 -1  - Indicate that root does not have a parent.
674                  0  - Priority of the node.
675                  0  - Weight of the node.
676                  0  - Id of a level. Since this is a root 0 is passed.
677                  0  - Id of the shaper profile.
678                  0  - Number of SP priorities.
679                  3  - Enable statistics for both number of transmitted packets and bytes.
680                  0  - Number of shared shapers.
681
682 5. Add leaf node for tx queue 0:
683
684    .. code-block:: console
685
686                 testpmd> add port tm leaf node 0 0 3 0 30 1 -1 0 0 1 0
687
688    Parameters have following meaning::
689
690                  0  - Id of a port.
691                  0  - Id of a new node.
692                  3  - Id of the parent node.
693                  0  - Priority of a node.
694                  30 - WRR weight.
695                  1  - Id of a level. Since this is a leaf node 1 is passed.
696                 -1  - Id of a shaper. -1 indicates that shaper is not attached.
697                  0  - Congestion management is not supported.
698                  0  - Congestion management is not supported.
699                  1  - Enable statistics counter for number of transmitted packets.
700                  0  - Number of shared shapers.
701
702 6. Add leaf node for tx queue 1:
703
704    .. code-block:: console
705
706         testpmd> add port tm leaf node 0 1 3 0 60 1 -1 0 0 1 0
707
708    Parameters have following meaning::
709
710                  0  - Id of a port.
711                  1  - Id of a new node.
712                  3  - Id of the parent node.
713                  0  - Priority of a node.
714                  60 - WRR weight.
715                  1  - Id of a level. Since this is a leaf node 1 is passed.
716                 -1  - Id of a shaper. -1 indicates that shaper is not attached.
717                  0  - Congestion management is not supported.
718                  0  - Congestion management is not supported.
719                  1  - Enable statistics counter for number of transmitted packets.
720                  0  - Number of shared shapers.
721
722 7. Add leaf node for tx queue 2:
723
724    .. code-block:: console
725
726                 testpmd> add port tm leaf node 0 2 3 0 99 1 -1 0 0 1 0
727
728    Parameters have following meaning::
729
730                  0  - Id of a port.
731                  2  - Id of a new node.
732                  3  - Id of the parent node.
733                  0  - Priority of a node.
734                  99 - WRR weight.
735                  1  - Id of a level. Since this is a leaf node 1 is passed.
736                 -1  - Id of a shaper. -1 indicates that shaper is not attached.
737                  0  - Congestion management is not supported.
738                  0  - Congestion management is not supported.
739                  1  - Enable statistics counter for number of transmitted packets.
740                  0  - Number of shared shapers.
741
742 8. Commit hierarchy:
743
744    .. code-block:: console
745
746                 testpmd> port tm hierarchy commit 0 no
747
748   Parameters have following meaning::
749
750                 0  - Id of a port.
751                 no - Do not flush TM hierarchy if commit fails.
752
753 9. Start all ports
754
755    .. code-block:: console
756
757                 testpmd> port start all
758
759
760
761 10. Enable forwarding
762
763    .. code-block:: console
764
765                 testpmd> start