It is helpful to retrieve flow information for monitoring and debugging the configuration of flow rules.
flow dump command
To display information about all flow rules associated with port 0, run the following
command.
flow dump 0 allThis provides a list of details for a maximum of 1000 flows. Primarily, flow rules with the highest priority in group 0 are displayed, and flow rules in group 1-32 are displayed in random order. See an example of the output as follows:
testpmd> flow dump 0 all Flow 0x562b9da2eb50, type FLOW, port 0, caller_id 0 FLM base (group 1, FT idx 2, ref cnt 1) FPGA module CAT.CFN (idx 2, nb 1, ref 0) CAT.KCS.FLM 1 CAT.KCS.KM 0 CAT.CTE 0x004d FPGA module FLM.RCP (idx 1, nb 1, ref 0) FPGA module QSL.RCP (idx 2, nb 1, ref 0) QSL.QST range 1-1 QST idx 1, TX_PORT 1 Flow 0x562b9da2d9c0, type FLOW, port 0, caller_id 129 FPGA module CAT.CFN (idx 1, nb 1, ref 0) CAT.KCS.FLM 1 CAT.KCS.KM 0 CAT.CTE 0x004c FPGA module QSL.RCP (idx 1, nb 1, ref 0) Flow 0x562b9da2ec90, type FLM, port 0, caller_id 129 FLM owner 0x562b9da2eb50 (group 1, FT idx 2, CAT.CFN 2) Key id 3, protocol 0, priority 0 … … Flow dump finished
Displaying an individual flow rule
For an individual flow, use the following
format.
flow dump 0 rule 0This command retrieves details about flow rule 0 on port 0. An example of the output:
testpmd> flow dump 0 rule 0 Flow 0x562b9da2eb50, type FLOW, port 0, caller_id 0 FLM base (group 1, FT idx 2, ref cnt 1) FPGA module CAT.CFN (idx 2, nb 1, ref 0) CAT.KCS.FLM 1 CAT.KCS.KM 0 CAT.CTE 0x004d FPGA module FLM.RCP (idx 1, nb 1, ref 0) FPGA module QSL.RCP (idx 2, nb 1, ref 0) QSL.QST range 1-1 QST idx 1, TX_PORT 1 Flow dump finished
Saving flow information in a file
You can also save the output in a file. For
example:
flow dump 0 all flow_info.txt
rte_flow_dev_dump
This functionality can be implemented using the DPDK API rte_flow_dev_dump in the application. See rte_flow_dev_dump.