X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fguides%2Ftestpmd_app_ug%2Ftestpmd_funcs.rst;h=33857acf5408dea23022a08adb352268c71267db;hb=fc5bffb8b5ba17c110b8c3c35c6090e3345ad000;hp=dd362f9631859971ff8d46586ed14aec0844bad1;hpb=f29fa2c59b858dc725c3d8486eddb59797bbb6dc;p=dpdk.git diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index dd362f9631..33857acf54 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -1524,6 +1524,13 @@ Where: * ``autoneg``: Change the auto-negotiation parameter. +show flow control +~~~~~~~~~~~~~~~~~ + +show the link flow control parameter on a port:: + + testpmd> show port flow_ctrl + set pfc_ctrl rx ~~~~~~~~~~~~~~~ @@ -2436,6 +2443,15 @@ hash of input [IP] packets received on port:: ipv6-udp-ex ) +port cleanup txq mbufs +~~~~~~~~~~~~~~~~~~~~~~ + +To cleanup txq mbufs currently cached by driver:: + + testpmd> port cleanup (port_id) txq (queue_id) (free_cnt) + +If the value of ``free_cnt`` is 0, driver should free all cached mbufs. + Device Functions ---------------- @@ -4073,6 +4089,10 @@ This section lists supported actions and their attributes, if any. - ``indirect_action_id {unsigned}``: Indirect action ID to use +- ``color``: Color the packet to reflect the meter color result + + - ``type {value}``: Set color type with specified value(green/yellow/red) + Destroying flow rules ~~~~~~~~~~~~~~~~~~~~~ @@ -4994,6 +5014,26 @@ rules like above for the peer port. testpmd> flow indirect_action 0 update 0 action conntrack_update dir / end +Sample meter with policy rules +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Meter with policy rules can be created by the following commands: + +Need to create policy first and actions are set for green/yellow/red colors. +Create meter with policy id. Create flow with meter id. + +Example for policy with meter color action. The purpose is to color the packet +to reflect the meter color result. +The meter policy action list: ``green -> green, yellow -> yellow, red -> red``. + +:: + + testpmd> add port meter profile srtcm_rfc2697 0 13 21504 2688 0 0 + testpmd> add port meter policy 0 1 g_actions color type green / end y_actions color type yellow / end + r_actions color type red / end + testpmd> create port meter 0 1 13 1 yes 0xffff 0 0 + testpmd> flow create 0 priority 0 ingress group 1 pattern eth / end actions meter mtr_id 1 / end + BPF Functions --------------