app/regex: fix mbuf size for multi-segment buffer
authorRaslan Darawsheh <rasland@nvidia.com>
Tue, 5 Jul 2022 08:09:16 +0000 (11:09 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 5 Jul 2022 20:19:03 +0000 (22:19 +0200)
commita442ca2d230209e1bbc9262abc7c871ff33ef627
tree6c978e6df76f724202736bed6c2f52ef7bd420c8
parent1afdf9edc8f7122cdaf8dae78e29fe8642c21484
app/regex: fix mbuf size for multi-segment buffer

When allocating multi segmented buffers, and in case there is
a remainder in total buf len, the actual job len might be more
than expected job_len.

This adds additional space in the mbuf in the multi seg case,
to allow the remaining memory to be stored in one segment.

Fixes: c1d1b94eec58 ("app/regex: fix number of matches")
Cc: stable@dpdk.org
Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
app/test-regex/main.c