app/regex: support multiple queue pairs
authorOphir Munk <ophirmu@nvidia.com>
Sun, 10 Jan 2021 11:10:19 +0000 (11:10 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 12 Jan 2021 22:56:46 +0000 (23:56 +0100)
commit4545bd0088021386cb1fad40203bb56cb53a65af
tree3bf74021edea55fe537d5b63cb6d563fc198ee91
parent2d1fb3f2a6cae670406555dfa1b38bb3114c08c1
app/regex: support multiple queue pairs

Up to this commit the regex application used one QP which was assigned a
number of jobs, each with a different segment of a file to parse.  This
commit adds support for multiple QPs assignments. All QPs will be
assigned the same number of jobs, with the same segments of file to
parse. It will enable comparing functionality with different numbers of
QPs. All queues are managed on one core with one thread. This commit
focuses on changing routines API to support multi QPs, mainly, QP scalar
variables are replaced by per-QP struct instance.  The enqueue/dequeue
operations are interleaved as follows:
 enqueue(QP #1)
 enqueue(QP #2)
 ...
 enqueue(QP #n)
 dequeue(QP #1)
 dequeue(QP #2)
 ...
 dequeue(QP #n)

A new parameter 'nb_qps' was added to configure the number of QPs:
 --nb_qps <num of qps>.
If not configured, nb_qps is set to 1 by default.

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