regex/mlx5: add dynamic memory registration to datapath
authorYuval Avnery <yuvalav@nvidia.com>
Mon, 5 Oct 2020 10:51:20 +0000 (10:51 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 5 Oct 2020 23:11:45 +0000 (01:11 +0200)
commitcda883bbb655f2a06cb8d202dc63b8bc45f77a1d
treecf896cdae1917f211f13f11980327deff6ec6f9e
parentaa48ddf4f0d2a9f90cd9247ac779ced55588c27a
regex/mlx5: add dynamic memory registration to datapath

Currently job data is being copied to pre-registered buffer.
To avoid memcpy on the datapath, use dynamic memory registration.

This change will reduce latency when sending regex jobs. The first few
jobs may have high latency due to registration, but assuming all
following mbufs will arrive from the same mempool/hugepage, there will
be no further memory registration.

Signed-off-by: Yuval Avnery <yuvalav@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
drivers/regex/mlx5/mlx5_regex.c
drivers/regex/mlx5/mlx5_regex.h
drivers/regex/mlx5/mlx5_regex_control.c
drivers/regex/mlx5/mlx5_regex_fastpath.c