net/mlx5: support Rx queue delay drop
[dpdk.git] / drivers / common / mlx5 / mlx5_common_defs.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2021 6WIND S.A.
3  * Copyright 2021 Mellanox Technologies, Ltd
4  */
5
6 #ifndef RTE_PMD_MLX5_COMMON_DEFS_H_
7 #define RTE_PMD_MLX5_COMMON_DEFS_H_
8
9 #include "mlx5_autoconf.h"
10
11 /* Size of per-queue MR cache array for linear search. */
12 #define MLX5_MR_CACHE_N 8
13
14 /* Size of MR cache table for binary search. */
15 #define MLX5_MR_BTREE_CACHE_N 256
16
17 /*
18  * Defines the amount of retries to allocate the first UAR in the page.
19  * OFED 5.0.x and Upstream rdma_core before v29 returned the NULL as
20  * UAR base address if UAR was not the first object in the UAR page.
21  * It caused the PMD failure and we should try to get another UAR
22  * till we get the first one with non-NULL base address returned.
23  */
24 #define MLX5_ALLOC_UAR_RETRY 32
25
26 /* Environment variable to control the doorbell register mapping. */
27 #define MLX5_SHUT_UP_BF "MLX5_SHUT_UP_BF"
28 #if defined(RTE_ARCH_ARM64)
29 #define MLX5_SHUT_UP_BF_DEFAULT "0"
30 #else
31 #define MLX5_SHUT_UP_BF_DEFAULT "1"
32 #endif
33
34 /* Default PMD specific parameter value. */
35 #define MLX5_ARG_UNSET (-1)
36
37 /* MLX5_TX_DB_NC supported values. */
38 #define MLX5_TXDB_CACHED 0
39 #define MLX5_TXDB_NCACHED 1
40 #define MLX5_TXDB_HEURISTIC 2
41
42 #define MLX5_VDPA_MAX_RETRIES 20
43 #define MLX5_VDPA_USEC 1000
44
45 #endif /* RTE_PMD_MLX5_COMMON_DEFS_H_ */