common/mlx5: wrap memory allocation on Linux
[dpdk.git] / drivers / common / mlx5 / mlx5_devx_cmds.h
index 8d66f1d..726e9f5 100644 (file)
@@ -8,6 +8,14 @@
 #include "mlx5_glue.h"
 #include "mlx5_prm.h"
 
+/*
+ * Defines the amount of retries to allocate the first UAR in the page.
+ * OFED 5.0.x and Upstream rdma_core before v29 returned the NULL as
+ * UAR base address if UAR was not the first object in the UAR page.
+ * It caused the PMD failure and we should try to get another UAR
+ * till we get the first one with non-NULL base address returned.
+ */
+#define MLX5_ALLOC_UAR_RETRY 32
 
 /* This is limitation of libibverbs: in length variable type is u16. */
 #define MLX5_DEVX_MAX_KLM_ENTRIES ((UINT16_MAX - \