numam-dpdk/drivers/crypto
Michael Baum 5dfa003db5 common/mlx5: fix post doorbell barrier
The rdma-core library can map doorbell register in two ways, depending
on the environment variable "MLX5_SHUT_UP_BF":

  - as regular cached memory, the variable is either missing or set to
    zero. This type of mapping may cause the significant doorbell
    register writing latency and requires an explicit memory write
    barrier to mitigate this issue and prevent write combining.

  - as non-cached memory, the variable is present and set to not "0"
    value. This type of mapping may cause performance impact under
    heavy loading conditions but the explicit write memory barrier is
    not required and it may improve core performance.

The UAR creation function maps a doorbell in one of the above ways
according to the system. In run time, it always adds an explicit memory
barrier after writing to.
In cases where the doorbell was mapped as non-cached memory, the
explicit memory barrier is unnecessary and may impair performance.

The commit [1] solved this problem for a Tx queue. In run time, it
checks the mapping type and provides the memory barrier after writing to
a Tx doorbell register if it is needed. The mapping type is extracted
directly from the uar_mmap_offset field in the queue properties.

This patch shares this code between the drivers and extends the above
solution for each of them.

[1] commit 8409a28573
    ("net/mlx5: control transmit doorbell register mapping")

Fixes: f8c97babc9 ("compress/mlx5: add data-path functions")
Fixes: 8e196c08ab ("crypto/mlx5: support enqueue/dequeue operations")
Fixes: 4d4e245ad6 ("regex/mlx5: support enqueue")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-11-07 16:21:03 +01:00
..
armv8 drivers/crypto: move Windows build check 2021-11-04 19:43:14 +01:00
bcmfs drivers/crypto: move Windows build check 2021-11-04 19:43:14 +01:00
caam_jr drivers/crypto: invoke probing finish function 2021-10-20 15:33:16 +02:00
ccp drivers/crypto: move Windows build check 2021-11-04 19:43:14 +01:00
cnxk crypto/cnxk: fix IV length for ZUC-256 2021-11-04 19:46:27 +01:00
dpaa2_sec drivers/crypto: invoke probing finish function 2021-10-20 15:33:16 +02:00
dpaa_sec drivers/crypto: invoke probing finish function 2021-10-20 15:33:16 +02:00
ipsec_mb drivers/crypto: move Windows build check 2021-11-04 19:43:14 +01:00
mlx5 common/mlx5: fix post doorbell barrier 2021-11-07 16:21:03 +01:00
mvsam drivers/crypto: move Windows build check 2021-11-04 19:43:14 +01:00
nitrox cryptodev: move device-specific structures 2021-10-20 15:33:16 +02:00
null drivers/crypto: move Windows build check 2021-11-04 19:43:14 +01:00
octeontx drivers/crypto: move Windows build check 2021-11-04 19:43:14 +01:00
octeontx2 crypto/octeontx2: fix lookaside IPsec IPv6 2021-11-04 19:46:27 +01:00
openssl drivers/crypto: move Windows build check 2021-11-04 19:43:14 +01:00
qat crypto/qat: add gen-specific implementation 2021-11-04 19:46:27 +01:00
scheduler drivers/crypto: move Windows build check 2021-11-04 19:43:14 +01:00
virtio drivers/crypto: move Windows build check 2021-11-04 19:43:14 +01:00
meson.build drivers/crypto: move Windows build check 2021-11-04 19:43:14 +01:00