app/regex: support multiple cores
authorOphir Munk <ophirmu@nvidia.com>
Sun, 10 Jan 2021 11:10:21 +0000 (11:10 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 12 Jan 2021 22:59:51 +0000 (23:59 +0100)
commit6b99ba8d4bca072f31612cb0d86847f009e8a4aa
treec7ed7285aafe79539578f43372c32125aec369ab
parentf5cffb7eb7fb6c2ddcfcc706c52faf538522eab7
app/regex: support multiple cores

Up to this commit the regex application was running with multiple QPs on
a single core.  This commit adds the option to specify a number of cores
on which multiple QPs will run.
A new parameter 'nb_lcores' was added to configure the number of cores:
--nb_lcores <num of cores>.
If not configured the number of cores is set to 1 by default.  On
application startup a few initial steps occur by the main core: the
number of QPs and cores are parsed.  The QPs are distributed as evenly
as possible on the cores.  The regex device and all QPs are initialized.
The data file is read and saved in a buffer. Then for each core the
application calls rte_eal_remote_launch() with the worker routine
(run_regex) as its parameter.

Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
app/test-regex/main.c
doc/guides/tools/testregex.rst