330a70b773
UMR (User-Mode Memory Registration) WQE can present data buffers scattered within multiple mbufs with single indirect mkey. Take advantage of the UMR WQE, scattered mbuf in one operation can be presented to an indirect mkey. The RegEx which only accepts one mkey can now process the whole scattered mbuf in one operation. The maximum scattered mbuf can be supported in one UMR WQE is now defined as 64. The mbufs from multiple operations can be combined into one UMR WQE as well if there is enough space in the KLM array, since the operations can address their own mbuf's content by the mkey's address and length. However, one operation's scattered mbuf's can't be placed in two different UMR WQE's KLM array, if the UMR WQE's KLM does not has enough free space for one operation, the extra UMR WQE will be engaged. In case the UMR WQE's indirect mkey will be over wrapped by the SQ's WQE move, the mkey's index used by the UMR WQE should be the index of last the RegEX WQE in the operations. As one operation consumes one WQE set, build the RegEx WQE by reverse helps address the mkey more efficiently. Once the operations in one burst consumes multiple mkeys, when the mkey KLM array is full, the reverse WQE set index will always be the last of the new mkey's for the new UMR WQE. In GGA mode, the SQ WQE's memory layout becomes UMR/NOP and RegEx WQE by interleave. The UMR and RegEx WQE can be called as WQE set. The SQ's pi and ci will also be increased as WQE set not as WQE. For operations don't have scattered mbuf, uses the mbuf's mkey directly, the WQE set combination is NOP + RegEx. For operations have scattered mbuf but share the UMR WQE with others, the WQE set combination is NOP + RegEx. For operations complete the UMR WQE, the WQE set combination is UMR + RegEx. Signed-off-by: John Hurley <jhurley@nvidia.com> Signed-off-by: Suanming Mou <suanmingm@nvidia.com> Acked-by: Ori Kam <orika@nvidia.com>
59 lines
1.6 KiB
ReStructuredText
59 lines
1.6 KiB
ReStructuredText
.. SPDX-License-Identifier: BSD-3-Clause
|
|
Copyright 2020 Mellanox Technologies, Ltd
|
|
|
|
.. include:: <isonum.txt>
|
|
|
|
MLX5 RegEx driver
|
|
=================
|
|
|
|
The MLX5 RegEx (Regular Expression) driver library
|
|
(**librte_regex_mlx5**) provides support for **Mellanox BlueField 2**
|
|
families of 25/50/100/200 Gb/s adapters.
|
|
|
|
Design
|
|
------
|
|
|
|
This PMD is configuring the RegEx HW engine.
|
|
For the PMD to work, the application must supply
|
|
a precompiled rule file in rof2 format.
|
|
|
|
The PMD uses libibverbs and libmlx5 to access the device firmware
|
|
or directly the hardware components.
|
|
There are different levels of objects and bypassing abilities
|
|
to get the best performances:
|
|
|
|
- Verbs is a complete high-level generic API
|
|
- Direct Verbs is a device-specific API
|
|
- DevX allows to access firmware objects
|
|
|
|
Enabling librte_regex_mlx5 causes DPDK applications to be linked against
|
|
libibverbs.
|
|
|
|
Mellanox mlx5 pci device can be probed by number of different pci devices,
|
|
for example net / vDPA / RegEx. To select the RegEx PMD ``class=regex`` should
|
|
be specified as device parameter. The RegEx device can be probed and used with
|
|
other Mellanox devices, by adding more options in the class.
|
|
For example: ``class=net:regex`` will probe both the net PMD and the RegEx PMD.
|
|
|
|
Features
|
|
--------
|
|
|
|
- Multi segments mbuf support.
|
|
|
|
Supported NICs
|
|
--------------
|
|
|
|
* Mellanox\ |reg| BlueField 2 SmartNIC
|
|
|
|
Prerequisites
|
|
-------------
|
|
|
|
- BlueField 2 running Mellanox supported kernel.
|
|
- Enable the RegEx capabilities using system call from the BlueField 2.
|
|
- Official support is not yet released.
|
|
|
|
Run-time configuration
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- **ethtool** operations on related kernel interfaces also affect the PMD.
|