summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_defs.h
diff options
context:
space:
mode:
authorXueming Li <xuemingl@mellanox.com>2018-01-25 23:00:24 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2018-01-29 10:04:28 +0100
commit4a984153430cbdafe2b971e999bba8d96610b299 (patch)
tree1d45d3d52921480a608bd9e339c20eb2a89949bd /drivers/net/mlx5/mlx5_defs.h
parent25f28d9d294d00a1c539d47a13c14ce282e31b09 (diff)
downloaddpdk-next-eventdev-4a984153430cbdafe2b971e999bba8d96610b299.zip
dpdk-next-eventdev-4a984153430cbdafe2b971e999bba8d96610b299.tar.gz
dpdk-next-eventdev-4a984153430cbdafe2b971e999bba8d96610b299.tar.xz
net/mlx5: map UAR address around huge pages
Reserving the memory space for the UAR near huge pages helps to **reduce** the cases where the secondary process cannot start. Those pages being physical pages they must be mapped at the same virtual address as in the primary process to have a working secondary process. As this remap is almost the latest being done by the processes (libraries, heaps, stacks are already loaded), similar to huge pages, there is **no guarantee** this mechanism will always work. Signed-off-by: Xueming Li <xuemingl@mellanox.com> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_defs.h')
-rw-r--r--drivers/net/mlx5/mlx5_defs.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h
index 57f295c..a925921 100644
--- a/drivers/net/mlx5/mlx5_defs.h
+++ b/drivers/net/mlx5/mlx5_defs.h
@@ -113,4 +113,14 @@
/* Maximum number of attempts to query link status before giving up. */
#define MLX5_MAX_LINK_QUERY_ATTEMPTS 5
+/* Reserved address space for UAR mapping. */
+#define MLX5_UAR_SIZE (1ULL << 32)
+
+/* Offset of reserved UAR address space to hugepage memory. Offset is used here
+ * to minimize possibility of address next to hugepage being used by other code
+ * in either primary or secondary process, failing to map TX UAR would make TX
+ * packets invisible to HW.
+ */
+#define MLX5_UAR_OFFSET (1ULL << 32)
+
#endif /* RTE_PMD_MLX5_DEFS_H_ */