numam-dpdk/drivers
Dmitry Kozlyuk e96d3d02d6 common/mlx5: fix non-expandable global MR cache
The number of memory regions (MR) that MLX5 PMD can use
was limited by 512 per IB device, the size of the global MR cache
that was fixed at compile time.
The cache allows to search MR LKey by address efficiently,
therefore it is the last place searched on data path
(skipped is the global MR database which would be slow).
If the application logic caused the PMD to create more than 512 MRs,
which can be the case with external memory,
those MRs would never be found on data path
and later cause a HW failure.

The cache size was fixed because at the time of overflow
the EAL memory hotplug lock may be held,
prohibiting to allocate a larger cache
(it must reside in DPDK memory for multi-process support).
This patch adds logic to release the necessary locks,
extend the cache, and repeat the attempt to insert new entries.

`mlx5_mr_btree` structure had `overflow` field
that was set when a cache (not only the global one)
could not accept new entries.
However, it was only checked for the global cache,
because caches of upper layers were dynamically expandable.
With the global cache size limitation removed, this field is not needed.
Cache size was previously limited by 16-bit indices.
Use the space in the structure previously field by `overflow` field
to extend indices to 32 bits.
With this patch, it is the HW and RAM that limit the number of MRs.

Fixes: 974f1e7ef1 ("net/mlx5: add new memory region support")
Cc: stable@dpdk.org

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2022-07-05 20:03:44 +02:00
..
baseband baseband/acc100: remove prefix of internal file 2022-06-30 06:54:21 +02:00
bus net/netvsc: fix vmbus device reference in multi-process 2022-06-30 14:44:58 +02:00
common common/mlx5: fix non-expandable global MR cache 2022-07-05 20:03:44 +02:00
compress compress/octeontx: support OCTEON TX2 SoC family 2022-04-29 11:36:46 +02:00
crypto crypto/qat: fix DOCSIS crash 2022-07-04 19:22:56 +02:00
dma dma/idxd: fix non-AVX builds with old compilers 2022-06-26 10:27:15 +02:00
event event/dlb2: fix port COS initialization 2022-07-04 18:04:52 +02:00
gpu gpu/cuda: unmap GPU memory while freeing 2022-05-24 23:09:49 +02:00
mempool common/cnxk: support CNF10KB SoC 2022-06-17 14:18:33 +02:00
net net/mlx5: add test for external Rx queue 2022-07-05 20:02:57 +02:00
raw raw/ifpga/base: check null pointer in PMCI 2022-06-26 12:20:44 +02:00
regex replace zero-length arrays with flexible ones 2022-06-07 16:44:21 +02:00
vdpa vdpa/sfc: fix sync between QEMU and vhost-user 2022-07-01 15:49:49 +02:00
meson.build build: add definitions for use as Meson subproject 2022-06-07 20:49:20 +02:00