path: root/drivers/net/mlx5/mlx5_rxtx.h
diff options
authorDekel Peled <>2019-07-22 14:52:10 +0000
committerFerruh Yigit <>2019-07-23 14:31:36 +0200
commit21cae8580fd06ce593de13b7e70be21bf821f4db (patch)
tree5747493a20d80cbcf7016f7d85411a6e47afda92 /drivers/net/mlx5/mlx5_rxtx.h
parent718d166e550413f7798f638b972c489410111499 (diff)
net/mlx5: allocate door-bells via DevX
When using DevX API, memory for door-bell records should be allocated by PMD and registered using DevX API. This patch implements the utility functions to support it: - Add struct mlx5_devx_dbr_page, containing door-bells page data. - Add list of struct mlx5_devx_dbr_page door-bell pages to device private data. - Implement function mlx5_alloc_dbr_page() to allocate page for door-bell records, and register it using DevX API. - Implement function mlx5_get_dbr(). to acquire a door-bell record from the door-bells page, allocating a new page if needed. - Implement function mlx5_release_dbr() to release a door-bell record that is no longer needed, freeing the containing page if it becomes empty. Signed-off-by: Dekel Peled <> Acked-by: Matan Azrad <> Acked-by: Viacheslav Ovsiienko <>
Diffstat (limited to 'drivers/net/mlx5/mlx5_rxtx.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 2f688ac..436b453 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -29,6 +29,7 @@
#include <rte_spinlock.h>
#include <rte_io.h>
#include <rte_bus_pci.h>
+#include <rte_malloc.h>
#include "mlx5_utils.h"
#include "mlx5.h"