numam-dpdk/drivers/common
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
..
cnxk common/cnxk: allow changing PTP mode on CN10K 2022-07-05 18:51:59 +02:00
cpt common/cpt: fix build with GCC 12 2022-06-21 20:04:49 +02:00
dpaax replace zero-length arrays with flexible ones 2022-06-07 16:44:21 +02:00
iavf common/iavf: support raw packet in protocol header 2022-05-24 04:53:37 +02:00
mlx5 common/mlx5: fix non-expandable global MR cache 2022-07-05 20:03:44 +02:00
mvep drivers: change indentation in build files 2021-04-21 14:04:09 +02:00
octeontx common/octeontx: enable build only on 64-bit Linux 2021-10-15 19:13:13 +02:00
qat crypto/qat: use intel-ipsec-mb for partial hash and AES 2022-06-21 20:04:50 +02:00
sfc_efx common/sfc_efx/base: manage VNIC MAC address by MCDI handle 2022-05-31 18:50:00 +02:00
meson.build drivers: remove octeontx2 drivers 2022-01-12 15:36:32 +01:00