+Set hardware insertion of VLAN IDs in packets sent on a port::
+
+ testpmd> tx_vlan set (port_id) vlan_id[, vlan_id_outer]
+
+For example, set a single VLAN ID (5) insertion on port 0::
+
+ tx_vlan set 0 5
+
+Or, set double VLAN ID (inner: 2, outer: 3) insertion on port 1::
+
+ tx_vlan set 1 2 3
+
+
+tx_vlan set pvid
+~~~~~~~~~~~~~~~~
+
+Set port based hardware insertion of VLAN ID in packets sent on a port::
+
+ testpmd> tx_vlan set pvid (port_id) (vlan_id) (on|off)
+
+tx_vlan reset
+~~~~~~~~~~~~~
+
+Disable hardware insertion of a VLAN header in packets sent on a port::
+
+ testpmd> tx_vlan reset (port_id)
+
+csum set
+~~~~~~~~
+
+Select hardware or software calculation of the checksum when
+transmitting a packet using the ``csum`` forwarding engine::
+
+ testpmd> csum set (ip|udp|tcp|sctp|outer-ip) (hw|sw) (port_id)
+
+Where:
+
+* ``ip|udp|tcp|sctp`` always relate to the inner layer.
+
+* ``outer-ip`` relates to the outer IP layer (only for IPv4) in the case where the packet is recognized
+ as a tunnel packet by the forwarding engine (vxlan, gre and ipip are
+ supported). See also the ``csum parse-tunnel`` command.
+
+.. note::
+
+ Check the NIC Datasheet for hardware limits.
+
+RSS queue region
+~~~~~~~~~~~~~~~~
+
+Set RSS queue region span on a port::
+
+ testpmd> set port (port_id) queue-region region_id (value) \
+ queue_start_index (value) queue_num (value)
+
+Set flowtype mapping on a RSS queue region on a port::
+
+ testpmd> set port (port_id) queue-region region_id (value) flowtype (value)
+
+where:
+
+* For the flowtype(pctype) of packet,the specific index for each type has
+ been defined in file i40e_type.h as enum i40e_filter_pctype.
+
+Set user priority mapping on a RSS queue region on a port::
+
+ testpmd> set port (port_id) queue-region UP (value) region_id (value)
+
+Flush all queue region related configuration on a port::
+
+ testpmd> set port (port_id) queue-region flush (on|off)
+
+where:
+
+* "on"is just an enable function which server for other configuration,
+ it is for all configuration about queue region from up layer,
+ at first will only keep in DPDK softwarestored in driver,
+ only after "flush on", it commit all configuration to HW.
+ "off" is just clean all configuration about queue region just now,
+ and restore all to DPDK i40e driver default config when start up.
+
+Show all queue region related configuration info on a port::
+
+ testpmd> show port (port_id) queue-region
+
+.. note::
+
+ Queue region only support on PF by now, so these command is
+ only for configuration of queue region on PF port.
+
+csum parse-tunnel
+~~~~~~~~~~~~~~~~~
+
+Define how tunneled packets should be handled by the csum forward
+engine::
+
+ testpmd> csum parse-tunnel (on|off) (tx_port_id)
+
+If enabled, the csum forward engine will try to recognize supported
+tunnel headers (vxlan, gre, ipip).
+
+If disabled, treat tunnel packets as non-tunneled packets (a inner
+header is handled as a packet payload).
+
+.. note::
+
+ The port argument is the TX port like in the ``csum set`` command.
+
+Example:
+
+Consider a packet in packet like the following::
+
+ eth_out/ipv4_out/udp_out/vxlan/eth_in/ipv4_in/tcp_in
+
+* If parse-tunnel is enabled, the ``ip|udp|tcp|sctp`` parameters of ``csum set``
+ command relate to the inner headers (here ``ipv4_in`` and ``tcp_in``), and the
+ ``outer-ip parameter`` relates to the outer headers (here ``ipv4_out``).
+
+* If parse-tunnel is disabled, the ``ip|udp|tcp|sctp`` parameters of ``csum set``
+ command relate to the outer headers, here ``ipv4_out`` and ``udp_out``.
+
+csum show
+~~~~~~~~~
+
+Display tx checksum offload configuration::
+
+ testpmd> csum show (port_id)
+
+tso set
+~~~~~~~
+
+Enable TCP Segmentation Offload (TSO) in the ``csum`` forwarding engine::
+
+ testpmd> tso set (segsize) (port_id)
+
+.. note::
+
+ Check the NIC datasheet for hardware limits.
+
+tso show
+~~~~~~~~
+
+Display the status of TCP Segmentation Offload::
+
+ testpmd> tso show (port_id)
+
+set port - gro
+~~~~~~~~~~~~~~
+
+Enable or disable GRO in ``csum`` forwarding engine::
+
+ testpmd> set port <port_id> gro on|off
+
+If enabled, the csum forwarding engine will perform GRO on the TCP/IPv4
+packets received from the given port.
+
+If disabled, packets received from the given port won't be performed
+GRO. By default, GRO is disabled for all ports.
+
+.. note::
+
+ When enable GRO for a port, TCP/IPv4 packets received from the port
+ will be performed GRO. After GRO, all merged packets have bad
+ checksums, since the GRO library doesn't re-calculate checksums for
+ the merged packets. Therefore, if users want the merged packets to
+ have correct checksums, please select HW IP checksum calculation and
+ HW TCP checksum calculation for the port which the merged packets are
+ transmitted to.
+
+show port - gro
+~~~~~~~~~~~~~~~
+
+Display GRO configuration for a given port::
+
+ testpmd> show port <port_id> gro
+
+set gro flush
+~~~~~~~~~~~~~
+
+Set the cycle to flush the GROed packets from reassembly tables::
+
+ testpmd> set gro flush <cycles>
+
+When enable GRO, the csum forwarding engine performs GRO on received
+packets, and the GROed packets are stored in reassembly tables. Users
+can use this command to determine when the GROed packets are flushed
+from the reassembly tables.
+
+The ``cycles`` is measured in GRO operation times. The csum forwarding
+engine flushes the GROed packets from the tables every ``cycles`` GRO
+operations.
+
+By default, the value of ``cycles`` is 1, which means flush GROed packets
+from the reassembly tables as soon as one GRO operation finishes. The value
+of ``cycles`` should be in the range of 1 to ``GRO_MAX_FLUSH_CYCLES``.
+
+Please note that the large value of ``cycles`` may cause the poor TCP/IP
+stack performance. Because the GROed packets are delayed to arrive the
+stack, thus causing more duplicated ACKs and TCP retransmissions.
+
+set port - gso
+~~~~~~~~~~~~~~
+
+Toggle per-port GSO support in ``csum`` forwarding engine::
+
+ testpmd> set port <port_id> gso on|off
+
+If enabled, the csum forwarding engine will perform GSO on supported IPv4
+packets, transmitted on the given port.
+
+If disabled, packets transmitted on the given port will not undergo GSO.
+By default, GSO is disabled for all ports.
+
+.. note::
+
+ When GSO is enabled on a port, supported IPv4 packets transmitted on that
+ port undergo GSO. Afterwards, the segmented packets are represented by
+ multi-segment mbufs; however, the csum forwarding engine doesn't calculation
+ of checksums for GSO'd segments in SW. As a result, if users want correct
+ checksums in GSO segments, they should enable HW checksum calculation for
+ GSO-enabled ports.
+
+ For example, HW checksum calculation for VxLAN GSO'd packets may be enabled
+ by setting the following options in the csum forwarding engine:
+
+ testpmd> csum set outer_ip hw <port_id>
+
+ testpmd> csum set ip hw <port_id>
+
+ testpmd> csum set tcp hw <port_id>
+
+set gso segsz
+~~~~~~~~~~~~~
+
+Set the maximum GSO segment size (measured in bytes), which includes the
+packet header and the packet payload for GSO-enabled ports (global)::
+
+ testpmd> set gso segsz <length>
+
+show port - gso
+~~~~~~~~~~~~~~~
+
+Display the status of Generic Segmentation Offload for a given port::
+
+ testpmd> show port <port_id> gso
+
+mac_addr add
+~~~~~~~~~~~~
+
+Add an alternative MAC address to a port::
+
+ testpmd> mac_addr add (port_id) (XX:XX:XX:XX:XX:XX)
+
+mac_addr remove
+~~~~~~~~~~~~~~~
+
+Remove a MAC address from a port::
+
+ testpmd> mac_addr remove (port_id) (XX:XX:XX:XX:XX:XX)
+
+mac_addr add (for VF)
+~~~~~~~~~~~~~~~~~~~~~
+
+Add an alternative MAC address for a VF to a port::
+
+ testpmd> mac_add add port (port_id) vf (vf_id) (XX:XX:XX:XX:XX:XX)
+
+mac_addr set
+~~~~~~~~~~~~
+
+Set the default MAC address for a port::
+
+ testpmd> mac_addr set (port_id) (XX:XX:XX:XX:XX:XX)
+
+mac_addr set (for VF)
+~~~~~~~~~~~~~~~~~~~~~
+
+Set the MAC address for a VF from the PF::
+
+ testpmd> set vf mac addr (port_id) (vf_id) (XX:XX:XX:XX:XX:XX)
+
+set eth-peer
+~~~~~~~~~~~~
+
+Set the forwarding peer address for certain port::
+
+ testpmd> set eth-peer (port_id) (perr_addr)
+
+This is equivalent to the ``--eth-peer`` command-line option.
+
+set port-uta
+~~~~~~~~~~~~
+
+Set the unicast hash filter(s) on/off for a port::
+
+ testpmd> set port (port_id) uta (XX:XX:XX:XX:XX:XX|all) (on|off)
+
+set promisc
+~~~~~~~~~~~
+
+Set the promiscuous mode on for a port or for all ports.
+In promiscuous mode packets are not dropped if they aren't for the specified MAC address::
+
+ testpmd> set promisc (port_id|all) (on|off)
+
+set allmulti
+~~~~~~~~~~~~
+
+Set the allmulti mode for a port or for all ports::
+
+ testpmd> set allmulti (port_id|all) (on|off)
+
+Same as the ifconfig (8) option. Controls how multicast packets are handled.
+
+set promisc (for VF)
+~~~~~~~~~~~~~~~~~~~~
+
+Set the unicast promiscuous mode for a VF from PF.
+It's supported by Intel i40e NICs now.
+In promiscuous mode packets are not dropped if they aren't for the specified MAC address::
+
+ testpmd> set vf promisc (port_id) (vf_id) (on|off)
+
+set allmulticast (for VF)
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set the multicast promiscuous mode for a VF from PF.
+It's supported by Intel i40e NICs now.
+In promiscuous mode packets are not dropped if they aren't for the specified MAC address::
+
+ testpmd> set vf allmulti (port_id) (vf_id) (on|off)
+
+set tx max bandwidth (for VF)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set TX max absolute bandwidth (Mbps) for a VF from PF::
+
+ testpmd> set vf tx max-bandwidth (port_id) (vf_id) (max_bandwidth)
+
+set tc tx min bandwidth (for VF)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set all TCs' TX min relative bandwidth (%) for a VF from PF::
+
+ testpmd> set vf tc tx min-bandwidth (port_id) (vf_id) (bw1, bw2, ...)
+
+set tc tx max bandwidth (for VF)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set a TC's TX max absolute bandwidth (Mbps) for a VF from PF::
+
+ testpmd> set vf tc tx max-bandwidth (port_id) (vf_id) (tc_no) (max_bandwidth)
+
+set tc strict link priority mode
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set some TCs' strict link priority mode on a physical port::
+
+ testpmd> set tx strict-link-priority (port_id) (tc_bitmap)
+
+set tc tx min bandwidth
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Set all TCs' TX min relative bandwidth (%) globally for all PF and VFs::
+
+ testpmd> set tc tx min-bandwidth (port_id) (bw1, bw2, ...)
+
+set flow_ctrl rx
+~~~~~~~~~~~~~~~~
+
+Set the link flow control parameter on a port::
+
+ testpmd> set flow_ctrl rx (on|off) tx (on|off) (high_water) (low_water) \
+ (pause_time) (send_xon) mac_ctrl_frame_fwd (on|off) \
+ autoneg (on|off) (port_id)
+
+Where:
+
+* ``high_water`` (integer): High threshold value to trigger XOFF.
+
+* ``low_water`` (integer): Low threshold value to trigger XON.
+
+* ``pause_time`` (integer): Pause quota in the Pause frame.
+
+* ``send_xon`` (0/1): Send XON frame.
+
+* ``mac_ctrl_frame_fwd``: Enable receiving MAC control frames.
+
+* ``autoneg``: Change the auto-negotiation parameter.
+
+set pfc_ctrl rx
+~~~~~~~~~~~~~~~
+
+Set the priority flow control parameter on a port::
+
+ testpmd> set pfc_ctrl rx (on|off) tx (on|off) (high_water) (low_water) \
+ (pause_time) (priority) (port_id)
+
+Where:
+
+* ``high_water`` (integer): High threshold value.
+
+* ``low_water`` (integer): Low threshold value.
+
+* ``pause_time`` (integer): Pause quota in the Pause frame.
+
+* ``priority`` (0-7): VLAN User Priority.
+
+set stat_qmap
+~~~~~~~~~~~~~
+
+Set statistics mapping (qmapping 0..15) for RX/TX queue on port::
+
+ testpmd> set stat_qmap (tx|rx) (port_id) (queue_id) (qmapping)
+
+For example, to set rx queue 2 on port 0 to mapping 5::
+
+ testpmd>set stat_qmap rx 0 2 5
+
+set xstats-hide-zero
+~~~~~~~~~~~~~~~~~~~~
+
+Set the option to hide zero values for xstats display::
+
+ testpmd> set xstats-hide-zero on|off
+
+.. note::
+
+ By default, the zero values are displayed for xstats.
+
+set port - rx/tx (for VF)
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set VF receive/transmit from a port::
+
+ testpmd> set port (port_id) vf (vf_id) (rx|tx) (on|off)
+
+set port - mac address filter (for VF)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add/Remove unicast or multicast MAC addr filter for a VF::
+
+ testpmd> set port (port_id) vf (vf_id) (mac_addr) \
+ (exact-mac|exact-mac-vlan|hashmac|hashmac-vlan) (on|off)
+
+set port - rx mode(for VF)
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set the VF receive mode of a port::
+
+ testpmd> set port (port_id) vf (vf_id) \
+ rxmode (AUPE|ROPE|BAM|MPE) (on|off)
+
+The available receive modes are:
+
+* ``AUPE``: Accepts untagged VLAN.
+
+* ``ROPE``: Accepts unicast hash.
+
+* ``BAM``: Accepts broadcast packets.
+
+* ``MPE``: Accepts all multicast packets.
+
+set port - tx_rate (for Queue)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set TX rate limitation for a queue on a port::
+
+ testpmd> set port (port_id) queue (queue_id) rate (rate_value)
+
+set port - tx_rate (for VF)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set TX rate limitation for queues in VF on a port::
+
+ testpmd> set port (port_id) vf (vf_id) rate (rate_value) queue_mask (queue_mask)
+
+set port - mirror rule
+~~~~~~~~~~~~~~~~~~~~~~
+
+Set pool or vlan type mirror rule for a port::
+
+ testpmd> set port (port_id) mirror-rule (rule_id) \
+ (pool-mirror-up|pool-mirror-down|vlan-mirror) \
+ (poolmask|vlanid[,vlanid]*) dst-pool (pool_id) (on|off)
+
+Set link mirror rule for a port::
+
+ testpmd> set port (port_id) mirror-rule (rule_id) \
+ (uplink-mirror|downlink-mirror) dst-pool (pool_id) (on|off)
+
+For example to enable mirror traffic with vlan 0,1 to pool 0::
+
+ set port 0 mirror-rule 0 vlan-mirror 0,1 dst-pool 0 on
+
+reset port - mirror rule
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+Reset a mirror rule for a port::
+
+ testpmd> reset port (port_id) mirror-rule (rule_id)
+
+set flush_rx
+~~~~~~~~~~~~
+
+Set the flush on RX streams before forwarding.
+The default is flush ``on``.
+Mainly used with PCAP drivers to turn off the default behavior of flushing the first 512 packets on RX streams::
+
+ testpmd> set flush_rx off
+
+set bypass mode
+~~~~~~~~~~~~~~~
+
+Set the bypass mode for the lowest port on bypass enabled NIC::
+
+ testpmd> set bypass mode (normal|bypass|isolate) (port_id)
+
+set bypass event
+~~~~~~~~~~~~~~~~
+
+Set the event required to initiate specified bypass mode for the lowest port on a bypass enabled::
+
+ testpmd> set bypass event (timeout|os_on|os_off|power_on|power_off) \
+ mode (normal|bypass|isolate) (port_id)
+
+Where:
+
+* ``timeout``: Enable bypass after watchdog timeout.
+
+* ``os_on``: Enable bypass when OS/board is powered on.
+
+* ``os_off``: Enable bypass when OS/board is powered off.
+
+* ``power_on``: Enable bypass when power supply is turned on.
+
+* ``power_off``: Enable bypass when power supply is turned off.
+
+
+set bypass timeout
+~~~~~~~~~~~~~~~~~~
+
+Set the bypass watchdog timeout to ``n`` seconds where 0 = instant::
+
+ testpmd> set bypass timeout (0|1.5|2|3|4|8|16|32)
+
+show bypass config
+~~~~~~~~~~~~~~~~~~
+
+Show the bypass configuration for a bypass enabled NIC using the lowest port on the NIC::
+
+ testpmd> show bypass config (port_id)
+
+set link up
+~~~~~~~~~~~
+
+Set link up for a port::
+
+ testpmd> set link-up port (port id)
+
+set link down
+~~~~~~~~~~~~~
+
+Set link down for a port::
+
+ testpmd> set link-down port (port id)
+
+E-tag set
+~~~~~~~~~
+
+Enable E-tag insertion for a VF on a port::
+
+ testpmd> E-tag set insertion on port-tag-id (value) port (port_id) vf (vf_id)
+
+Disable E-tag insertion for a VF on a port::
+
+ testpmd> E-tag set insertion off port (port_id) vf (vf_id)
+
+Enable/disable E-tag stripping on a port::
+
+ testpmd> E-tag set stripping (on|off) port (port_id)
+
+Enable/disable E-tag based forwarding on a port::
+
+ testpmd> E-tag set forwarding (on|off) port (port_id)
+
+Add an E-tag forwarding filter on a port::
+
+ testpmd> E-tag set filter add e-tag-id (value) dst-pool (pool_id) port (port_id)
+
+Delete an E-tag forwarding filter on a port::
+ testpmd> E-tag set filter del e-tag-id (value) port (port_id)
+
+ddp add
+~~~~~~~
+
+Load a dynamic device personalization (DDP) profile and store backup profile::
+
+ testpmd> ddp add (port_id) (profile_path[,backup_profile_path])
+
+ddp del
+~~~~~~~
+
+Delete a dynamic device personalization profile and restore backup profile::
+
+ testpmd> ddp del (port_id) (backup_profile_path)
+
+ptype mapping
+~~~~~~~~~~~~~
+
+List all items from the ptype mapping table::
+
+ testpmd> ptype mapping get (port_id) (valid_only)
+
+Where:
+
+* ``valid_only``: A flag indicates if only list valid items(=1) or all itemss(=0).
+
+Replace a specific or a group of software defined ptype with a new one::
+
+ testpmd> ptype mapping replace (port_id) (target) (mask) (pkt_type)
+
+where:
+
+* ``target``: A specific software ptype or a mask to represent a group of software ptypes.
+
+* ``mask``: A flag indicate if "target" is a specific software ptype(=0) or a ptype mask(=1).
+
+* ``pkt_type``: The new software ptype to replace the old ones.
+
+Update hardware defined ptype to software defined packet type mapping table::
+
+ testpmd> ptype mapping update (port_id) (hw_ptype) (sw_ptype)
+
+where:
+
+* ``hw_ptype``: hardware ptype as the index of the ptype mapping table.
+
+* ``sw_ptype``: software ptype as the value of the ptype mapping table.
+
+Reset ptype mapping table::
+
+ testpmd> ptype mapping reset (port_id)
+
+config per port Rx offloading
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Enable or disable a per port Rx offloading on all Rx queues of a port::
+
+ testpmd> port config (port_id) rx_offload (offloading) on|off
+
+* ``offloading``: can be any of these offloading capability:
+ vlan_strip, ipv4_cksum, udp_cksum, tcp_cksum, tcp_lro,
+ qinq_strip, outer_ipv4_cksum, macsec_strip,
+ header_split, vlan_filter, vlan_extend, jumbo_frame,
+ crc_strip, scatter, timestamp, security
+
+This command should be run when the port is stopped, or else it will fail.
+
+config per queue Rx offloading
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Enable or disable a per queue Rx offloading only on a specific Rx queue::
+
+ testpmd> port (port_id) rxq (queue_id) rx_offload (offloading) on|off
+
+* ``offloading``: can be any of these offloading capability:
+ vlan_strip, ipv4_cksum, udp_cksum, tcp_cksum, tcp_lro,
+ qinq_strip, outer_ipv4_cksum, macsec_strip,
+ header_split, vlan_filter, vlan_extend, jumbo_frame,
+ crc_strip, scatter, timestamp, security
+
+This command should be run when the port is stopped, or else it will fail.
+
+config per port Tx offloading
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Enable or disable a per port Tx offloading on all Tx queues of a port::
+
+ testpmd> port config (port_id) tx_offload (offloading) on|off
+
+* ``offloading``: can be any of these offloading capability:
+ vlan_insert, ipv4_cksum, udp_cksum, udp_cksum,
+ sctp_cksum, tcp_tso, udp_tso, outer_ipv4_cksum,
+ qinq_insert, vxlan_tnl_tso, gre_tnl_tso,
+ ipip_tnl_tso, geneve_tnl_tso, macsec_insert,
+ mt_lockfree, multi_segs, fast_free, security
+
+This command should be run when the port is stopped, or else it will fail.
+
+config per queue Tx offloading
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Enable or disable a per queue Tx offloading only on a specific Tx queue::
+
+ testpmd> port (port_id) txq (queue_id) tx_offload (offloading) on|off
+
+* ``offloading``: can be any of these offloading capability:
+ vlan_insert, ipv4_cksum, udp_cksum, udp_cksum,
+ sctp_cksum, tcp_tso, udp_tso, outer_ipv4_cksum,
+ qinq_insert, vxlan_tnl_tso, gre_tnl_tso,
+ ipip_tnl_tso, geneve_tnl_tso, macsec_insert,
+ mt_lockfree, multi_segs, fast_free, security
+
+This command should be run when the port is stopped, or else it will fail.
+
+
+Port Functions
+--------------
+
+The following sections show functions for configuring ports.
+
+.. note::
+
+ Port configuration changes only become active when forwarding is started/restarted.
+
+port attach
+~~~~~~~~~~~
+
+Attach a port specified by pci address or virtual device args::
+
+ testpmd> port attach (identifier)
+
+To attach a new pci device, the device should be recognized by kernel first.
+Then it should be moved under DPDK management.
+Finally the port can be attached to testpmd.
+
+For example, to move a pci device using ixgbe under DPDK management:
+
+.. code-block:: console
+
+ # Check the status of the available devices.
+ ./usertools/dpdk-devbind.py --status
+
+ Network devices using DPDK-compatible driver
+ ============================================
+ <none>
+
+ Network devices using kernel driver
+ ===================================
+ 0000:0a:00.0 '82599ES 10-Gigabit' if=eth2 drv=ixgbe unused=
+
+
+ # Bind the device to igb_uio.
+ sudo ./usertools/dpdk-devbind.py -b igb_uio 0000:0a:00.0
+
+
+ # Recheck the status of the devices.
+ ./usertools/dpdk-devbind.py --status
+ Network devices using DPDK-compatible driver
+ ============================================
+ 0000:0a:00.0 '82599ES 10-Gigabit' drv=igb_uio unused=
+
+To attach a port created by virtual device, above steps are not needed.
+
+For example, to attach a port whose pci address is 0000:0a:00.0.
+
+.. code-block:: console
+
+ testpmd> port attach 0000:0a:00.0
+ Attaching a new port...
+ EAL: PCI device 0000:0a:00.0 on NUMA socket -1
+ EAL: probe driver: 8086:10fb rte_ixgbe_pmd
+ EAL: PCI memory mapped at 0x7f83bfa00000
+ EAL: PCI memory mapped at 0x7f83bfa80000
+ PMD: eth_ixgbe_dev_init(): MAC: 2, PHY: 18, SFP+: 5
+ PMD: eth_ixgbe_dev_init(): port 0 vendorID=0x8086 deviceID=0x10fb
+ Port 0 is attached. Now total ports is 1
+ Done
+
+For example, to attach a port created by pcap PMD.
+
+.. code-block:: console
+
+ testpmd> port attach net_pcap0
+ Attaching a new port...
+ PMD: Initializing pmd_pcap for net_pcap0
+ PMD: Creating pcap-backed ethdev on numa socket 0
+ Port 0 is attached. Now total ports is 1
+ Done
+
+In this case, identifier is ``net_pcap0``.
+This identifier format is the same as ``--vdev`` format of DPDK applications.
+
+For example, to re-attach a bonded port which has been previously detached,
+the mode and slave parameters must be given.
+
+.. code-block:: console
+
+ testpmd> port attach net_bond_0,mode=0,slave=1
+ Attaching a new port...
+ EAL: Initializing pmd_bond for net_bond_0
+ EAL: Create bonded device net_bond_0 on port 0 in mode 0 on socket 0.
+ Port 0 is attached. Now total ports is 1
+ Done
+
+
+port detach
+~~~~~~~~~~~
+
+Detach a specific port::
+
+ testpmd> port detach (port_id)
+
+Before detaching a port, the port should be stopped and closed.
+
+For example, to detach a pci device port 0.
+
+.. code-block:: console
+
+ testpmd> port stop 0
+ Stopping ports...
+ Done
+ testpmd> port close 0
+ Closing ports...
+ Done
+
+ testpmd> port detach 0
+ Detaching a port...
+ EAL: PCI device 0000:0a:00.0 on NUMA socket -1
+ EAL: remove driver: 8086:10fb rte_ixgbe_pmd
+ EAL: PCI memory unmapped at 0x7f83bfa00000
+ EAL: PCI memory unmapped at 0x7f83bfa80000
+ Done
+
+
+For example, to detach a virtual device port 0.
+
+.. code-block:: console
+
+ testpmd> port stop 0
+ Stopping ports...
+ Done
+ testpmd> port close 0
+ Closing ports...
+ Done
+
+ testpmd> port detach 0
+ Detaching a port...
+ PMD: Closing pcap ethdev on numa socket 0
+ Port 'net_pcap0' is detached. Now total ports is 0
+ Done
+
+To remove a pci device completely from the system, first detach the port from testpmd.
+Then the device should be moved under kernel management.
+Finally the device can be removed using kernel pci hotplug functionality.
+
+For example, to move a pci device under kernel management:
+
+.. code-block:: console
+
+ sudo ./usertools/dpdk-devbind.py -b ixgbe 0000:0a:00.0
+
+ ./usertools/dpdk-devbind.py --status
+
+ Network devices using DPDK-compatible driver
+ ============================================
+ <none>
+
+ Network devices using kernel driver
+ ===================================
+ 0000:0a:00.0 '82599ES 10-Gigabit' if=eth2 drv=ixgbe unused=igb_uio
+
+To remove a port created by a virtual device, above steps are not needed.
+
+port start
+~~~~~~~~~~
+
+Start all ports or a specific port::
+
+ testpmd> port start (port_id|all)
+
+port stop
+~~~~~~~~~
+
+Stop all ports or a specific port::
+
+ testpmd> port stop (port_id|all)
+
+port close
+~~~~~~~~~~
+
+Close all ports or a specific port::
+
+ testpmd> port close (port_id|all)
+
+port config - queue ring size
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Configure a rx/tx queue ring size::
+
+ testpmd> port (port_id) (rxq|txq) (queue_id) ring_size (value)
+
+Only take effect after command that (re-)start the port or command that setup specific queue.
+
+port start/stop queue
+~~~~~~~~~~~~~~~~~~~~~
+
+Start/stop a rx/tx queue on a specific port::
+
+ testpmd> port (port_id) (rxq|txq) (queue_id) (start|stop)
+
+port setup queue
+~~~~~~~~~~~~~~~~~~~~~
+
+Setup a rx/tx queue on a specific port::
+
+ testpmd> port (port_id) (rxq|txq) (queue_id) setup
+
+Only take effect when port is started.
+
+port config - speed
+~~~~~~~~~~~~~~~~~~~
+
+Set the speed and duplex mode for all ports or a specific port::
+
+ testpmd> port config (port_id|all) speed (10|100|1000|10000|25000|40000|50000|100000|auto) \
+ duplex (half|full|auto)
+
+port config - queues/descriptors
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set number of queues/descriptors for rxq, txq, rxd and txd::
+
+ testpmd> port config all (rxq|txq|rxd|txd) (value)
+
+This is equivalent to the ``--rxq``, ``--txq``, ``--rxd`` and ``--txd`` command-line options.
+
+port config - max-pkt-len
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set the maximum packet length::
+
+ testpmd> port config all max-pkt-len (value)
+
+This is equivalent to the ``--max-pkt-len`` command-line option.
+
+port config - CRC Strip
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Set hardware CRC stripping on or off for all ports::
+
+ testpmd> port config all crc-strip (on|off)
+
+CRC stripping is on by default.
+
+The ``off`` option is equivalent to the ``--disable-crc-strip`` command-line option.
+
+port config - scatter
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Set RX scatter mode on or off for all ports::
+
+ testpmd> port config all scatter (on|off)
+
+RX scatter mode is off by default.
+
+The ``on`` option is equivalent to the ``--enable-scatter`` command-line option.
+
+port config - RX Checksum
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set hardware RX checksum offload to on or off for all ports::
+
+ testpmd> port config all rx-cksum (on|off)
+
+Checksum offload is off by default.
+
+The ``on`` option is equivalent to the ``--enable-rx-cksum`` command-line option.
+
+port config - VLAN
+~~~~~~~~~~~~~~~~~~
+
+Set hardware VLAN on or off for all ports::
+
+ testpmd> port config all hw-vlan (on|off)
+
+Hardware VLAN is off by default.
+
+The ``on`` option is equivalent to the ``--enable-hw-vlan`` command-line option.
+
+port config - VLAN filter
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set hardware VLAN filter on or off for all ports::
+
+ testpmd> port config all hw-vlan-filter (on|off)
+
+Hardware VLAN filter is off by default.
+
+The ``on`` option is equivalent to the ``--enable-hw-vlan-filter`` command-line option.
+
+port config - VLAN strip
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set hardware VLAN strip on or off for all ports::
+
+ testpmd> port config all hw-vlan-strip (on|off)
+
+Hardware VLAN strip is off by default.
+
+The ``on`` option is equivalent to the ``--enable-hw-vlan-strip`` command-line option.
+
+port config - VLAN extend
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set hardware VLAN extend on or off for all ports::
+
+ testpmd> port config all hw-vlan-extend (on|off)
+
+Hardware VLAN extend is off by default.
+
+The ``on`` option is equivalent to the ``--enable-hw-vlan-extend`` command-line option.
+
+port config - Drop Packets
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set packet drop for packets with no descriptors on or off for all ports::
+
+ testpmd> port config all drop-en (on|off)
+
+Packet dropping for packets with no descriptors is off by default.
+
+The ``on`` option is equivalent to the ``--enable-drop-en`` command-line option.
+
+port config - RSS
+~~~~~~~~~~~~~~~~~
+
+Set the RSS (Receive Side Scaling) mode on or off::
+
+ testpmd> port config all rss (all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|none)
+
+RSS is on by default.
+
+The ``all`` option is equivalent to ip|tcp|udp|sctp|ether.
+The ``default`` option enables all supported RSS types reported by device info.
+The ``none`` option is equivalent to the ``--disable-rss`` command-line option.
+
+port config - RSS Reta
+~~~~~~~~~~~~~~~~~~~~~~
+
+Set the RSS (Receive Side Scaling) redirection table::
+
+ testpmd> port config all rss reta (hash,queue)[,(hash,queue)]
+
+port config - DCB
+~~~~~~~~~~~~~~~~~
+
+Set the DCB mode for an individual port::
+
+ testpmd> port config (port_id) dcb vt (on|off) (traffic_class) pfc (on|off)
+
+The traffic class should be 4 or 8.
+
+port config - Burst
+~~~~~~~~~~~~~~~~~~~
+
+Set the number of packets per burst::
+
+ testpmd> port config all burst (value)
+
+This is equivalent to the ``--burst`` command-line option.
+
+port config - Threshold
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Set thresholds for TX/RX queues::
+
+ testpmd> port config all (threshold) (value)
+
+Where the threshold type can be:
+
+* ``txpt:`` Set the prefetch threshold register of the TX rings, 0 <= value <= 255.
+
+* ``txht:`` Set the host threshold register of the TX rings, 0 <= value <= 255.
+
+* ``txwt:`` Set the write-back threshold register of the TX rings, 0 <= value <= 255.
+
+* ``rxpt:`` Set the prefetch threshold register of the RX rings, 0 <= value <= 255.
+
+* ``rxht:`` Set the host threshold register of the RX rings, 0 <= value <= 255.
+
+* ``rxwt:`` Set the write-back threshold register of the RX rings, 0 <= value <= 255.
+
+* ``txfreet:`` Set the transmit free threshold of the TX rings, 0 <= value <= txd.
+
+* ``rxfreet:`` Set the transmit free threshold of the RX rings, 0 <= value <= rxd.
+
+* ``txrst:`` Set the transmit RS bit threshold of TX rings, 0 <= value <= txd.
+
+These threshold options are also available from the command-line.
+
+port config - E-tag
+~~~~~~~~~~~~~~~~~~~
+
+Set the value of ether-type for E-tag::
+
+ testpmd> port config (port_id|all) l2-tunnel E-tag ether-type (value)
+
+Enable/disable the E-tag support::
+
+ testpmd> port config (port_id|all) l2-tunnel E-tag (enable|disable)
+
+port config pctype mapping
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Reset pctype mapping table::
+
+ testpmd> port config (port_id) pctype mapping reset
+
+Update hardware defined pctype to software defined flow type mapping table::
+
+ testpmd> port config (port_id) pctype mapping update (pctype_id_0[,pctype_id_1]*) (flow_type_id)
+
+where:
+
+* ``pctype_id_x``: hardware pctype id as index of bit in bitmask value of the pctype mapping table.
+
+* ``flow_type_id``: software flow type id as the index of the pctype mapping table.
+
+port config input set
+~~~~~~~~~~~~~~~~~~~~~
+
+Config RSS/FDIR/FDIR flexible payload input set for some pctype::
+ testpmd> port config (port_id) pctype (pctype_id) \
+ (hash_inset|fdir_inset|fdir_flx_inset) \
+ (get|set|clear) field (field_idx)
+
+Clear RSS/FDIR/FDIR flexible payload input set for some pctype::
+ testpmd> port config (port_id) pctype (pctype_id) \
+ (hash_inset|fdir_inset|fdir_flx_inset) clear all
+
+where:
+
+* ``pctype_id``: hardware packet classification types.
+* ``field_idx``: hardware field index.
+
+port config udp_tunnel_port
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add/remove UDP tunnel port for VXLAN/GENEVE tunneling protocols::
+ testpmd> port config (port_id) udp_tunnel_port add|rm vxlan|geneve (udp_port)
+
+Link Bonding Functions
+----------------------
+
+The Link Bonding functions make it possible to dynamically create and
+manage link bonding devices from within testpmd interactive prompt.
+
+create bonded device
+~~~~~~~~~~~~~~~~~~~~
+
+Create a new bonding device::
+
+ testpmd> create bonded device (mode) (socket)
+
+For example, to create a bonded device in mode 1 on socket 0::
+
+ testpmd> create bonded 1 0
+ created new bonded device (port X)
+
+add bonding slave
+~~~~~~~~~~~~~~~~~
+
+Adds Ethernet device to a Link Bonding device::
+
+ testpmd> add bonding slave (slave id) (port id)
+
+For example, to add Ethernet device (port 6) to a Link Bonding device (port 10)::
+
+ testpmd> add bonding slave 6 10
+
+
+remove bonding slave
+~~~~~~~~~~~~~~~~~~~~
+
+Removes an Ethernet slave device from a Link Bonding device::
+
+ testpmd> remove bonding slave (slave id) (port id)
+
+For example, to remove Ethernet slave device (port 6) to a Link Bonding device (port 10)::
+
+ testpmd> remove bonding slave 6 10
+
+set bonding mode
+~~~~~~~~~~~~~~~~
+
+Set the Link Bonding mode of a Link Bonding device::
+
+ testpmd> set bonding mode (value) (port id)
+
+For example, to set the bonding mode of a Link Bonding device (port 10) to broadcast (mode 3)::
+
+ testpmd> set bonding mode 3 10
+
+set bonding primary
+~~~~~~~~~~~~~~~~~~~
+
+Set an Ethernet slave device as the primary device on a Link Bonding device::
+
+ testpmd> set bonding primary (slave id) (port id)
+
+For example, to set the Ethernet slave device (port 6) as the primary port of a Link Bonding device (port 10)::
+
+ testpmd> set bonding primary 6 10
+
+set bonding mac
+~~~~~~~~~~~~~~~
+
+Set the MAC address of a Link Bonding device::
+
+ testpmd> set bonding mac (port id) (mac)
+
+For example, to set the MAC address of a Link Bonding device (port 10) to 00:00:00:00:00:01::
+
+ testpmd> set bonding mac 10 00:00:00:00:00:01
+
+set bonding xmit_balance_policy
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set the transmission policy for a Link Bonding device when it is in Balance XOR mode::
+
+ testpmd> set bonding xmit_balance_policy (port_id) (l2|l23|l34)
+
+For example, set a Link Bonding device (port 10) to use a balance policy of layer 3+4 (IP addresses & UDP ports)::
+
+ testpmd> set bonding xmit_balance_policy 10 l34
+
+
+set bonding mon_period
+~~~~~~~~~~~~~~~~~~~~~~
+
+Set the link status monitoring polling period in milliseconds for a bonding device.
+
+This adds support for PMD slave devices which do not support link status interrupts.
+When the mon_period is set to a value greater than 0 then all PMD's which do not support
+link status ISR will be queried every polling interval to check if their link status has changed::
+
+ testpmd> set bonding mon_period (port_id) (value)
+
+For example, to set the link status monitoring polling period of bonded device (port 5) to 150ms::
+
+ testpmd> set bonding mon_period 5 150
+
+
+set bonding lacp dedicated_queue
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Enable dedicated tx/rx queues on bonding devices slaves to handle LACP control plane traffic
+when in mode 4 (link-aggregration-802.3ad)::
+
+ testpmd> set bonding lacp dedicated_queues (port_id) (enable|disable)
+
+
+set bonding agg_mode
+~~~~~~~~~~~~~~~~~~~~
+
+Enable one of the specific aggregators mode when in mode 4 (link-aggregration-802.3ad)::
+
+ testpmd> set bonding agg_mode (port_id) (bandwidth|count|stable)
+
+
+show bonding config
+~~~~~~~~~~~~~~~~~~~
+
+Show the current configuration of a Link Bonding device::
+
+ testpmd> show bonding config (port id)
+
+For example,
+to show the configuration a Link Bonding device (port 9) with 3 slave devices (1, 3, 4)
+in balance mode with a transmission policy of layer 2+3::
+
+ testpmd> show bonding config 9
+ Bonding mode: 2
+ Balance Xmit Policy: BALANCE_XMIT_POLICY_LAYER23
+ Slaves (3): [1 3 4]
+ Active Slaves (3): [1 3 4]
+ Primary: [3]
+
+
+Register Functions
+------------------
+
+The Register Functions can be used to read from and write to registers on the network card referenced by a port number.
+This is mainly useful for debugging purposes.
+Reference should be made to the appropriate datasheet for the network card for details on the register addresses
+and fields that can be accessed.
+
+read reg
+~~~~~~~~
+
+Display the value of a port register::
+
+ testpmd> read reg (port_id) (address)
+
+For example, to examine the Flow Director control register (FDIRCTL, 0x0000EE000) on an Intel 82599 10 GbE Controller::
+
+ testpmd> read reg 0 0xEE00
+ port 0 PCI register at offset 0xEE00: 0x4A060029 (1241907241)
+
+read regfield
+~~~~~~~~~~~~~
+
+Display a port register bit field::
+
+ testpmd> read regfield (port_id) (address) (bit_x) (bit_y)
+
+For example, reading the lowest two bits from the register in the example above::
+
+ testpmd> read regfield 0 0xEE00 0 1
+ port 0 PCI register at offset 0xEE00: bits[0, 1]=0x1 (1)
+
+read regbit
+~~~~~~~~~~~
+
+Display a single port register bit::
+
+ testpmd> read regbit (port_id) (address) (bit_x)
+
+For example, reading the lowest bit from the register in the example above::
+
+ testpmd> read regbit 0 0xEE00 0
+ port 0 PCI register at offset 0xEE00: bit 0=1
+
+write reg
+~~~~~~~~~
+
+Set the value of a port register::
+
+ testpmd> write reg (port_id) (address) (value)
+
+For example, to clear a register::
+
+ testpmd> write reg 0 0xEE00 0x0
+ port 0 PCI register at offset 0xEE00: 0x00000000 (0)
+
+write regfield
+~~~~~~~~~~~~~~
+
+Set bit field of a port register::
+
+ testpmd> write regfield (port_id) (address) (bit_x) (bit_y) (value)
+
+For example, writing to the register cleared in the example above::
+
+ testpmd> write regfield 0 0xEE00 0 1 2
+ port 0 PCI register at offset 0xEE00: 0x00000002 (2)
+
+write regbit
+~~~~~~~~~~~~
+
+Set single bit value of a port register::
+
+ testpmd> write regbit (port_id) (address) (bit_x) (value)
+
+For example, to set the high bit in the register from the example above::
+
+ testpmd> write regbit 0 0xEE00 31 1
+ port 0 PCI register at offset 0xEE00: 0x8000000A (2147483658)
+
+Traffic Metering and Policing
+-----------------------------
+
+The following section shows functions for configuring traffic metering and
+policing on the ethernet device through the use of generic ethdev API.
+
+show port traffic management capability
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Show traffic metering and policing capability of the port::
+
+ testpmd> show port meter cap (port_id)
+
+add port meter profile (srTCM rfc2967)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add meter profile (srTCM rfc2697) to the ethernet device::
+
+ testpmd> add port meter profile srtcm_rfc2697 (port_id) (profile_id) \
+ (cir) (cbs) (ebs)
+
+where:
+
+* ``profile_id``: ID for the meter profile.
+* ``cir``: Committed Information Rate (CIR) (bytes/second).
+* ``cbs``: Committed Burst Size (CBS) (bytes).
+* ``ebs``: Excess Burst Size (EBS) (bytes).
+
+add port meter profile (trTCM rfc2968)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add meter profile (srTCM rfc2698) to the ethernet device::
+
+ testpmd> add port meter profile trtcm_rfc2698 (port_id) (profile_id) \
+ (cir) (pir) (cbs) (pbs)
+
+where:
+
+* ``profile_id``: ID for the meter profile.
+* ``cir``: Committed information rate (bytes/second).
+* ``pir``: Peak information rate (bytes/second).
+* ``cbs``: Committed burst size (bytes).
+* ``pbs``: Peak burst size (bytes).
+
+add port meter profile (trTCM rfc4115)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add meter profile (trTCM rfc4115) to the ethernet device::
+
+ testpmd> add port meter profile trtcm_rfc4115 (port_id) (profile_id) \
+ (cir) (eir) (cbs) (ebs)
+
+where:
+
+* ``profile_id``: ID for the meter profile.
+* ``cir``: Committed information rate (bytes/second).
+* ``eir``: Excess information rate (bytes/second).
+* ``cbs``: Committed burst size (bytes).
+* ``ebs``: Excess burst size (bytes).
+
+delete port meter profile
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Delete meter profile from the ethernet device::
+
+ testpmd> del port meter profile (port_id) (profile_id)
+
+create port meter
+~~~~~~~~~~~~~~~~~
+
+Create new meter object for the ethernet device::
+
+ testpmd> create port meter (port_id) (mtr_id) (profile_id) \
+ (meter_enable) (g_action) (y_action) (r_action) (stats_mask) (shared) \
+ (use_pre_meter_color) [(dscp_tbl_entry0) (dscp_tbl_entry1)...\
+ (dscp_tbl_entry63)]
+
+where:
+
+* ``mtr_id``: meter object ID.
+* ``profile_id``: ID for the meter profile.
+* ``meter_enable``: When this parameter has a non-zero value, the meter object
+ gets enabled at the time of creation, otherwise remains disabled.
+* ``g_action``: Policer action for the packet with green color.
+* ``y_action``: Policer action for the packet with yellow color.
+* ``r_action``: Policer action for the packet with red color.
+* ``stats_mask``: Mask of statistics counter types to be enabled for the
+ meter object.
+* ``shared``: When this parameter has a non-zero value, the meter object is
+ shared by multiple flows. Otherwise, meter object is used by single flow.
+* ``use_pre_meter_color``: When this parameter has a non-zero value, the
+ input color for the current meter object is determined by the latest meter
+ object in the same flow. Otherwise, the current meter object uses the
+ *dscp_table* to determine the input color.
+* ``dscp_tbl_entryx``: DSCP table entry x providing meter providing input
+ color, 0 <= x <= 63.
+
+enable port meter
+~~~~~~~~~~~~~~~~~
+
+Enable meter for the ethernet device::
+
+ testpmd> enable port meter (port_id) (mtr_id)
+
+disable port meter
+~~~~~~~~~~~~~~~~~~
+
+Disable meter for the ethernet device::
+
+ testpmd> disable port meter (port_id) (mtr_id)
+
+delete port meter
+~~~~~~~~~~~~~~~~~
+
+Delete meter for the ethernet device::
+
+ testpmd> del port meter (port_id) (mtr_id)
+
+Set port meter profile
+~~~~~~~~~~~~~~~~~~~~~~
+
+Set meter profile for the ethernet device::
+
+ testpmd> set port meter profile (port_id) (mtr_id) (profile_id)
+
+set port meter dscp table
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set meter dscp table for the ethernet device::
+
+ testpmd> set port meter dscp table (port_id) (mtr_id) [(dscp_tbl_entry0) \
+ (dscp_tbl_entry1)...(dscp_tbl_entry63)]
+
+set port meter policer action
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set meter policer action for the ethernet device::
+
+ testpmd> set port meter policer action (port_id) (mtr_id) (action_mask) \
+ (action0) [(action1) (action1)]
+
+where:
+
+* ``action_mask``: Bit mask indicating which policer actions need to be
+ updated. One or more policer actions can be updated in a single function
+ invocation. To update the policer action associated with color C, bit
+ (1 << C) needs to be set in *action_mask* and element at position C
+ in the *actions* array needs to be valid.
+* ``actionx``: Policer action for the color x,
+ RTE_MTR_GREEN <= x < RTE_MTR_COLORS
+
+set port meter stats mask
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set meter stats mask for the ethernet device::
+
+ testpmd> set port meter stats mask (port_id) (mtr_id) (stats_mask)
+
+where:
+
+* ``stats_mask``: Bit mask indicating statistics counter types to be enabled.
+
+show port meter stats
+~~~~~~~~~~~~~~~~~~~~~
+
+Show meter stats of the ethernet device::
+
+ testpmd> show port meter stats (port_id) (mtr_id) (clear)
+
+where:
+
+* ``clear``: Flag that indicates whether the statistics counters should
+ be cleared (i.e. set to zero) immediately after they have been read or not.
+
+Traffic Management
+------------------
+
+The following section shows functions for configuring traffic management on
+on the ethernet device through the use of generic TM API.
+
+show port traffic management capability
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Show traffic management capability of the port::
+
+ testpmd> show port tm cap (port_id)
+
+show port traffic management capability (hierarchy level)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Show traffic management hierarchy level capability of the port::
+
+ testpmd> show port tm level cap (port_id) (level_id)
+
+show port traffic management capability (hierarchy node level)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Show the traffic management hierarchy node capability of the port::
+
+ testpmd> show port tm node cap (port_id) (node_id)
+
+show port traffic management hierarchy node type
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Show the port traffic management hierarchy node type::