On Thu, Jun 4, 2020 at 2:59 AM Ori Kam <or...@mellanox.com> wrote: > > Following the new RegEx class [1]. > There is a need to create a dedecated test application in order to > validate this class and PMD. > > Unlike net device this application loads data from a file. > > This commit introduce the new RegEx test app. > > The basic app flow: > 1. query probed RegEx device. > 2. configure the probed device accoding to the device caps. > 3. read a rule database file. > 4. read a data file to be searched. > 5. allocate one mbuf. > 6. select the request job len, based on the number of jobs requsted. > 7. create one RegEx op which uses the mbuf defined in step 5. > 8. attach the data buffer at offset 0 with len accoding to request > len to the mbuf as external buffer. > 9. enqueue one job. > 10. wait for completion of the job. > 11. check job results and print them. > 12. move the mbuf to point to the next part of the buffer. > 13. while there are more parts jump to 9. > > Future improvments to this application may include: > 1. submiting more then one job at a time. > 2. working with more then one queue. > 3. support out of order. > 4. allow runtime rule updating. > > This commit is only at RFC level, which means that > the code is only basic reference and can't be compiled and doesn't > include error or edge case handling. > > [1]https://patches.dpdk.org/cover/69919/ > > Signed-off-by: Ori Kam <or...@mellanox.com>
IMO, this kind simile application with fixed-function can go in the example folder. I think, for app/test-regex, it better to have a framework to add new tests, modes, parse the modes, etc. Please see git log app/test-eventdev/ initial check-ins for the skeleton as a reference