[dpdk-dev] [RFC]Generic flow filtering API Sample Application
On Wed, Nov 02, 2016 at 05:27:50AM +, Zhao1, Wei wrote: > Hi All, > Now we are planning for an sample application for Generic flow > filtering API feature, and I have finished the RFC for this example app. > Now Adrien Mazarguil has send v2 version of Generic flow > filtering API, this sample application RFC is based on that. > > Thank you. > > > > > Generic flow filtering API Sample Application > > > The application is a simple example of generic flow filtering API using the > DPDK. > The application performs flow director/filtering/classification in packet > processing. > > Overview > > > The application demonstrates the use of generic flow > director/filtering/classification API > in the DPDK to implement packet forwarding.And this document focus on the > guide line of writing rules configuration > files and prompt commands usage. It also supply the definition of the > available EAL options arguments which is useful > in DPDK packet forwarding processing. > > > Compiling the Application > - > > To compile the application: > > #.Go to the sample application directory: > > .. code-block:: console > > export RTE_SDK=/path/to/rte_sdk > cd ${RTE_SDK}/examples/gen_filter Any specific reason to create a separate application for testing the generic filter but not as a extension to testpmd? >
[dpdk-dev] [RFC]Generic flow filtering API Sample Application
Hi Wei, On Wed, Nov 02, 2016 at 05:27:50AM +, Zhao1, Wei wrote: > Hi All, > Now we are planning for an sample application for Generic flow > filtering API feature, and I have finished the RFC for this example app. > Now Adrien Mazarguil has send v2 version of Generic flow > filtering API, this sample application RFC is based on that. > > Thank you. Thanks for your RFC, sorry for the late notice that I've been essentially working on a similar implementation in testpmd in order to validate the API before sending v1, which I concede is taking way longer than expected. I have yet to submit my patches however this should happen soon, if you haven't started working on your own implementation yet, please wait until my implementation gets rejected to avoid any more duplicated effort in the meantime. BTW, I find a lot of similarities between our respective command-line handling approaches, which is great! We're going in the same direction. > Generic flow filtering API Sample Application > > > The application is a simple example of generic flow filtering API using the > DPDK. > The application performs flow director/filtering/classification in packet > processing. > > Overview > > > The application demonstrates the use of generic flow > director/filtering/classification API > in the DPDK to implement packet forwarding.And this document focus on the > guide line of writing rules configuration > files and prompt commands usage. It also supply the definition of the > available EAL options arguments which is useful > in DPDK packet forwarding processing. > > > Compiling the Application > - > > To compile the application: > > #.Go to the sample application directory: > > .. code-block:: console > > export RTE_SDK=/path/to/rte_sdk > cd ${RTE_SDK}/examples/gen_filter > > #.Set the target (a default target is used if not specified). For example: > > .. code-block:: console > > export RTE_TARGET=x86_64-native-linuxapp-gcc > > See the *DPDK Getting Started Guide* for possible RTE_TARGET values. > > #.Build the application: > > .. code-block:: console > > make > > Running the Application > --- > The application has a number of EAL options:: > > ./gen_filter [EAL options] -- > > EAL options: > * -c > Codemask, set the hexadecimal bitmask of the cores to run on. > > * -n > Num, set the number of memory channels to use. > > APP PARAMS: > The following are the application options parameters, they must be > separated > from the EAL options with a "--" separator. > > * -i > Interactive, run this app in interactive mode. In this mode, the app > starts with a prompt that can > be used to start and stop forwarding, then manage generic filters rule > configure in the application, > reference to the following description for more details.In > non-interactive mode, the application starts with the configuration specified > on the > command-line and immediately enters forwarding mode. > > * --portmask=0xXX > Set the hexadecimal bitmask of the ports which can be used by the > generic flow director test in packet forwarding. > > * --coremask=0xXX > Set the hexadecimal bitmask of the cores running the packet forwarding > test. The master > lcore is reserved for command line parsing only and cannot be masked on > for packet forwarding. > > * --nb-ports=N > Set the number of forwarding ports, where 1 <= N <= "number of ports" > on the board > or CONFIG_RTE_MAX_ETHPORTS from the configuration file. The default > value is the number of ports on the board. > > * --rxq=N > Set the number of RX queues per port to N, where 1 <= N <= 65535. The > default value is 1. > > * --txq=N > Set the number of TX queues per port to N, where 1 <= N <= 65535. The > default value is 1. > > > ###this part need to complete later after decision of which EAL commands > arguments need to be support in this application### > > > Interactive mode > > * when the gen_filter application is started in interactive mode, > (-i|--interactive), it displays a prompt > that can be used to start and stop forwarding, and configure the > application to set the Flow Director, > display statistics, set the Flow Director and other tasks. The > application has a number of commands line options: > > gen_filter>[Commands] > > * There is a prompt "gen_filter> " before cursor, command can be enter > after that position, > also a space bar between configuration file name and command. > > These are the commands that are currently working under the command line > interface: > > * Control Commands > > help: show the following commands which are
[dpdk-dev] [RFC]Generic flow filtering API Sample Application
Hi All, Now we are planning for an sample application for Generic flow filtering API feature, and I have finished the RFC for this example app. Now Adrien Mazarguil has send v2 version of Generic flow filtering API, this sample application RFC is based on that. Thank you. Generic flow filtering API Sample Application The application is a simple example of generic flow filtering API using the DPDK. The application performs flow director/filtering/classification in packet processing. Overview The application demonstrates the use of generic flow director/filtering/classification API in the DPDK to implement packet forwarding.And this document focus on the guide line of writing rules configuration files and prompt commands usage. It also supply the definition of the available EAL options arguments which is useful in DPDK packet forwarding processing. Compiling the Application - To compile the application: #. Go to the sample application directory: .. code-block:: console export RTE_SDK=/path/to/rte_sdk cd ${RTE_SDK}/examples/gen_filter #. Set the target (a default target is used if not specified). For example: .. code-block:: console export RTE_TARGET=x86_64-native-linuxapp-gcc See the *DPDK Getting Started Guide* for possible RTE_TARGET values. #. Build the application: .. code-block:: console make Running the Application --- The application has a number of EAL options:: ./gen_filter [EAL options] -- EAL options: * -c Codemask, set the hexadecimal bitmask of the cores to run on. * -n Num, set the number of memory channels to use. APP PARAMS: The following are the application options parameters, they must be separated from the EAL options with a "--" separator. * -i Interactive, run this app in interactive mode. In this mode, the app starts with a prompt that can be used to start and stop forwarding, then manage generic filters rule configure in the application, reference to the following description for more details.In non-interactive mode, the application starts with the configuration specified on the command-line and immediately enters forwarding mode. * --portmask=0xXX Set the hexadecimal bitmask of the ports which can be used by the generic flow director test in packet forwarding. * --coremask=0xXX Set the hexadecimal bitmask of the cores running the packet forwarding test. The master lcore is reserved for command line parsing only and cannot be masked on for packet forwarding. * --nb-ports=N Set the number of forwarding ports, where 1 <= N <= "number of ports" on the board or CONFIG_RTE_MAX_ETHPORTS from the configuration file. The default value is the number of ports on the board. * --rxq=N Set the number of RX queues per port to N, where 1 <= N <= 65535. The default value is 1. * --txq=N Set the number of TX queues per port to N, where 1 <= N <= 65535. The default value is 1. ###this part need to complete later after decision of which EAL commands arguments need to be support in this application### Interactive mode * when the gen_filter application is started in interactive mode, (-i|--interactive), it displays a prompt that can be used to start and stop forwarding, and configure the application to set the Flow Director, display statistics, set the Flow Director and other tasks. The application has a number of commands line options: gen_filter>[Commands] * There is a prompt "gen_filter> " before cursor, command can be enter after that position, also a space bar between configuration file name and command. These are the commands that are currently working under the command line interface: * Control Commands help: show the following commands which are currently available in this application and their usage gen_filter>help quit: quits the application. gen_filter>quit start: start the application, start packet forwarding gen_filter>start stop: stop the application, stop packet forwarding gen_filter>stop showcfg: print configuration infomation about EAL parameters, for example mapping of cores, rx queue, tx queues and so on. gen_filter>showcfg * General Commands to add/remove/query an filter rule: App will print reminder message for user about whether this rule command is SUCESS or FAIL after user type in the commmand. add: add filter rules from configuration file gen_filter>add port_id filename.txt