8. Flow Performance Tool
Application for rte_flow performance testing. The application provides the ability to test insertion rate of specific rte_flow rule, by stressing it to the NIC, and calculates the insertion and deletion rates.
The application allows to configure which rule to apply through several options of the command line.
After that the application will start producing rules with same pattern but increasing the outer IP source address by 1 each time, thus it will give different flow each time, and all other items will have open masks.
To assess the rule insertion rate, the flow performance tool breaks down the entire number of flow rule operations into windows of fixed size (defaults to 100000 flow rule operations per window, but can be configured). Then, the flow performance tool measures the total time per window and computes an average time across all windows.
The application also provides the ability to measure rte flow deletion rate, in addition to memory consumption before and after the flow rules’ creation.
The app supports single and multiple core performance measurements, and support multiple cores insertion/deletion as well.
8.1. Compiling the Application
The test-flow-perf application is compiled as part of the main compilation
of the DPDK libraries and tools.
Refer to the DPDK Getting Started Guides for details.
8.2. Running the Application
8.2.1. EAL Command-line Options
Please refer to EAL parameters (Linux) or EAL parameters (FreeBSD) for a list of available EAL command-line options.
8.2.2. Flow Performance Options
The following are the command-line options for the flow performance application.
They must be separated from the EAL options, shown in the previous section,
with a -- separator:
sudo ./dpdk-test-flow_perf -n 4 -a 08:00.0 -- --ingress --ether --ipv4 --queue --rules-count=1000000
The command line options are:
--helpDisplay a help message and quit.--rules-count=NSet the total number of flow rules to insert, where 1 <= N <= “number of flow rules”. The default value is 4,000,000.--rules-batch=NSet the number of flow rules to insert per iteration window, where 1 <= N <= “number of flow rules per iteration window”. The default value is 100,000 flow rules per iteration window. For a total of –rules-count=1000000 flow rules to be inserted and an iteration window size of –rules-batch=100000 flow rules, the application will measure the insertion rate 10 times (i.e., once every 100000 flow rules) and then report an average insertion rate across the 10 measurements.--dump-iterationsPrint rates for each iteration window. Default iteration window equals to the rules-batch size (i.e., 100,000).--deletion-rateEnable deletion rate calculations.--dump-socket-memDump the memory stats for each socket before the insertion and after.--enable-fwdEnable packets forwarding after insertion/deletion operations.--portmask=Nhexadecimal bitmask of ports to be used.--cores=NSet the number of needed cores to insert/delete rte_flow rules. Default cores count is 1.--random-priority=N,SCreate flows with the priority attribute set randomly between 0 to N - 1 and use S as seed for the pseudo-random number generator.--meter-profile-algSet the traffic metering algorithm. Example: meter-profile-alg=srtcmp, default algorithm is srtcm_rfc2697--unique-dataFlag to set using unique data for all actions that support data, Such as header modify and encap actions. Default is using fixed data for any action that support data for all flows.--rxq=NSet the count of receive queues, default is 1.--txq=NSet the count of send queues, default is 1.--rxd=NSet the count of rxd, default is 256.--txd=NSet the count of txd, default is 256.--mbuf-size=NSet the size of mbuf, default size is 2048.--mbuf-cache-size=NSet the size of mbuf cache, default size is 512.--total-mbuf-count=NSet the count of total mbuf number, default count is 32000.--meter-profile=N1,N2,N3Set the CIR, CBS and EBS parameters, default values are 1250000, 156250 and 0.--packet-modeEnable packet mode for meter profile.
Attributes:
--ingressSet Ingress attribute to all flows attributes.--egressSet Egress attribute to all flows attributes.--transferSet Transfer attribute to all flows attributes.--group=NSet group for all flows, where N >= 0. Default group is 0.
Items:
--etherAdd Ether item to all flows items, This item have open mask.--vlanAdd VLAN item to all flows items, This item have VLAN value defined in user_parameters.h underVNI_VALUEwith full mask, default value = 1. Other fields are open mask.--ipv4Add IPv4 item to all flows items, This item have incremental source IP, with full mask. Other fields are open mask.--ipv6Add IPv6 item to all flows item, This item have incremental source IP, with full mask. Other fields are open mask.--tcpAdd TCP item to all flows items, This item have open mask.--udpAdd UDP item to all flows items, This item have open mask.--vxlanAdd VXLAN item to all flows items, This item have VNI value defined in user_parameters.h underVNI_VALUEwith full mask, default value = 1. Other fields are open mask.--vxlan-gpeAdd VXLAN-GPE item to all flows items, This item have VNI value defined in user_parameters.h underVNI_VALUEwith full mask, default value = 1. Other fields are open mask.--greAdd GRE item to all flows items, This item have protocol value defined in user_parameters.h underGRE_PROTOwith full mask, default protocol = 0x6558 “Ether” Other fields are open mask.--geneveAdd GENEVE item to all flows items, This item have VNI value defined in user_parameters.h underVNI_VALUEwith full mask, default value = 1. Other fields are open mask.--gtpAdd GTP item to all flows items, This item have TEID value defined in user_parameters.h underTEID_VALUEwith full mask, default value = 1. Other fields are open mask.--metaAdd Meta item to all flows items, This item have data value defined in user_parameters.h underMETA_DATAwith full mask, default value = 1. Other fields are open mask.--tagAdd Tag item to all flows items, This item have data value defined in user_parameters.h underMETA_DATAwith full mask, default value = 1.Also it have tag value defined in user_parameters.h under
TAG_INDEXwith full mask, default value = 0. Other fields are open mask.--icmpv4Add icmpv4 item to all flows items, This item have open mask.--icmpv6Add icmpv6 item to all flows items, This item have open mask.
Actions:
--port-idAdd port redirection action to all flows actions. Port redirection destination is defined in user_parameters.h under PORT_ID_DST, default value = 1.
It can also has optional parameter like –port-id=N[,M] to specify the destination port, the number of values should be the same with number of set bits in portmask.
--rssAdd RSS action to all flows actions, The queues in RSS action will be all queues configured in the app.--queueAdd queue action to all flows items, The queue will change in round robin state for each flow.- For example:
The app running with 4 RX queues Flow #0: queue index 0 Flow #1: queue index 1 Flow #2: queue index 2 Flow #3: queue index 3 Flow #4: queue index 0 …
--jumpAdd jump action to all flows actions. Jump action destination is defined in user_parameters.h underJUMP_ACTION_TABLE, default value = 2.--markAdd mark action to all flows actions. Mark action id is defined in user_parameters.h underMARK_ID, default value = 1.--countAdd count action to all flows actions.--set-metaAdd set-meta action to all flows actions. Meta data is defined in user_parameters.h underMETA_DATAwith full mask, default value = 1.--set-tagAdd set-tag action to all flows actions. Meta data is defined in user_parameters.h underMETA_DATAwith full mask, default value = 1.Tag index is defined in user_parameters.h under
TAG_INDEXwith full mask, default value = 0.--dropAdd drop action to all flows actions.--hairpin-queue=NAdd hairpin queue action to all flows actions. The queue will change in round robin state for each flow.- For example:
The app running with 4 RX hairpin queues and 4 normal RX queues Flow #0: queue index 4 Flow #1: queue index 5 Flow #2: queue index 6 Flow #3: queue index 7 Flow #4: queue index 4 …
--hairpin-rss=NAdd hairpin RSS action to all flows actions. The queues in RSS action will be all hairpin queues configured in the app.--set-src-macAdd set source mac action to all flows actions. The mac to be set is random each flow.--set-dst-macAdd set destination mac action to all flows actions. The mac to be set is random each flow.-set-src-ipv4Add set source ipv4 action to all flows actions. The ipv4 header to be set is random each flow.--set-dst-ipv4Add set destination ipv4 action to all flows actions. The ipv4 header to be set is random each flow.--set-src-ipv6Add set source ipv6 action to all flows actions. The ipv6 header to be set is random each flow.--set-dst-ipv6Add set destination ipv6 action to all flows actions. The ipv6 header to be set is random each flow.--set-src-tpAdd set source tp action to all flows actions. The tp sport header to be set is random each flow.--set-dst-tpAdd set destination tp action to all flows actions. The tp dport header to be set is random each flow.--inc-tcp-ackAdd increment TCP acknowledgment by one to all flows actions.--dec-tcp-ackAdd decrement TCP acknowledgment by one to all flows actions.--inc-tcp-seqAdd increment TCP sequence by one to all flows actions.--dec-tcp-seqAdd decrement TCP sequence by one to all flows actions.--set-ttlAdd set IP ttl action to all flows actions. The ttl value to be set is random each flow.--dec-ttlAdd decrement IP ttl by one to all flows actions.--set-ipv4-dscpAdd set IPv4 dscp action to all flows actions. The dscp value to be is random each flow.--set-ipv6-dscpAdd set IPv6 dscp action to all flows actions. The dscp value to be is random each flow.--flagAdd flag action to all flows actions.--raw-encap=<DATA>Add raw encap action to all flows actions. Data is the data needed to be encaped, with fixed values. Example: raw-encap=ether,ipv4,udp,vxlan--raw-decap=<DATA>Add raw decap action to all flows actions. Data is the data needed to be decaped, with fixed values. Example: raw-decap=ether,ipv4,gre--vxlan-encapAdd vxlan encap action to all flows actions. Data to encap is fixed with pattern: ether,ipv4,udp,vxlan, all encapped items have fixed values.--vxlan-decapAdd vxlan decap action to all flows actions.--policy-mtr=<str>Add policy-mtr to create meter with policy and specify policy actions. Example: policy-mtr=rss,mark::drop--meterAdd meter action to all flows actions. Currently, 1 meter profile -> N meter rules -> N rte flows.