summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/erdma/erdma_verbs.h
diff options
context:
space:
mode:
authorCheng Xu <chengyou@linux.alibaba.com>2023-06-06 07:50:03 +0200
committerLeon Romanovsky <leon@kernel.org>2023-06-11 10:57:00 +0200
commit7e9a1dada2266c1ef777eba123b5515859779eb9 (patch)
tree025fe59ec78b415f21dc6d313a26a2dea7975552 /drivers/infiniband/hw/erdma/erdma_verbs.h
parentRDMA/erdma: Configure PAGE_SIZE to hardware (diff)
downloadlinux-7e9a1dada2266c1ef777eba123b5515859779eb9.tar.xz
linux-7e9a1dada2266c1ef777eba123b5515859779eb9.zip
RDMA/erdma: Allocate doorbell resources from hardware
Each ucontext will try to allocate doorbell resources in the extended bar space from hardware. For compatibility, we change nothing for the original bar space, and it will be used only for applications with CAP_SYS_RAWIO authority in the older HW/FW environments. Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com> Link: https://lore.kernel.org/r/20230606055005.80729-3-chengyou@linux.alibaba.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/erdma/erdma_verbs.h')
-rw-r--r--drivers/infiniband/hw/erdma/erdma_verbs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/erdma/erdma_verbs.h b/drivers/infiniband/hw/erdma/erdma_verbs.h
index 131cf5f40982..252106679d36 100644
--- a/drivers/infiniband/hw/erdma/erdma_verbs.h
+++ b/drivers/infiniband/hw/erdma/erdma_verbs.h
@@ -31,9 +31,18 @@ struct erdma_user_mmap_entry {
u8 mmap_flag;
};
+struct erdma_ext_db_info {
+ bool enable;
+ u16 sdb_off;
+ u16 rdb_off;
+ u16 cdb_off;
+};
+
struct erdma_ucontext {
struct ib_ucontext ibucontext;
+ struct erdma_ext_db_info ext_db;
+
u32 sdb_type;
u32 sdb_idx;
u32 sdb_page_idx;